summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdialog/tst_qdialog.cpp
diff options
context:
space:
mode:
authorSami Lempinen <sami.lempinen@nokia.com>2011-08-23 11:33:16 (GMT)
committerSami Lempinen <sami.lempinen@nokia.com>2011-08-23 11:33:16 (GMT)
commita28832bb61e7e60ac0fb856daf27b78ff1728520 (patch)
treed8ecd2387568814a68bf8b8713f3abed9ff9f275 /tests/auto/qdialog/tst_qdialog.cpp
parent59f33898919391d3aa4baa6849556965ae7d08ce (diff)
parent2f5855e8d891a7e93bdb721243f1c0b10fcb5ad9 (diff)
downloadQt-a28832bb61e7e60ac0fb856daf27b78ff1728520.zip
Qt-a28832bb61e7e60ac0fb856daf27b78ff1728520.tar.gz
Qt-a28832bb61e7e60ac0fb856daf27b78ff1728520.tar.bz2
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'tests/auto/qdialog/tst_qdialog.cpp')
-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;