aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index af628dff63..51ce74ef40 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -259,18 +259,10 @@ private:
}
#endif
- static void errorMsgHandler(QtMsgType, const QMessageLogContext &, const QString &)
- {
- ++m_errorCount;
- }
-
QQuickView *m_view;
QString testForView;
- static int m_errorCount;
};
-int tst_QQuickListView::m_errorCount = 0;
-
class TestObject : public QObject
{
Q_OBJECT
@@ -6785,8 +6777,7 @@ void tst_QQuickListView::parentBinding()
{
QQuickView *window = createView();
- m_errorCount = 0;
- QtMessageHandler old = qInstallMessageHandler(errorMsgHandler);
+ QQmlTestMessageHandler messageHandler;
window->setSource(testFileUrl("parentBinding.qml"));
window->show();
@@ -6805,9 +6796,7 @@ void tst_QQuickListView::parentBinding()
QCOMPARE(item->height(), listview->height()/12);
// there should be no transient binding error
- QVERIFY(!m_errorCount);
-
- qInstallMessageHandler(old);
+ QVERIFY2(messageHandler.messages().isEmpty(), qPrintable(messageHandler.messageString()));
delete window;
}