diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-26 11:05:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-31 17:08:37 +0000 |
commit | 193db4c52613a37275535783825190ddd7e1f758 (patch) | |
tree | c48dceff1739e6203e4096a1763e5141649e107c /src/qml/compiler/qqmlirbuilder.cpp | |
parent | c549d9c4e58ef8b6f9c8d954dc24072ce529f326 (diff) |
Clean up internal QML unit creation API
Since the callers always end up assigning the returned unit pointer back
to the compilation unit's data member, we might as well do that inside
the function and return void instead.
Change-Id: I7a7f3e7a0c89ffe2f9474149fcf61736609b363d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 90ba0506f0..e2ea8f6853 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -1551,7 +1551,7 @@ bool IRBuilder::isRedundantNullInitializerForPropertyDeclaration(Property *prope return QQmlJS::AST::cast<QQmlJS::AST::NullExpression *>(expr); } -QV4::CompiledData::Unit *QmlUnitGenerator::generate(Document &output, const QV4::CompiledData::DependentTypesHasher &dependencyHasher) +void QmlUnitGenerator::generate(Document &output, const QV4::CompiledData::DependentTypesHasher &dependencyHasher) { QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit = output.javaScriptCompilationUnit; @@ -1798,7 +1798,7 @@ QV4::CompiledData::Unit *QmlUnitGenerator::generate(Document &output, const QV4: qDebug() << " " << totalStringSize << "bytes total strings"; } - return qmlUnit; + compilationUnit->setUnitData(qmlUnit); } char *QmlUnitGenerator::writeBindings(char *bindingPtr, const Object *o, BindingFilter filter) const |