summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qdialog/qdialog.pro3
-rw-r--r--tests/auto/qdialog/tst_qdialog.cpp16
2 files changed, 16 insertions, 3 deletions
diff --git a/tests/auto/qdialog/qdialog.pro b/tests/auto/qdialog/qdialog.pro
index ab7bfd9022..161a6b47f1 100644
--- a/tests/auto/qdialog/qdialog.pro
+++ b/tests/auto/qdialog/qdialog.pro
@@ -1,5 +1,2 @@
load(qttest_p4)
SOURCES += tst_qdialog.cpp
-
-
-CONFIG+=insignificant_test
diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp
index 6d9f7988cd..86dde21ba0 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;