QMetaTypeInterface: Do not make member itself const

Dynamic metatypes, like the ones used in QML any Python, benefit if the
pointer in the interface is mutable: They can -either by inheritance
from QMetaTypeInterface or by copying one of its instances- get a
"prefilled" interface, and then replace any member to fit their use
case. Except that before this change, this was not possible for
metaObjectFn.

Change-Id: I6afba13f97174eb08391af38b73fcfc7b37a2276
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Fabian Kosmale 2021-03-22 15:04:17 +01:00
parent 65b4937f34
commit 8771669ca9

View File

@ -268,7 +268,7 @@ public:
mutable QBasicAtomicInt typeId;
using MetaObjectFn = const QMetaObject *(*)(const QMetaTypeInterface *);
const MetaObjectFn metaObjectFn;
MetaObjectFn metaObjectFn;
const char *name;