test: fixed crash of tst_qdialog and removed CONFIG+=insignificant_test
This test assumed that C++ exceptions could always be caught by the event loop. This is not the case when the Glib event loop is used. Skip the relevant portion of the test in that case. Change-Id: I6a6325c3590c810a5aba28ec98279581dcfaf55c Reviewed-on: http://codereview.qt.nokia.com/2455 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This commit is contained in:
parent
493634a711
commit
569cd194d2
@ -1,5 +1,2 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qdialog.cpp
|
||||
|
||||
|
||||
CONFIG+=insignificant_test
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user