Add QT_VERSION_CHECK for QRandomGenerator

This commit is contained in:
Phil Olynyk 2023-02-18 20:18:32 -05:00
parent 651c612eda
commit c61d1508cb

View File

@ -38,7 +38,9 @@
#include <QScreen> #include <QScreen>
#include <QStorageInfo> #include <QStorageInfo>
#include <cmath> #include <cmath>
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#include <QRandomGenerator> #include <QRandomGenerator>
#endif
#include "common_gui.h" #include "common_gui.h"
#include "version.h" #include "version.h"
@ -259,7 +261,11 @@ void MainWindow::SetupGUI()
ui->actionImport_RemStar_MSeries_Data->setVisible(false); ui->actionImport_RemStar_MSeries_Data->setVisible(false);
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QRandomGenerator(QDateTime::currentDateTime().toTime_t()); QRandomGenerator(QDateTime::currentDateTime().toTime_t());
#else
qsrand(QDateTime::currentDateTime().toTime_t());
#endif
QList<int> a; QList<int> a;