diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2015-02-02 21:41:19 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2015-02-04 22:04:31 +0000 |
commit | 459a2745d49fcb9d4bc776faf034b5ababcb12a3 (patch) | |
tree | 9700a49ca4f57bdda1d67d610b678ab1408bef14 /tests/auto/quick/qquickview | |
parent | 41db7b10e404f912ee7e7577a1fdf32996491162 (diff) |
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 <aalpert@blackberry.com>
Diffstat (limited to 'tests/auto/quick/qquickview')
-rw-r--r-- | tests/auto/quick/qquickview/tst_qquickview.cpp | 14 |
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() |