summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-10 10:00:34 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-10 10:00:34 +0200
commit0eff16611f65c1459ab73bde1ad2175614dd84eb (patch)
tree3eec6162b3f9fd283c1fb675c7d437baf6c37565 /tests
parent9095210c0b57f75fe2fecf7289fabbdfdf64e198 (diff)
parentebea15cb33da8063a630867e38eacf7857b0b936 (diff)
Merge remote-tracking branch 'origin/release' into stable
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp67
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro2
2 files changed, 2 insertions, 67 deletions
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index 2250d0bb5e..25e5f03566 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -159,23 +159,6 @@ public slots:
}
};
-#ifndef QT_NO_EXCEPTIONS
-class QEventLoopTestException { };
-
-class ExceptionThrower : public QObject
-{
- Q_OBJECT
-public:
- ExceptionThrower() : QObject() { }
-public slots:
- void throwException()
- {
- QEventLoopTestException e;
- throw e;
- }
-};
-#endif
-
class tst_QEventLoop : public QObject
{
Q_OBJECT
@@ -183,9 +166,6 @@ private slots:
// This test *must* run first. See the definition for why.
void processEvents();
void exec();
-#if !defined(QT_NO_EXCEPTIONS) && !defined(Q_OS_WINCE_WM)
- void throwInExec();
-#endif
void reexec();
void execAfterExit();
void wakeUp();
@@ -322,53 +302,6 @@ void tst_QEventLoop::exec()
}
}
-#if !defined(QT_NO_EXCEPTIONS) && !defined(Q_OS_WINCE_WM)
-// Exceptions need to be enabled for this test
-// Q_OS_WINCE_WM case: this platform doesn't support propagating exceptions through the event loop
-// Windows Mobile cannot handle cross library exceptions
-// qobject.cpp will try to rethrow the exception after handling
-// which causes gwes.exe to crash
-void tst_QEventLoop::throwInExec()
-{
-// 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();
- 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)))
- );
- }
-#endif
-
- {
- // QEventLoop::exec() is exception safe
- QEventLoop eventLoop;
- int caughtExceptions = 0;
-
- try {
- ExceptionThrower exceptionThrower;
- QTimer::singleShot(EXEC_TIMEOUT, &exceptionThrower, SLOT(throwException()));
- (void) eventLoop.exec();
- } catch (...) {
- ++caughtExceptions;
- }
- try {
- ExceptionThrower exceptionThrower;
- QTimer::singleShot(EXEC_TIMEOUT, &exceptionThrower, SLOT(throwException()));
- (void) eventLoop.exec();
- } catch (...) {
- ++caughtExceptions;
- }
- QCOMPARE(caughtExceptions, 2);
- }
-}
-#endif
-
void tst_QEventLoop::reexec()
{
QEventLoop loop;
diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro
index 91eeda34c3..34af962d36 100644
--- a/tests/auto/gui/qopengl/qopengl.pro
+++ b/tests/auto/gui/qopengl/qopengl.pro
@@ -8,3 +8,5 @@ TARGET = tst_qopengl
QT += gui gui-private core-private testlib
SOURCES += tst_qopengl.cpp
+
+win32-msvc2010:contains(QT_CONFIG, angle):CONFIG += insignificant_test # QTBUG-31611