aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qml/v4misc/tst_v4misc.cpp10
-rw-r--r--tests/manual/scenegraph_lancelot/scenegrabber/main.cpp5
-rw-r--r--tools/qmlcachegen/qmlcachegen.cpp4
3 files changed, 7 insertions, 12 deletions
diff --git a/tests/auto/qml/v4misc/tst_v4misc.cpp b/tests/auto/qml/v4misc/tst_v4misc.cpp
index 88b6ae92a8..55a1f65608 100644
--- a/tests/auto/qml/v4misc/tst_v4misc.cpp
+++ b/tests/auto/qml/v4misc/tst_v4misc.cpp
@@ -26,6 +26,7 @@
**
****************************************************************************/
+#include <qhashfunctions.h>
#include <qtest.h>
#define V4_AUTOTEST
@@ -46,17 +47,12 @@ private slots:
void moveMapping_2();
};
-QT_BEGIN_NAMESPACE
-// Avoid QHash randomization so that the temp numbering is stable.
-extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; // from qhash.cpp
-QT_END_NAMESPACE
-
using namespace QT_PREPEND_NAMESPACE(QV4::IR);
void tst_v4misc::initTestCase()
{
- qt_qhash_seed.store(0);
- QCOMPARE(qt_qhash_seed.load(), 0);
+ qSetGlobalQHashSeed(0);
+ QCOMPARE(qGlobalQHashSeed(), 0);
}
// split between two ranges
diff --git a/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp b/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp
index 886cfc6599..6da0799bbc 100644
--- a/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegrabber/main.cpp
@@ -29,6 +29,7 @@
#include <QtCore/QTimer>
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
+#include <QtCore/QHashFunctions>
#include <QtGui/QGuiApplication>
#include <QtGui/QImage>
@@ -134,11 +135,9 @@ private:
};
-Q_CORE_EXPORT extern QBasicAtomicInt qt_qhash_seed;
-
int main(int argc, char *argv[])
{
- qt_qhash_seed = 0;
+ qSetGlobalQHashSeed(0);
QGuiApplication a(argc, argv);
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp
index 9a68e2ac97..657b1e8501 100644
--- a/tools/qmlcachegen/qmlcachegen.cpp
+++ b/tools/qmlcachegen/qmlcachegen.cpp
@@ -32,13 +32,13 @@
#include <QFile>
#include <QFileInfo>
#include <QDateTime>
+#include <QHashFunctions>
#include <private/qqmlirbuilder_p.h>
#include <private/qv4isel_moth_p.h>
#include <private/qqmljsparser_p.h>
QT_BEGIN_NAMESPACE
-extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
namespace QV4 { namespace JIT {
Q_QML_EXPORT QV4::EvalISelFactory *createISelForArchitecture(const QString &architecture);
@@ -291,7 +291,7 @@ static bool compileJSFile(const QString &inputFileName, const QString &outputFil
int main(int argc, char **argv)
{
// Produce reliably the same output for the same input by disabling QHash's random seeding.
- qt_qhash_seed.testAndSetRelaxed(-1, 0);
+ qSetGlobalQHashSeed(0);
QCoreApplication app(argc, argv);
QCoreApplication::setApplicationName(QStringLiteral("qmlcachegen"));