Fix compile error when configured with -no-exceptions

The test was skipped, but still tried to compile code that uses
exceptions. The throwing class it uses was conditionally compiled
out earlier in the file, causing an error for undefined class.

Task-number: QTBUG-23028
Change-Id: Ia2e05a8a0abbf0e913f6c41e85bfee8b85cbc8a5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This commit is contained in:
Shane Kearns 2011-12-12 16:24:52 +00:00 committed by Qt by Nokia
parent 1b51079e48
commit d62228a77e

View File

@ -322,7 +322,9 @@ void tst_QEventLoop::throwInExec()
// qobject.cpp will try to rethrow the exception after handling
// which causes gwes.exe to crash
QSKIP("This platform doesn't support propagating exceptions through the event loop");
#elif defined(Q_OS_LINUX)
#else
// exceptions compiled in, runtime tests follow.
#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();
@ -357,6 +359,7 @@ void tst_QEventLoop::throwInExec()
}
QCOMPARE(caughtExceptions, 2);
}
#endif
}
void tst_QEventLoop::reexec()