proper qt version check
This commit is contained in:
parent
32bfaf252c
commit
af4d99aa27
|
@ -22,3 +22,7 @@ zec-qt-wallet_resource*
|
|||
workspace.code-workspace
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.xcsettings
|
||||
.DS_Store
|
||||
*.mak
|
||||
*.plist
|
||||
|
|
|
@ -19,14 +19,17 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
// QRandomGenerator generates a secure random number, which we use to seed.
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
unsigned int seed = QRandomGenerator::securelySeeded().generate();
|
||||
qDebug() << "yes" << QT_VERSION;
|
||||
#else
|
||||
// This will be used only during debugging for compatibility reasons
|
||||
unsigned int seed = std::time(0);
|
||||
qDebug() << "no" << QT_VERSION;
|
||||
#endif
|
||||
std::srand(seed);
|
||||
|
||||
|
||||
Settings::init();
|
||||
Settings::getInstance()->setExecName(argv[0]);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
#include <QRandomGenerator>
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue