summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.h
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-05-28 11:11:08 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-06-02 19:03:45 +0200
commite6a2892772c9ea18a941625b2b8dec38e6774f82 (patch)
tree4248dd3057d7a7b236ac86f972dc6fe7e4a25ab1 /src/tools/moc/moc.h
parent6ef69bcef2785baf112b6f91f05995fc01869928 (diff)
moc: Add relative property index to JSON output of PropertyDef
Needed for QML compiler to know property index of C++ type at compile time without going through QMetaObject::indexOfProperty Change-Id: I404e71d6071d36812661df17d12b879a8dcbd146 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r--src/tools/moc/moc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 889ee15652..1c2d6624fa 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -140,6 +140,7 @@ struct PropertyDef
bool constant = false;
bool final = false;
bool required = false;
+ int relativeIndex = -1; // property index in current metaobject
int location = -1; // token index, used for error reporting
@@ -263,7 +264,7 @@ public:
void parseSignals(ClassDef *def);
void parseProperty(ClassDef *def);
void parsePluginData(ClassDef *def);
- void createPropertyDef(PropertyDef &def);
+ void createPropertyDef(PropertyDef &def, int propertyIndex);
void parsePropertyAttributes(PropertyDef &propDef);
void parseEnumOrFlag(BaseDef *def, bool isFlag);
void parseFlag(BaseDef *def);