diff options
Diffstat (limited to 'tools/qmlcachegen/qmlcachegen.cpp')
-rw-r--r-- | tools/qmlcachegen/qmlcachegen.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index 33a77bc835..c3ac7d1542 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -386,6 +386,9 @@ static bool saveUnitAsCpp(const QString &inputFileName, const QString &outputFil if (!writeStr("\n")) return false; + if (!writeStr("#include <QtQml/qqmlprivate.h>\n")) + return false; + if (!writeStr(QByteArrayLiteral("namespace QmlCacheGeneratedCode {\nnamespace "))) return false; @@ -418,7 +421,14 @@ static bool saveUnitAsCpp(const QString &inputFileName, const QString &outputFil - if (!writeStr("};\n}\n}\n")) + if (!writeStr("};\n")) + return false; + + if (!writeStr("extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[] = " + "{ { 0, QMetaType::fromType<void>(), nullptr } };\n")) + return false; + + if (!writeStr("}\n}\n")) return false; #if QT_CONFIG(temporaryfile) |