mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-02 16:49:47 +02:00
Add Qt 5.13 support to better investigate the 10 second delay on wallpaper creation
This commit is contained in:
parent
9e0bece2a7
commit
1369e3fc76
@ -33,7 +33,7 @@ Everyone can contribute with code, design, documentation or translation. Visit o
|
||||
# HTTPS
|
||||
git clone --recursive https://gitlab.com/kelteseth/ScreenPlay.git
|
||||
```
|
||||
3. Download the latest __Qt 5.14__. Earlier versions are not supported!
|
||||
3. Download the latest __Qt 5.13__. Earlier versions are not supported!
|
||||
### Windows
|
||||
1. [Download and install MSVC 2019 Community](https://visualstudio.microsoft.com/vs/community/)
|
||||
2. [Download and install Win 10 SDK (debugging support. Not included via the MSVC installer)](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk)
|
||||
@ -41,7 +41,7 @@ git clone --recursive https://gitlab.com/kelteseth/ScreenPlay.git
|
||||
3. [Download and install Qt 5 binary installer from qt.io](https://www.qt.io/download-qt-installer)
|
||||
- Install the Maintaince tool
|
||||
- Select the following features to install:
|
||||
- Qt 5.14.0
|
||||
- Qt 5.13.0
|
||||
- MSVC 2017 64-bit
|
||||
- Qt WebEngine
|
||||
- Developer and Designer Tools
|
||||
@ -68,7 +68,7 @@ sudo zypper install -t pattern devel_basis
|
||||
2. [Download and install Qt 5 binary installer from qt.io](https://www.qt.io/download-qt-installer)
|
||||
- Install the Maintaince tool
|
||||
- Select the following features to install:
|
||||
- Qt 5.14.0
|
||||
- Qt 5.13.0
|
||||
- GCC
|
||||
- Qt WebEngine
|
||||
- Developer and Designer Tools
|
||||
@ -81,7 +81,7 @@ sudo zypper install -t pattern devel_basis
|
||||
3. [Download and install Qt 5 binary installer from qt.io](https://www.qt.io/download-qt-installer)
|
||||
- Install the Maintaince tool
|
||||
- Select the following features to install:
|
||||
- Qt 5.14.0
|
||||
- Qt 5.13.0
|
||||
- Qt WebEngine
|
||||
- Developer and Designer Tools
|
||||
- OpenSSL 1.1.1.c Toolkit
|
||||
|
@ -59,6 +59,7 @@ App::App()
|
||||
// Init after we have the paths from settings
|
||||
m_installedListModel->init();
|
||||
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0)
|
||||
// Set visible if the -silent parameter was not set
|
||||
if (QGuiApplication::instance()->arguments().contains("-silent")) {
|
||||
settings()->setSilentStart(true);
|
||||
@ -67,5 +68,5 @@ App::App()
|
||||
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "ScreenPlay", this);
|
||||
m_mainWindowEngine = make_unique<QQmlApplicationEngine>();
|
||||
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDir>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QObject>
|
||||
#include <QQmlApplicationEngine>
|
||||
@ -10,6 +9,7 @@
|
||||
#include <QQuickWindow>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
#include <qqml.h>
|
||||
|
||||
#include <QtWebEngine>
|
||||
@ -59,6 +59,13 @@ class App : public QObject {
|
||||
public:
|
||||
explicit App();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
static App* instance()
|
||||
{
|
||||
static App app;
|
||||
return &app;
|
||||
}
|
||||
#endif
|
||||
GlobalVariables* globalVariables() const
|
||||
{
|
||||
return m_globalVariables.get();
|
||||
@ -211,7 +218,9 @@ public slots:
|
||||
}
|
||||
|
||||
private:
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0)
|
||||
unique_ptr<QQmlApplicationEngine> m_mainWindowEngine;
|
||||
#endif
|
||||
|
||||
unique_ptr<Create> m_create;
|
||||
unique_ptr<ScreenPlayManager> m_screenPlayManager;
|
||||
|
@ -7,7 +7,23 @@ int main(int argc, char* argv[])
|
||||
QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
|
||||
QGuiApplication qtGuiApp(argc, argv);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
qmlRegisterSingletonType<App>("ScreenPlay", 1, 0, "ScreenPlay", [](QQmlEngine* engine, QJSEngine*) -> QObject* {
|
||||
engine->setObjectOwnership(App::instance(), QQmlEngine::ObjectOwnership::CppOwnership);
|
||||
return App::instance();
|
||||
});
|
||||
QQmlApplicationEngine m_mainWindowEngine;
|
||||
m_mainWindowEngine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
|
||||
// Set visible if the -silent parameter was not set
|
||||
if (QGuiApplication::instance()->arguments().contains("-silent")) {
|
||||
App::instance()->settings()->setSilentStart(true);
|
||||
}
|
||||
|
||||
#else
|
||||
App app;
|
||||
#endif
|
||||
|
||||
return qtGuiApp.exec();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user