aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickview
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-12-18 11:41:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-20 21:38:38 +0100
commit5fd1c5fbaf13195fed16ca171f4eac81be125e2b (patch)
treeec6a445f2f0367f7a5298274950750ad56e23c68 /tests/auto/quick/qquickview
parent920b949e5185258baabfb3f738b660b3c0f002e3 (diff)
Quick tests: Introduce QQmlMessageHandler.
Add QQmlMessageHandler class that can be used to record messages into a QStringList. It also makes sure that the old message handler is reinstalled if the test fails. Task-number: QTBUG-28611 Change-Id: I0fff7bc11e188cf47178d9573e5f2eead693bc10 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickview')
-rw-r--r--tests/auto/quick/qquickview/tst_qquickview.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickview/tst_qquickview.cpp b/tests/auto/quick/qquickview/tst_qquickview.cpp
index 94452b142b..aa20967fa3 100644
--- a/tests/auto/quick/qquickview/tst_qquickview.cpp
+++ b/tests/auto/quick/qquickview/tst_qquickview.cpp
@@ -195,9 +195,8 @@ void tst_QQuickView::errors()
{
QQuickView *view = new QQuickView;
QVERIFY(view);
- QtMessageHandler old = qInstallMessageHandler(silentErrorsMsgHandler);
+ QQmlTestMessageHandler messageHandler;
view->setSource(testFileUrl("error1.qml"));
- qInstallMessageHandler(old);
QVERIFY(view->status() == QQuickView::Error);
QVERIFY(view->errors().count() == 1);
delete view;