diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-02-06 23:36:17 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-15 17:27:37 +0100 |
commit | 7184456f9a26a9c07a689c15b415ddf82eb000b7 (patch) | |
tree | 076d42ad3fd6f08a1cbef21ee6811a3fa951850b /src/tools/moc/moc.h | |
parent | 556dd0228aca07dfe8443fd99e9f2ead4e13ab22 (diff) |
Implement new plugin mechanism
moc can now embed meta information about the plugin
inside the plugin itself. This information can
be queried by Qt without having to load the plugin.
Source compatibility with the old plugin loading
mechanism is still there, but will be removed before
Qt 5.0.
Change-Id: I03e4196ddfed07d0fe94acca40d5de8a6ce7f920
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r-- | src/tools/moc/moc.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index b780272dff..aedb97b234 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -46,6 +46,7 @@ #include <QStringList> #include <QMap> #include <QPair> +#include <QJsonDocument> #include <stdio.h> #include <ctype.h> @@ -167,6 +168,11 @@ struct ClassDef { bool hasQObject; bool hasQGadget; + struct PluginData { + QByteArray iid; + QJsonDocument metaData; + } pluginData; + QList<FunctionDef> constructorList; QList<FunctionDef> signalList, slotList, methodList, publicList; int notifyableProperties; @@ -192,7 +198,7 @@ class Moc : public Parser { public: Moc() - : noInclude(false), generatedCode(false), mustIncludeQMetaTypeH(false) + : noInclude(false), generatedCode(false), mustIncludeQMetaTypeH(false), mustIncludeQPluginH(false) {} QByteArray filename; @@ -200,6 +206,7 @@ public: bool noInclude; bool generatedCode; bool mustIncludeQMetaTypeH; + bool mustIncludeQPluginH; QByteArray includePath; QList<QByteArray> includeFiles; QList<ClassDef> classList; @@ -229,6 +236,7 @@ public: void parseSlots(ClassDef *def, FunctionDef::Access access); void parseSignals(ClassDef *def); void parseProperty(ClassDef *def); + void parsePluginData(ClassDef *def); void createPropertyDef(PropertyDef &def); void parseEnumOrFlag(ClassDef *def, bool isFlag); void parseFlag(ClassDef *def); |