aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 37e3a33442..31611f2f27 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -4587,16 +4587,15 @@ void tst_qqmlecmascript::importScripts()
return;
}
- QObject *object = component.create();
+ QScopedPointer<QObject> object {component.create()};
if (!errorMessage.isEmpty()) {
QVERIFY(!object);
} else {
- QVERIFY(object != nullptr);
+ QVERIFY(!object.isNull());
tst_qqmlecmascript::verifyContextLifetime(QQmlContextData::get(engine.rootContext()));
for (int i = 0; i < propertyNames.size(); ++i)
QCOMPARE(object->property(propertyNames.at(i).toLatin1().constData()), propertyValues.at(i));
- delete object;
}
engine.setImportPathList(importPathList);