From d62228a77e3f4990623636519836874a66baffbb Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 12 Dec 2011 16:24:52 +0000 Subject: [PATCH] Fix compile error when configured with -no-exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp index aab405f..f48a8eb 100644 --- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp @@ -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() -- 2.7.4