From 3aa5ef2ea92ccede193b89acc2ba7194a04df17d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Jul 2015 11:30:21 -0700 Subject: Disable thread-safe statics for MSVC 2015: they're broken An object that throws in its constructor cannot be reentered. This violates both C++11 and C++98. It's also a regression from MSVC 2013. The unit test is renamed to indicate what it really does, as opposed to a misleading name that was probably a "thinko" on my part. Task-number: QTBUG-47224 Change-Id: Ib306f8f647014b399b87ffff13f132436d0578ef Reviewed-by: Friedemann Kleint --- tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp') diff --git a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp index e6b2f8a116..a1cfff7e85 100644 --- a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp +++ b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp @@ -50,7 +50,7 @@ private Q_SLOTS: void api(); void constVolatile(); void exception(); - void threadedException(); + void catchExceptionAndRetry(); void threadStressTest(); void afterDestruction(); }; @@ -142,7 +142,7 @@ void tst_QGlobalStatic::exception() QBasicAtomicInt exceptionControlVar = Q_BASIC_ATOMIC_INITIALIZER(1); Q_GLOBAL_STATIC_WITH_ARGS(ThrowingType, exceptionGS, (exceptionControlVar)) -void tst_QGlobalStatic::threadedException() +void tst_QGlobalStatic::catchExceptionAndRetry() { if (exceptionControlVar.load() != 1) QSKIP("This test cannot be run more than once"); -- cgit v1.2.3