diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-10-29 03:05:16 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-11-30 03:57:16 (GMT) |
commit | 1de080649c6b810ed6bc05e883795687ecde1f3d (patch) | |
tree | a6742e98aade67b553597901bc7396be2012983a /tests/auto/declarative | |
parent | efc41eaa7224c33b5b5af7eae27c93c6748255bc (diff) | |
download | Qt-1de080649c6b810ed6bc05e883795687ecde1f3d.zip Qt-1de080649c6b810ed6bc05e883795687ecde1f3d.tar.gz Qt-1de080649c6b810ed6bc05e883795687ecde1f3d.tar.bz2 |
Fix Browser.qml warnings
Task-number: QTBUG-15720
Reviewed-by: Martin Jones
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r-- | tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 12 |
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); |