diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-02-05 14:18:18 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-02-06 20:59:40 +0000 |
commit | 5b0a98fa16330f220d3fbf67e9a55c8632d30129 (patch) | |
tree | 5a6e025b2c240f36e7855bafd9626c5d90520c59 /src/qml/qml/qqmlobjectcreator_p.h | |
parent | 43b6e0323ac5252dd29b193a7965a0ef3252736e (diff) |
Clean up manual refcounting of compilation units
Replace manual use in QQmlData and QQmlData::DeferredData with
QQmlRefPointer.
Due to forward declaration trouble this required declaring a non-inline
constructor/destructor for QQmlData and DeferedData and disabling
copying, so that not every C++ compilation unit including qqmldata_p.h
needs to instantiate the QQmlRefPointer destructor and thus know whether
QV4::CompiledData::CompilationUnit has release(), etc. The out-of-line
declarations however should not have any negative impact as the only
call sites are within qqmlengine.cpp, too.
Change-Id: I2e8295cb0d7f876a5d7d18765dbac285184e6c99
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator_p.h')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index 82fe22af72..21ee30acd0 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -137,7 +137,7 @@ private: QQmlEngine *engine; QV4::ExecutionEngine *v4; - QV4::CompiledData::CompilationUnit *compilationUnit; + QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit; const QV4::CompiledData::Unit *qmlUnit; QQmlGuardedContextData parentContext; QQmlContextData *context; |