summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeviewer
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-12-11 00:00:11 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-12-11 00:00:11 (GMT)
commit9192dbe2781d9891d41c05f52d19b2d94b2b5f94 (patch)
treef0b470d53e5fccae99f40d9f60cb43bfb0b29c10 /tests/auto/declarative/qdeclarativeviewer
parentf6c23d7874043ca67ae7e8b87d7948e7c710fc53 (diff)
parentc8a2533cb39ce0c7479880cd889ad594d569ecc0 (diff)
downloadQt-9192dbe2781d9891d41c05f52d19b2d94b2b5f94.zip
Qt-9192dbe2781d9891d41c05f52d19b2d94b2b5f94.tar.gz
Qt-9192dbe2781d9891d41c05f52d19b2d94b2b5f94.tar.bz2
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'tests/auto/declarative/qdeclarativeviewer')
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index 21c7197..f19eb03 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -238,13 +238,25 @@ void tst_QDeclarativeViewer::loading()
delete viewer;
}
+static int numberOfWarnings = 0;
+static void checkWarnings(QtMsgType, const char *)
+{
+ numberOfWarnings++;
+}
+
void tst_QDeclarativeViewer::fileBrowser()
{
+ QtMsgHandler previousMsgHandler = qInstallMsgHandler(checkWarnings);
QDeclarativeViewer *viewer = new QDeclarativeViewer();
QVERIFY(viewer);
viewer->setUseNativeFileBrowser(false);
viewer->openFile();
viewer->show();
+ QCoreApplication::processEvents();
+ qInstallMsgHandler(previousMsgHandler);
+
+ // QTBUG-15720
+ QVERIFY(numberOfWarnings == 0);
QApplication::setActiveWindow(viewer);
QTest::qWaitForWindowShown(viewer);