summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-09-21 15:53:49 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-09-22 14:17:46 +0000
commita14fadfb640103ecea76c3966cf23668bb7f448b (patch)
treea8a9de3fca0070109066085e3c467ec21534129f /tests/auto/other
parent863dfb1541f4f0865a6e4ee42dbef159eaa7f2d0 (diff)
Add getter and setter for qt_qhash_seed
In some cases it's not possible to use QT_HASH_SEED, specially when we need to set the environment variable from inside the application, as dynamically loaded libraries or plugins may create static QHash instances. That would set qt_qhash_seed to a value different from -1 and skip the env var value. For those cases, and when we still want to set qt_qhash_seed, we provide a way to enforce its value. Auto-tests accessing qt_qhash_seed directly have been updated accordingly. Usage in qdoc, uic and rcc has been left as is for the time being. Change-Id: I3b35b4fa0223c83b1348a6508641905a2a63266f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index 6da3d06ba8..3022114403 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -259,13 +259,9 @@ void tst_Lancelot::paint(QPaintDevice *device, GraphicsEngine engine, const QStr
QTEST_MAIN(tst_Lancelot)
#undef main
-QT_BEGIN_NAMESPACE
-extern Q_DECL_IMPORT QBasicAtomicInt qt_qhash_seed; // from qhash.cpp
-QT_END_NAMESPACE
-
int main(int argc, char *argv[])
{
- qt_qhash_seed.store(0); // Avoid rendering variations caused by QHash randomization
+ qSetGlobalQHashSeed(0); // Avoid rendering variations caused by QHash randomization
QBaselineTest::handleCmdLineArgs(&argc, &argv);
return _realmain(argc, argv);