From 459a2745d49fcb9d4bc776faf034b5ababcb12a3 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 2 Feb 2015 21:41:19 +0100 Subject: tst_qquickview: Prepare test to handle multiple pieces of data. Additionally, stack allocate the view. It's shorter, and saves an almost totally pointless QVERIFY. Change-Id: Ic90602d24659e1455dd50b706f96ef5ccac14f3a Reviewed-by: Alan Alpert --- tests/auto/quick/qquickview/tst_qquickview.cpp | 14 +++++++------- 1 file 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() -- cgit v1.2.3