Avoid duplicating flags/types in qmetaobjectbuilder
Presumably the contents from qmetaobject_p.h were copied because qmetaobjectbuilder originally lived outside of qtbase, and private headers could not be included from other modules. But now we can just include the right headers. Change-Id: I975df1ea94455f1bf0db1d8024de8f5379fc9fc7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
This commit is contained in:
parent
3ddfa8d0ea
commit
d30515104d
@ -41,6 +41,9 @@
|
|||||||
|
|
||||||
#include "qmetaobjectbuilder_p.h"
|
#include "qmetaobjectbuilder_p.h"
|
||||||
|
|
||||||
|
#include "qobject_p.h"
|
||||||
|
#include "qmetaobject_p.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -92,63 +95,6 @@ bool isVariantType(const char* type)
|
|||||||
return qvariant_nameToType(type) != 0;
|
return qvariant_nameToType(type) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copied from qmetaobject_p.h
|
|
||||||
// do not touch without touching the moc as well
|
|
||||||
enum PropertyFlags {
|
|
||||||
Invalid = 0x00000000,
|
|
||||||
Readable = 0x00000001,
|
|
||||||
Writable = 0x00000002,
|
|
||||||
Resettable = 0x00000004,
|
|
||||||
EnumOrFlag = 0x00000008,
|
|
||||||
StdCppSet = 0x00000100,
|
|
||||||
// Override = 0x00000200,
|
|
||||||
Constant = 0x00000400,
|
|
||||||
Final = 0x00000800,
|
|
||||||
Designable = 0x00001000,
|
|
||||||
ResolveDesignable = 0x00002000,
|
|
||||||
Scriptable = 0x00004000,
|
|
||||||
ResolveScriptable = 0x00008000,
|
|
||||||
Stored = 0x00010000,
|
|
||||||
ResolveStored = 0x00020000,
|
|
||||||
Editable = 0x00040000,
|
|
||||||
ResolveEditable = 0x00080000,
|
|
||||||
User = 0x00100000,
|
|
||||||
ResolveUser = 0x00200000,
|
|
||||||
Notify = 0x00400000,
|
|
||||||
Revisioned = 0x00800000
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MethodFlags {
|
|
||||||
AccessPrivate = 0x00,
|
|
||||||
AccessProtected = 0x01,
|
|
||||||
AccessPublic = 0x02,
|
|
||||||
AccessMask = 0x03, //mask
|
|
||||||
|
|
||||||
MethodMethod = 0x00,
|
|
||||||
MethodSignal = 0x04,
|
|
||||||
MethodSlot = 0x08,
|
|
||||||
MethodConstructor = 0x0c,
|
|
||||||
MethodTypeMask = 0x0c,
|
|
||||||
|
|
||||||
MethodCompatibility = 0x10,
|
|
||||||
MethodCloned = 0x20,
|
|
||||||
MethodScriptable = 0x40,
|
|
||||||
MethodRevisioned = 0x80
|
|
||||||
};
|
|
||||||
|
|
||||||
struct QMetaObjectPrivate
|
|
||||||
{
|
|
||||||
int revision;
|
|
||||||
int className;
|
|
||||||
int classInfoCount, classInfoData;
|
|
||||||
int methodCount, methodData;
|
|
||||||
int propertyCount, propertyData;
|
|
||||||
int enumeratorCount, enumeratorData;
|
|
||||||
int constructorCount, constructorData;
|
|
||||||
int flags;
|
|
||||||
int signalCount;
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline const QMetaObjectPrivate *priv(const uint* data)
|
static inline const QMetaObjectPrivate *priv(const uint* data)
|
||||||
{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }
|
{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }
|
||||||
// end of copied lines from qmetaobject.cpp
|
// end of copied lines from qmetaobject.cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user