forked from qt-creator/qt-creator
Tests: Fix compilation with Qt 5.9
qt_qhash_seed is no longer exported Change-Id: I78df98b7022dbe5ae9da56c3d2514b3b31a2312c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1307,10 +1307,16 @@ void tst_Dumpers::dumper()
|
|||||||
"\n\n" + data.includes +
|
"\n\n" + data.includes +
|
||||||
"\n\n" + (data.useQHash ?
|
"\n\n" + (data.useQHash ?
|
||||||
"\n#include <QByteArray>"
|
"\n#include <QByteArray>"
|
||||||
"\n#if QT_VERSION >= 0x050000"
|
"\n#if QT_VERSION >= 0x050900"
|
||||||
|
"\n#include <QHash>"
|
||||||
|
"\nvoid initHashSeed() { qSetGlobalQHashSeed(0); }"
|
||||||
|
"\n#elif QT_VERSION >= 0x050000"
|
||||||
"\nQT_BEGIN_NAMESPACE"
|
"\nQT_BEGIN_NAMESPACE"
|
||||||
"\nQ_CORE_EXPORT extern QBasicAtomicInt qt_qhash_seed; // from qhash.cpp"
|
"\nQ_CORE_EXPORT extern QBasicAtomicInt qt_qhash_seed; // from qhash.cpp"
|
||||||
"\nQT_END_NAMESPACE"
|
"\nQT_END_NAMESPACE"
|
||||||
|
"\nvoid initHashSeed() { qt_qhash_seed.store(0); }"
|
||||||
|
"\n#else"
|
||||||
|
"\nvoid initHashSeed() {}"
|
||||||
"\n#endif" : "") +
|
"\n#endif" : "") +
|
||||||
"\n\nint main(int argc, char *argv[])"
|
"\n\nint main(int argc, char *argv[])"
|
||||||
"\n{"
|
"\n{"
|
||||||
@@ -1332,10 +1338,7 @@ void tst_Dumpers::dumper()
|
|||||||
"\n#else"
|
"\n#else"
|
||||||
"\n int boostversion = 0; unused(&boostversion);"
|
"\n int boostversion = 0; unused(&boostversion);"
|
||||||
"\n#endif"
|
"\n#endif"
|
||||||
"\n" + (data.useQHash ?
|
"\n" + (data.useQHash ? "initHashSeed();" : "") +
|
||||||
"\n#if QT_VERSION >= 0x050000"
|
|
||||||
"\nqt_qhash_seed.store(0);"
|
|
||||||
"\n#endif\n" : "") +
|
|
||||||
"\n" + data.code +
|
"\n" + data.code +
|
||||||
"\n BREAK;"
|
"\n BREAK;"
|
||||||
"\n return 0;"
|
"\n return 0;"
|
||||||
|
|||||||
Reference in New Issue
Block a user