aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-01-23 14:14:47 +0100
committerLars Knoll <lars.knoll@qt.io>2018-01-28 16:37:30 +0000
commit6ef66a5dfe938a23c67c0aef0d6c7ebc98b8cca8 (patch)
treee4a1d343302d981b31fc4ebd22e0b6e88fc12c16 /src/qml/compiler
parente5b157275d7b924e1a0f39d27958a7ad1eed9cef (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 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp3
-rw-r--r--src/qml/compiler/qv4compileddata_p.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 889e755682..cdba3a5931 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -94,7 +94,8 @@ static QString cacheFilePath(const QUrl &url)
}
#endif
-CompilationUnit::CompilationUnit()
+CompilationUnit::CompilationUnit(const Unit *unitData)
+ : data(unitData)
{}
#ifndef V4_BOOTSTRAP
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index faa2d9bcb4..359a92c166 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -884,7 +884,7 @@ Q_STATIC_ASSERT(offsetof(CompilationUnitBase, runtimeRegularExpressions) == offs
struct Q_QML_PRIVATE_EXPORT CompilationUnit final : public CompilationUnitBase
{
public:
- CompilationUnit();
+ CompilationUnit(const Unit *unitData = nullptr);
#ifdef V4_BOOTSTRAP
~CompilationUnit() {}
#else