summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-11 08:09:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-11 08:09:11 (GMT)
commit9aea3eb085e0bb235bbe7b368f98993bb1e2aa96 (patch)
treedb36415412c4208fd641f4377909c3fb4b8a8c56 /tests
parente625a3f646073204240bea11feff08df6bdba17e (diff)
parentc8afa6feb8f87ae733bbb3237b1d2e84ab47b4de (diff)
downloadQt-9aea3eb085e0bb235bbe7b368f98993bb1e2aa96.zip
Qt-9aea3eb085e0bb235bbe7b368f98993bb1e2aa96.tar.gz
Qt-9aea3eb085e0bb235bbe7b368f98993bb1e2aa96.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team: tests: fixed crash of tst_qdialog
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdialog/tst_qdialog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp
index 6d9f798..86dde21 100644
--- a/tests/auto/qdialog/tst_qdialog.cpp
+++ b/tests/auto/qdialog/tst_qdialog.cpp
@@ -467,6 +467,22 @@ void tst_QDialog::throwInExec()
#if defined(Q_WS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_))
QSKIP("Throwing exceptions in exec() is not supported on this platform.", SkipAll);
#endif
+
+#if defined(Q_OS_LINUX)
+ // C++ exceptions can't be passed through glib callbacks. Skip the test if
+ // we're using the glib event loop.
+ QByteArray dispatcher = QAbstractEventDispatcher::instance()->metaObject()->className();
+ if (dispatcher.contains("Glib")) {
+ QSKIP(
+ qPrintable(QString(
+ "Throwing exceptions in exec() won't work if %1 event dispatcher is used.\n"
+ "Try running with QT_NO_GLIB=1 in environment."
+ ).arg(QString::fromLatin1(dispatcher))),
+ SkipAll
+ );
+ }
+#endif
+
int caughtExceptions = 0;
try {
ExceptionDialog dialog;