Remove some ifdefs regarding 5.9

The one missing QT_VERSION_CHECK was even wrong and triggering
even with Qt 5.15.
This commit is contained in:
Sergio Martins
2021-07-01 16:54:44 +01:00
parent c4ebef1f1e
commit 701df72db6
3 changed files with 1 additions and 25 deletions

View File

@@ -21,9 +21,7 @@
#include <QDebug>
#include <QString>
#include <QTextEdit>
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#include <QRandomGenerator>
#endif
#include <QApplication>
@@ -34,12 +32,7 @@
static MyWidget *newMyWidget()
{
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
const int randomNumber = qrand() % 100 + 1;
#else
const int randomNumber = QRandomGenerator::global()->bounded(0, 100) + 1;
#endif
if (randomNumber < 50) {
if (randomNumber < 33) {
return new MyWidget1();
@@ -62,11 +55,6 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
, m_maxSizeForDockWidget8(maxSizeForDockWidget8)
, m_dockwidget5DoesntCloseBeforeRestore(dockwidget5DoesntCloseBeforeRestore)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
qsrand(time(nullptr));
#endif
// qApp->installEventFilter(this);
auto menubar = menuBar();
auto fileMenu = new QMenu(QStringLiteral("File"));
m_toggleMenu = new QMenu(QStringLiteral("Toggle"));