From ce42e8aba53f30eaceda163f99adb041d2afa11a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 22 Mar 2017 15:23:50 +0100 Subject: [PATCH] Tests: Fix compilation with Qt 5.9 qt_qhash_seed is no longer exported Change-Id: I78df98b7022dbe5ae9da56c3d2514b3b31a2312c Reviewed-by: Christian Stenger --- tests/auto/debugger/tst_dumpers.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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;"