Skip to content

Commit

Permalink
Editor: use qSetGlobalQHashSeed with Qt 5.6+
Browse files Browse the repository at this point in the history
qt_qhash_seed is no more exported in recent Qt 5.9.x versions, so use
the public functions for it available since Qt 5.6.

Fixes commit 8b6ea07.
  • Loading branch information
pinotree authored and juzzlin committed Dec 28, 2017
1 parent be14171 commit 1b0f7f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/editor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@
#include <memory>
#include <cstdlib>

#if QT_VERSION < 0x50600
extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
#endif

int main(int argc, char ** argv)
{
#if QT_VERSION >= 0x50600
qSetGlobalQHashSeed(0);
#else
qt_qhash_seed.store(0);
#endif

QApplication::setOrganizationName(Config::Common::QSETTINGS_COMPANY_NAME);
QApplication::setApplicationName(Config::Editor::QSETTINGS_SOFTWARE_NAME);
Expand Down

0 comments on commit 1b0f7f2

Please sign in to comment.