From 3f6ecc32cb8fa1c09e8647384ff3017868962668 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 15 Jun 2021 14:21:08 +0200 Subject: tst_qquickpopup: Don't leak created objects Change-Id: Ie1359fb407088adcc91b45ae18c682dda8822a67 Reviewed-by: Mitch Curtis --- tests/auto/qquickpopup/tst_qquickpopup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/auto') 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(component.beginCreate(engine.rootContext())); + QScopedPointer o(component.beginCreate(engine.rootContext())); + FriendlyPopup *qmlPopup = static_cast(o.data()); QVERIFY(qmlPopup); QVERIFY(!qmlPopup->isComponentComplete()); -- cgit v1.2.3