diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qquickpopup/tst_qquickpopup.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp index 7f36da20..9a08c340 100644 --- a/tests/auto/qquickpopup/tst_qquickpopup.cpp +++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp @@ -1015,7 +1015,8 @@ void tst_QQuickPopup::componentComplete() QQmlComponent component(&engine); component.setData("import QtQuick.Controls; Popup { }", QUrl()); - FriendlyPopup *qmlPopup = static_cast<FriendlyPopup *>(component.beginCreate(engine.rootContext())); + QScopedPointer<QObject> o(component.beginCreate(engine.rootContext())); + FriendlyPopup *qmlPopup = static_cast<FriendlyPopup *>(o.data()); QVERIFY(qmlPopup); QVERIFY(!qmlPopup->isComponentComplete()); |