diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 5fd4e09ab0b..eba1907fa84 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -1307,10 +1307,16 @@ void tst_Dumpers::dumper() "\n\n" + data.includes + "\n\n" + (data.useQHash ? "\n#include " - "\n#if QT_VERSION >= 0x050000" + "\n#if QT_VERSION >= 0x050900" + "\n#include " + "\nvoid initHashSeed() { qSetGlobalQHashSeed(0); }" + "\n#elif QT_VERSION >= 0x050000" "\nQT_BEGIN_NAMESPACE" "\nQ_CORE_EXPORT extern QBasicAtomicInt qt_qhash_seed; // from qhash.cpp" "\nQT_END_NAMESPACE" + "\nvoid initHashSeed() { qt_qhash_seed.store(0); }" + "\n#else" + "\nvoid initHashSeed() {}" "\n#endif" : "") + "\n\nint main(int argc, char *argv[])" "\n{" @@ -1332,10 +1338,7 @@ void tst_Dumpers::dumper() "\n#else" "\n int boostversion = 0; unused(&boostversion);" "\n#endif" - "\n" + (data.useQHash ? - "\n#if QT_VERSION >= 0x050000" - "\nqt_qhash_seed.store(0);" - "\n#endif\n" : "") + + "\n" + (data.useQHash ? "initHashSeed();" : "") + "\n" + data.code + "\n BREAK;" "\n return 0;"