diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-01-23 14:14:47 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-01-28 16:37:30 +0000 |
commit | 6ef66a5dfe938a23c67c0aef0d6c7ebc98b8cca8 (patch) | |
tree | e4a1d343302d981b31fc4ebd22e0b6e88fc12c16 /tools | |
parent | e5b157275d7b924e1a0f39d27958a7ad1eed9cef (diff) |
Remove private API dependency of qmlcachegen generated code
Since the compilation unit does not have a backend anymore, we can
create it in QtQml itself instead of in generated stub code. That
removes the last dependency to private headers in the generated code.
Change-Id: I186fc5bd679476b1a4714e4e3ba0ac00b55676cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlcachegen/generateloader.cpp | 8 | ||||
-rw-r--r-- | tools/qmlcachegen/qtquickcompiler.prf | 4 |
2 files changed, 1 insertions, 11 deletions
diff --git a/tools/qmlcachegen/generateloader.cpp b/tools/qmlcachegen/generateloader.cpp index dd2e244b56..083af29a2d 100644 --- a/tools/qmlcachegen/generateloader.cpp +++ b/tools/qmlcachegen/generateloader.cpp @@ -293,7 +293,6 @@ bool generateLoader(const QStringList &compiledFiles, const QString &outputFileN { QTextStream stream(&generatedLoaderCode); stream << "#include <QtQml/qqmlprivate.h>\n"; - stream << "#include <private/qv4compileddata_p.h>\n"; stream << "#include <QtCore/qdir.h>\n"; stream << "#include <QtCore/qurl.h>\n"; stream << "\n"; @@ -306,13 +305,8 @@ bool generateLoader(const QStringList &compiledFiles, const QString &outputFileN const QString ns = symbolNamespaceForPath(compiledFile); stream << "namespace " << symbolNamespaceForPath(compiledFile) << " { \n"; stream << " extern const unsigned char qmlData[];\n"; - stream << " QV4::CompiledData::CompilationUnit *createCompilationUnit() {\n"; - stream << " QV4::CompiledData::CompilationUnit *unit = new QV4::CompiledData::CompilationUnit;\n"; - stream << " unit->data = reinterpret_cast<const QV4::CompiledData::Unit*>(&qmlData);\n"; - stream << " return unit;\n"; - stream << " }\n"; stream << " const QQmlPrivate::CachedQmlUnit unit = {\n"; - stream << " reinterpret_cast<const QV4::CompiledData::Unit*>(&qmlData), &createCompilationUnit, nullptr\n"; + stream << " reinterpret_cast<const QV4::CompiledData::Unit*>(&qmlData), nullptr, nullptr\n"; stream << " };\n"; stream << "}\n"; } diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf index 985a0a5cdc..b68e8f91a2 100644 --- a/tools/qmlcachegen/qtquickcompiler.prf +++ b/tools/qmlcachegen/qtquickcompiler.prf @@ -53,10 +53,6 @@ for(res, QMLCACHE_RESOURCE_FILES) { QMLCACHE_RESOURCE_FLAGS += --resource=$$res } -!isEmpty(QMLCACHE_FILES) { - QT_PRIVATE *= core-private qml-private -} - defineReplace(qmlCacheOutputName) { name = $$absolute_path($$1, $$OUT_PWD) name = $$relative_path($$name, $$_PRO_FILE_PWD_) |