aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/quick/qquickview/tst_qquickview.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/quick/qquickview/tst_qquickview.cpp b/tests/auto/quick/qquickview/tst_qquickview.cpp
index 5dd2aafeb6..ca94b29bf9 100644
--- a/tests/auto/quick/qquickview/tst_qquickview.cpp
+++ b/tests/auto/quick/qquickview/tst_qquickview.cpp
@@ -180,13 +180,13 @@ void tst_QQuickView::resizemodeitem()
void tst_QQuickView::errors()
{
- QQuickView *view = new QQuickView;
- QVERIFY(view);
- QQmlTestMessageHandler messageHandler;
- view->setSource(testFileUrl("error1.qml"));
- QVERIFY(view->status() == QQuickView::Error);
- QVERIFY(view->errors().count() == 1);
- delete view;
+ {
+ QQuickView view;
+ QQmlTestMessageHandler messageHandler;
+ view.setSource(testFileUrl("error1.qml"));
+ QVERIFY(view.status() == QQuickView::Error);
+ QVERIFY(view.errors().count() == 1);
+ }
}
void tst_QQuickView::engine()