1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Simplify version check

This commit is contained in:
Elias Steurer 2019-11-23 11:40:14 +01:00
parent fa3d21df27
commit 1456610bd4
2 changed files with 4 additions and 3 deletions

View File

@ -59,7 +59,7 @@ App::App()
// Init after we have the paths from settings // Init after we have the paths from settings
m_installedListModel->init(); m_installedListModel->init();
#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
// Set visible if the -silent parameter was not set // Set visible if the -silent parameter was not set
if (QGuiApplication::instance()->arguments().contains("-silent")) { if (QGuiApplication::instance()->arguments().contains("-silent")) {
settings()->setSilentStart(true); settings()->setSilentStart(true);

View File

@ -11,6 +11,7 @@
#include <QUrl> #include <QUrl>
#include <QtGlobal> #include <QtGlobal>
#include <qqml.h> #include <qqml.h>
#include <QtGlobal>
#include <QtWebEngine> #include <QtWebEngine>
@ -59,7 +60,7 @@ class App : public QObject {
public: public:
explicit App(); explicit App();
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
static App* instance() static App* instance()
{ {
static App app; static App app;
@ -218,7 +219,7 @@ public slots:
} }
private: private:
#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
unique_ptr<QQmlApplicationEngine> m_mainWindowEngine; unique_ptr<QQmlApplicationEngine> m_mainWindowEngine;
#endif #endif