aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-04-23 14:48:14 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-04-26 09:56:46 +0000
commit12a2c68789918637f7c28ef0b06d9e70b5fae0ca (patch)
treebe4c142046e2563a056470e7e235065944a42c9d /src/qml/qml/qqmlobjectcreator.cpp
parent2ce01aa8ca69b882e4186625667d191f3428fc3a (diff)
Clean up manual reference counting of QQmlScriptData
QQmlScriptData is another data type that is best reference counted using automatic means. Change-Id: I9e25ac81ccdc03c2eefa35fcecc9cdfcc06dfe0a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 17734a0f97..6429e06070 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -193,7 +193,7 @@ QObject *QQmlObjectCreator::create(int subComponentIndex, QObject *parent, QQmlI
context->importedScripts.set(v4, scripts);
QV4::ScopedValue v(scope);
for (int i = 0; i < compilationUnit->dependentScripts.count(); ++i) {
- QQmlScriptData *s = compilationUnit->dependentScripts.at(i);
+ QQmlRefPointer<QQmlScriptData> s = compilationUnit->dependentScripts.at(i);
scripts->putIndexed(i, (v = s->scriptValueForContext(context)));
}
} else if (sharedState->creationContext) {