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:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user