summaryrefslogtreecommitdiffstats
path: root/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qthreadstorage/tst_qthreadstorage.cpp')
-rw-r--r--tests/auto/qthreadstorage/tst_qthreadstorage.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
index a62bfee..2391c81 100644
--- a/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
@@ -385,19 +385,18 @@ void tst_QThreadStorage::QTBUG14579_leakInDestructor()
QCOMPARE(int(SPointer::count), c);
}
-
-class QTBUG14579_reset;
-Q_GLOBAL_STATIC(QThreadStorage<QTBUG14579_reset *>, QTBUG14579_resetTls)
-
class QTBUG14579_reset {
public:
SPointer member;
- ~QTBUG14579_reset() {
- //Quite stupid, but WTF::ThreadSpecific<T>::destroy does it.
- QTBUG14579_resetTls()->setLocalData(this);
- }
+ ~QTBUG14579_reset();
};
+Q_GLOBAL_STATIC(QThreadStorage<QTBUG14579_reset *>, QTBUG14579_resetTls)
+
+QTBUG14579_reset::~QTBUG14579_reset() {
+ //Quite stupid, but WTF::ThreadSpecific<T>::destroy does it.
+ QTBUG14579_resetTls()->setLocalData(this);
+}
void tst_QThreadStorage::QTBUG14579_resetInDestructor()
{