From 01031ba5d80d0a8336b508a46cc28f8e2824fd33 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Thu, 15 Jul 2021 12:07:39 +0200 Subject: [PATCH] Add qt6 support --- CMakeLists.txt | 14 ++-- ScreenPlay/app.h | 5 ++ ScreenPlay/main.cpp | 11 +++- ScreenPlay/main.qml | 6 +- ScreenPlay/qml/Common/Background.qml | 2 +- ScreenPlay/qml/Common/CloseIcon.qml | 2 +- .../qml/Common/Dialogs/CriticalError.qml | 2 +- ScreenPlay/qml/Common/FileSelector.qml | 2 +- ScreenPlay/qml/Common/GrowIconLink.qml | 2 +- ScreenPlay/qml/Common/RippleEffect.qml | 2 +- ScreenPlay/qml/Common/TagSelector.qml | 2 +- ScreenPlay/qml/Common/TextField.qml | 2 +- ScreenPlay/qml/Common/TrayIcon.qml | 6 +- ScreenPlay/qml/Community/Community.qml | 2 +- ScreenPlay/qml/Community/XMLNewsfeed.qml | 24 +++---- ScreenPlay/qml/Create/Create.qml | 2 +- ScreenPlay/qml/Create/Sidebar.qml | 2 +- ScreenPlay/qml/Create/StartInfo.qml | 2 +- ScreenPlay/qml/Create/StartInfoLinkImage.qml | 2 +- ScreenPlay/qml/Create/Wizard.qml | 2 +- .../qml/Create/Wizards/GifWallpaper.qml | 2 +- .../qml/Create/Wizards/HTMLWallpaper.qml | 2 +- ScreenPlay/qml/Create/Wizards/HTMLWidget.qml | 2 +- .../ImportVideoAndConvert/CreateWallpaper.qml | 2 +- .../CreateWallpaperInit.qml | 4 +- .../CreateWallpaperResult.qml | 4 +- .../CreateWallpaperVideoImportConvert.qml | 2 +- .../Create/Wizards/ImportWebm/ImportWebm.qml | 2 +- .../Wizards/ImportWebm/ImportWebmConvert.qml | 2 +- .../Wizards/ImportWebm/ImportWebmInit.qml | 4 +- .../qml/Create/Wizards/QMLWallpaper.qml | 2 +- ScreenPlay/qml/Create/Wizards/QMLWidget.qml | 2 +- .../qml/Create/Wizards/WebsiteWallpaper.qml | 2 +- ScreenPlay/qml/Create/Wizards/WizardPage.qml | 2 +- ScreenPlay/qml/Installed/Installed.qml | 4 +- .../qml/Installed/InstalledWelcomeScreen.qml | 2 +- ScreenPlay/qml/Installed/Navigation.qml | 4 +- ScreenPlay/qml/Installed/ScreenPlayItem.qml | 6 +- ScreenPlay/qml/Installed/Sidebar.qml | 3 +- .../qml/Monitors/DefaultVideoControls.qml | 2 +- ScreenPlay/qml/Monitors/MonitorSelection.qml | 20 +++--- .../qml/Monitors/MonitorSelectionItem.qml | 2 +- ScreenPlay/qml/Monitors/Monitors.qml | 4 +- .../Monitors/MonitorsProjectSettingItem.qml | 4 +- ScreenPlay/qml/Navigation/Navigation.qml | 12 ++-- ScreenPlay/qml/Navigation/NavigationItem.qml | 2 +- .../NavigationWallpaperConfiguration.qml | 2 +- ScreenPlay/qml/Settings/Settings.qml | 14 ++-- ScreenPlay/qml/Settings/SettingsExpander.qml | 2 +- ScreenPlay/qml/Settings/SettingsHeader.qml | 2 +- ScreenPlay/qml/Settings/SettingsPage.qml | 4 +- ScreenPlay/qml/Workshop/Background.qml | 8 +-- ScreenPlay/qml/Workshop/Navigation.qml | 2 +- ScreenPlay/qml/Workshop/PopupOffline.qml | 2 +- ScreenPlay/qml/Workshop/ScreenPlayItem.qml | 4 +- ScreenPlay/qml/Workshop/Sidebar.qml | 2 +- ScreenPlay/qml/Workshop/SteamProfile.qml | 2 +- ScreenPlay/qml/Workshop/SteamWorkshop.qml | 2 +- ScreenPlay/qml/Workshop/Workshop.qml | 2 +- ScreenPlay/qml/Workshop/WorkshopInstalled.qml | 4 +- ScreenPlay/qml/Workshop/WorkshopItem.qml | 2 +- .../Workshop/upload/UploadProjectBigItem.qml | 2 +- .../qml/Workshop/upload/UploadProjectItem.qml | 2 +- ScreenPlay/src/createimportvideo.cpp | 2 +- ScreenPlay/src/globalvariables.cpp | 2 +- ScreenPlay/src/installedlistfilter.h | 2 +- ScreenPlay/src/settings.h | 4 +- ScreenPlay/src/util.cpp | 9 ++- ScreenPlay/translations/ScreenPlay_zh_cn.qm | Bin 33554 -> 33701 bytes ScreenPlayShader/shaderlibrary.cpp | 2 + ScreenPlayUtil/src/util.cpp | 4 +- ScreenPlayWallpaper/CMakeLists.txt | 6 +- ScreenPlayWallpaper/MultimediaView.qml | 21 ++++++ ScreenPlayWallpaper/SPWResources.qrc | 1 + ScreenPlayWallpaper/Test.qml | 60 ++++++++++-------- ScreenPlayWallpaper/Wallpaper.qml | 2 +- .../kde/ScreenPlay/contents/ui/config.qml | 2 +- .../kde/ScreenPlay/contents/ui/main.qml | 2 +- ScreenPlayWallpaper/main.cpp | 13 +++- ScreenPlayWallpaper/src/basewindow.cpp | 1 - ScreenPlayWallpaper/src/winwindow.cpp | 10 ++- 81 files changed, 229 insertions(+), 165 deletions(-) create mode 100644 ScreenPlayWallpaper/MultimediaView.qml diff --git a/CMakeLists.txt b/CMakeLists.txt index 2662c813..c8e5fdab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,12 +79,8 @@ if(WIN32) add_subdirectory(ScreenPlaySysInfo) endif() -#if(APPLE) -#add_custom_target(CopyDependencies DEPENDS ScreenPlay) -#add_custom_command(TARGET CopyDependencies POST_BUILD -# COMMAND "ScreenPlayWallpaper" -E copy_directory -# "$" -# "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/$/" -# COMMENT "Copying into ScreenPlay.app bundle") -#endif() - +message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}") +message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}") +message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}") +message(STATUS "[PROJECT] QT_VERSION_MAJOR = ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH} ") +message(STATUS "[PROJECT] Qt6_FOUND = ${Qt6_FOUND}") diff --git a/ScreenPlay/app.h b/ScreenPlay/app.h index 6091ba9e..fd6e9053 100644 --- a/ScreenPlay/app.h +++ b/ScreenPlay/app.h @@ -47,7 +47,12 @@ #include #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include +#else +#include +#endif + #include #include "src/create.h" diff --git a/ScreenPlay/main.cpp b/ScreenPlay/main.cpp index 074f0453..423d03d3 100644 --- a/ScreenPlay/main.cpp +++ b/ScreenPlay/main.cpp @@ -36,7 +36,14 @@ #include #include #include -#include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#include +#else +#include +#endif + + + #include #define DOCTEST_CONFIG_IMPLEMENT #define DOCTEST_CONFIG_SUPER_FAST_ASSERTS @@ -44,8 +51,10 @@ int main(int argc, char* argv[]) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QtWebEngine::initialize(); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QApplication qtGuiApp(argc, argv); diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml index e47ac1ca..4bcd203a 100644 --- a/ScreenPlay/main.qml +++ b/ScreenPlay/main.qml @@ -3,9 +3,9 @@ import QtQuick.Window 2.2 import QtQuick.Controls 2.3 import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.3 -import QtGraphicalEffects 1.0 import ScreenPlay 1.0 import Settings 1.0 +import Qt5Compat.GraphicalEffects import "qml/Monitors" as Monitors import "qml/Common" as Common import "qml/Common/Dialogs" as Dialogs @@ -35,7 +35,7 @@ ApplicationWindow { if (nav.currentNavigationName === name) { if (name === "Installed") ScreenPlay.installedListModel.reset(); - + return } stackView.replace("qrc:/qml/" + name + "/" + name + ".qml"); sidebar.state = "inactive"; @@ -186,7 +186,7 @@ ApplicationWindow { Navigation.Navigation { id: nav - onChangePage: { + onChangePage: (name)=> { monitors.close(); switchPage(name); } diff --git a/ScreenPlay/qml/Common/Background.qml b/ScreenPlay/qml/Common/Background.qml index 70b5527f..955bd7c2 100644 --- a/ScreenPlay/qml/Common/Background.qml +++ b/ScreenPlay/qml/Common/Background.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls.Material 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Particles 2.0 Rectangle { diff --git a/ScreenPlay/qml/Common/CloseIcon.qml b/ScreenPlay/qml/Common/CloseIcon.qml index 91f70e17..fb9f61b9 100644 --- a/ScreenPlay/qml/Common/CloseIcon.qml +++ b/ScreenPlay/qml/Common/CloseIcon.qml @@ -1,5 +1,5 @@ import QtQuick 2.14 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.3 /*! diff --git a/ScreenPlay/qml/Common/Dialogs/CriticalError.qml b/ScreenPlay/qml/Common/Dialogs/CriticalError.qml index abfa7826..71fa78ab 100644 --- a/ScreenPlay/qml/Common/Dialogs/CriticalError.qml +++ b/ScreenPlay/qml/Common/Dialogs/CriticalError.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 import QtQuick.Controls.Material 2.12 import QtQuick.Window 2.2 -import QtGraphicalEffects 1.15 +import Qt5Compat.GraphicalEffects import ScreenPlay 1.0 Dialog { diff --git a/ScreenPlay/qml/Common/FileSelector.qml b/ScreenPlay/qml/Common/FileSelector.qml index fb2eb635..0ca66722 100644 --- a/ScreenPlay/qml/Common/FileSelector.qml +++ b/ScreenPlay/qml/Common/FileSelector.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 -import QtQuick.Dialogs 1.2 +import Qt.labs.platform 1.1 import ScreenPlay 1.0 /*! diff --git a/ScreenPlay/qml/Common/GrowIconLink.qml b/ScreenPlay/qml/Common/GrowIconLink.qml index 484a8631..3c07ccdd 100644 --- a/ScreenPlay/qml/Common/GrowIconLink.qml +++ b/ScreenPlay/qml/Common/GrowIconLink.qml @@ -1,5 +1,5 @@ import QtQuick 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.12 Rectangle { diff --git a/ScreenPlay/qml/Common/RippleEffect.qml b/ScreenPlay/qml/Common/RippleEffect.qml index 95c7833f..a109780e 100644 --- a/ScreenPlay/qml/Common/RippleEffect.qml +++ b/ScreenPlay/qml/Common/RippleEffect.qml @@ -5,7 +5,7 @@ */ import QtQuick 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.12 Item { diff --git a/ScreenPlay/qml/Common/TagSelector.qml b/ScreenPlay/qml/Common/TagSelector.qml index 4411e79f..3be4ebaf 100644 --- a/ScreenPlay/qml/Common/TagSelector.qml +++ b/ScreenPlay/qml/Common/TagSelector.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.12 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Common/TextField.qml b/ScreenPlay/qml/Common/TextField.qml index ff916f4e..d45d6eec 100644 --- a/ScreenPlay/qml/Common/TextField.qml +++ b/ScreenPlay/qml/Common/TextField.qml @@ -2,7 +2,7 @@ import QtQuick 2.14 import QtQuick.Window 2.14 import QtQuick.Controls.Material 2.14 import QtQuick.Controls 2.14 as QQC -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Layouts 1.14 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Common/TrayIcon.qml b/ScreenPlay/qml/Common/TrayIcon.qml index b3f3d16b..c9e60406 100644 --- a/ScreenPlay/qml/Common/TrayIcon.qml +++ b/ScreenPlay/qml/Common/TrayIcon.qml @@ -1,14 +1,14 @@ import QtQuick 2.0 -import Qt.labs.platform 1.0 +import Qt.labs.platform 1.1 import ScreenPlay 1.0 SystemTrayIcon { id: root visible: true - iconSource: "qrc:/assets/icons/app.ico" + icon.source: "qrc:/assets/icons/app.ico" tooltip: qsTr("ScreenPlay - Double click to change you settings.") - onActivated: { + onActivated: (reason)=>{ switch (reason) { case SystemTrayIcon.Unknown: break; diff --git a/ScreenPlay/qml/Community/Community.qml b/ScreenPlay/qml/Community/Community.qml index fa1dd970..d2e9b473 100644 --- a/ScreenPlay/qml/Community/Community.qml +++ b/ScreenPlay/qml/Community/Community.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.14 import QtQuick.Controls.Material 2.14 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Layouts 1.3 import ScreenPlay 1.0 import QtWebEngine 1.8 diff --git a/ScreenPlay/qml/Community/XMLNewsfeed.qml b/ScreenPlay/qml/Community/XMLNewsfeed.qml index 05f42e4b..b19e8766 100644 --- a/ScreenPlay/qml/Community/XMLNewsfeed.qml +++ b/ScreenPlay/qml/Community/XMLNewsfeed.qml @@ -1,9 +1,9 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 import QtQuick.Controls.Material 2.2 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Layouts 1.3 -import QtQuick.XmlListModel 2.12 +import QtQml.XmlListModel import ScreenPlay 1.0 Item { @@ -34,29 +34,29 @@ Item { source: "https://screen-play.app/blog/index.xml" query: "/rss/channel/item" - XmlRole { + XmlListModelRole { name: "title" - query: "title/string()" + elementName: "title" } - XmlRole { + XmlListModelRole { name: "image" - query: "image/string()" + elementName: "image" } - XmlRole { + XmlListModelRole { name: "pubDate" - query: "pubDate/string()" + elementName: "pubDate" } - XmlRole { + XmlListModelRole { name: "link" - query: "link/string()" + elementName: "link" } - XmlRole { + XmlListModelRole { name: "description" - query: "description/string()" + elementName: "description" } } diff --git a/ScreenPlay/qml/Create/Create.qml b/ScreenPlay/qml/Create/Create.qml index 28d34e07..9a963522 100644 --- a/ScreenPlay/qml/Create/Create.qml +++ b/ScreenPlay/qml/Create/Create.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.12 import QtQuick.Controls.Material 2.12 import QtQuick.Particles 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import ScreenPlay.Create 1.0 diff --git a/ScreenPlay/qml/Create/Sidebar.qml b/ScreenPlay/qml/Create/Sidebar.qml index 1cd64fb1..39fc536c 100644 --- a/ScreenPlay/qml/Create/Sidebar.qml +++ b/ScreenPlay/qml/Create/Sidebar.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.12 import QtQuick.Controls.Material 2.12 import QtQuick.Particles 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import ScreenPlay.Create 1.0 diff --git a/ScreenPlay/qml/Create/StartInfo.qml b/ScreenPlay/qml/Create/StartInfo.qml index 6b14d0d8..65fdef35 100644 --- a/ScreenPlay/qml/Create/StartInfo.qml +++ b/ScreenPlay/qml/Create/StartInfo.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.12 import QtQuick.Layouts 1.15 import QtQuick.Controls.Material 2.12 import QtQuick.Particles 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import ScreenPlay.Create 1.0 diff --git a/ScreenPlay/qml/Create/StartInfoLinkImage.qml b/ScreenPlay/qml/Create/StartInfoLinkImage.qml index 43bc3185..65c6d3e0 100644 --- a/ScreenPlay/qml/Create/StartInfoLinkImage.qml +++ b/ScreenPlay/qml/Create/StartInfoLinkImage.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.12 import QtQuick.Layouts 1.15 import QtQuick.Controls.Material 2.12 import QtQuick.Particles 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import ScreenPlay.Create 1.0 diff --git a/ScreenPlay/qml/Create/Wizard.qml b/ScreenPlay/qml/Create/Wizard.qml index d3f9bd55..6362805d 100644 --- a/ScreenPlay/qml/Create/Wizard.qml +++ b/ScreenPlay/qml/Create/Wizard.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.3 diff --git a/ScreenPlay/qml/Create/Wizards/GifWallpaper.qml b/ScreenPlay/qml/Create/Wizards/GifWallpaper.qml index 268c60e4..f3912f40 100644 --- a/ScreenPlay/qml/Create/Wizards/GifWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/GifWallpaper.qml @@ -2,7 +2,7 @@ import QtQuick 2.14 import QtQuick.Controls.Material 2.14 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 -import QtQuick.Dialogs 1.2 +import Qt.labs.platform 1.1 import ScreenPlay 1.0 import "../../Common" as Common diff --git a/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml b/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml index 91126059..dbe77d13 100644 --- a/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/HTMLWidget.qml b/ScreenPlay/qml/Create/Wizards/HTMLWidget.qml index 28d2772e..0c8084b5 100644 --- a/ScreenPlay/qml/Create/Wizards/HTMLWidget.qml +++ b/ScreenPlay/qml/Create/Wizards/HTMLWidget.qml @@ -2,7 +2,7 @@ import QtQuick 2.14 import QtQuick.Controls.Material 2.14 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 -import QtQuick.Dialogs 1.2 + import ScreenPlay 1.0 import "../../Common" as Common diff --git a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml index 42a25037..e764e8aa 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperInit.qml b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperInit.qml index 00dda2ca..8129cc2d 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperInit.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperInit.qml @@ -1,9 +1,9 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 -import QtQuick.Dialogs 1.3 +import Qt.labs.platform 1.1 import ScreenPlay 1.0 import ScreenPlay.Create 1.0 import "../../../Common" as Common diff --git a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperResult.qml b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperResult.qml index bd78042a..1f2bb31c 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperResult.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperResult.qml @@ -2,8 +2,8 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Controls.Material 2.14 import QtQuick.Layouts 1.14 -import QtQuick.Dialogs 1.2 -import QtGraphicalEffects 1.0 + +import Qt5Compat.GraphicalEffects import ScreenPlay 1.0 import ScreenPlay.Create 1.0 diff --git a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperVideoImportConvert.qml b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperVideoImportConvert.qml index 63a0701d..dcd2b934 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperVideoImportConvert.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperVideoImportConvert.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebm.qml b/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebm.qml index aee8a7b9..82dbc2b7 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebm.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebm.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml b/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml index 0d15579b..de671188 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmInit.qml b/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmInit.qml index c1e1fe6c..e42b071f 100644 --- a/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmInit.qml +++ b/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebmInit.qml @@ -1,9 +1,9 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 -import QtQuick.Dialogs 1.3 +import Qt.labs.platform 1.1 import ScreenPlay 1.0 import ScreenPlay.Create 1.0 import "../../../Common" as Common diff --git a/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml b/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml index 94f8fd5a..557d351d 100644 --- a/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/QMLWidget.qml b/ScreenPlay/qml/Create/Wizards/QMLWidget.qml index 4b74f622..b2bcffde 100644 --- a/ScreenPlay/qml/Create/Wizards/QMLWidget.qml +++ b/ScreenPlay/qml/Create/Wizards/QMLWidget.qml @@ -2,7 +2,7 @@ import QtQuick 2.14 import QtQuick.Controls.Material 2.14 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 -import QtQuick.Dialogs 1.2 + import ScreenPlay 1.0 import "../../Common" as Common diff --git a/ScreenPlay/qml/Create/Wizards/WebsiteWallpaper.qml b/ScreenPlay/qml/Create/Wizards/WebsiteWallpaper.qml index 090a90ee..4c384368 100644 --- a/ScreenPlay/qml/Create/Wizards/WebsiteWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/WebsiteWallpaper.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Create/Wizards/WizardPage.qml b/ScreenPlay/qml/Create/Wizards/WizardPage.qml index c1439d80..5d75e277 100644 --- a/ScreenPlay/qml/Create/Wizards/WizardPage.qml +++ b/ScreenPlay/qml/Create/Wizards/WizardPage.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.15 import QtQuick.Controls.Material 2.3 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Installed/Installed.qml b/ScreenPlay/qml/Installed/Installed.qml index 8aa27ab4..a897b143 100644 --- a/ScreenPlay/qml/Installed/Installed.qml +++ b/ScreenPlay/qml/Installed/Installed.qml @@ -1,8 +1,8 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Styles 1.4 -import QtGraphicalEffects 1.0 +import QtQuick.Controls +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import ScreenPlay.Enums.InstalledType 1.0 diff --git a/ScreenPlay/qml/Installed/InstalledWelcomeScreen.qml b/ScreenPlay/qml/Installed/InstalledWelcomeScreen.qml index acf9be02..dd4d327d 100644 --- a/ScreenPlay/qml/Installed/InstalledWelcomeScreen.qml +++ b/ScreenPlay/qml/Installed/InstalledWelcomeScreen.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls import QtQuick.Controls.Material 2.2 import ScreenPlay 1.0 import "../Common" diff --git a/ScreenPlay/qml/Installed/Navigation.qml b/ScreenPlay/qml/Installed/Navigation.qml index 8ea2472c..69bf0baa 100644 --- a/ScreenPlay/qml/Installed/Navigation.qml +++ b/ScreenPlay/qml/Installed/Navigation.qml @@ -1,8 +1,8 @@ import QtQuick 2.0 import QtQuick.Controls 2.14 import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Styles 1.4 -import QtGraphicalEffects 1.0 +import QtQuick.Controls +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import ScreenPlay.Enums.InstalledType 1.0 diff --git a/ScreenPlay/qml/Installed/ScreenPlayItem.qml b/ScreenPlay/qml/Installed/ScreenPlayItem.qml index 34ba94dc..7bcfb9ae 100644 --- a/ScreenPlay/qml/Installed/ScreenPlayItem.qml +++ b/ScreenPlay/qml/Installed/ScreenPlayItem.qml @@ -1,8 +1,8 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls import ScreenPlay 1.0 import ScreenPlay.Enums.InstalledType 1.0 import "../Common/Util.js" as JSUtil @@ -212,7 +212,7 @@ Item { screenPlayItemImage.state = "loaded"; screenPlayItemImage.exit(); } - onClicked: { + onClicked: (mouse)=> { if (mouse.button === Qt.LeftButton) ScreenPlay.util.setSidebarItem(root.screenId, root.type); else if (mouse.button === Qt.RightButton) diff --git a/ScreenPlay/qml/Installed/Sidebar.qml b/ScreenPlay/qml/Installed/Sidebar.qml index 77ba257e..71a04fc2 100644 --- a/ScreenPlay/qml/Installed/Sidebar.qml +++ b/ScreenPlay/qml/Installed/Sidebar.qml @@ -1,7 +1,6 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.12 -import QtQuick.Extras 1.4 import QtQuick.Layouts 1.12 import QtQuick.Controls.Material 2.12 import QtQuick.Controls.Material.impl 2.12 diff --git a/ScreenPlay/qml/Monitors/DefaultVideoControls.qml b/ScreenPlay/qml/Monitors/DefaultVideoControls.qml index cb885fe5..18a91324 100644 --- a/ScreenPlay/qml/Monitors/DefaultVideoControls.qml +++ b/ScreenPlay/qml/Monitors/DefaultVideoControls.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.2 import QtQuick.Layouts 1.3 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Monitors/MonitorSelection.qml b/ScreenPlay/qml/Monitors/MonitorSelection.qml index 967b0225..c5324762 100644 --- a/ScreenPlay/qml/Monitors/MonitorSelection.qml +++ b/ScreenPlay/qml/Monitors/MonitorSelection.qml @@ -1,6 +1,6 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 import ScreenPlay 1.0 @@ -168,15 +168,15 @@ Rectangle { } - layer.effect: InnerShadow { - cached: true - fast: true - smooth: true - radius: 32 - spread: 0.8 - verticalOffset: 3 - color: "#55000000" - } +// layer.effect: InnerShadow { +// cached: true +// fast: true +// smooth: true +// radius: 32 +// spread: 0.8 +// verticalOffset: 3 +// color: "#55000000" +// } // Width of the Sidebar or Space that should be used } diff --git a/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml b/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml index 33f8ceb0..bdb52732 100644 --- a/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml +++ b/ScreenPlay/qml/Monitors/MonitorSelectionItem.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.12 import ScreenPlay 1.0 import ScreenPlay.Enums.InstalledType 1.0 diff --git a/ScreenPlay/qml/Monitors/Monitors.qml b/ScreenPlay/qml/Monitors/Monitors.qml index f0a998d2..6517fdb8 100644 --- a/ScreenPlay/qml/Monitors/Monitors.qml +++ b/ScreenPlay/qml/Monitors/Monitors.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.2 import QtQuick.Layouts 1.3 import QtQuick.Controls.Material.impl 2.12 @@ -83,7 +83,7 @@ Popup { monitorWithoutContentSelectable: false availableWidth: width - 20 availableHeight: 150 - onRequestProjectSettings: { + function onRequestProjectSettings() { if (installedType === InstalledType.VideoWallpaper) { videoControlWrapper.state = "visible"; customPropertiesGridView.visible = false; diff --git a/ScreenPlay/qml/Monitors/MonitorsProjectSettingItem.qml b/ScreenPlay/qml/Monitors/MonitorsProjectSettingItem.qml index ef65acd6..7bc181d3 100644 --- a/ScreenPlay/qml/Monitors/MonitorsProjectSettingItem.qml +++ b/ScreenPlay/qml/Monitors/MonitorsProjectSettingItem.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 -import QtGraphicalEffects 1.0 -import QtQuick.Dialogs 1.2 +import Qt5Compat.GraphicalEffects +import Qt.labs.platform 1.1 import QtQuick.Controls.Material 2.2 import QtQuick.Layouts 1.3 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Navigation/Navigation.qml b/ScreenPlay/qml/Navigation/Navigation.qml index 274b25dd..716d59eb 100644 --- a/ScreenPlay/qml/Navigation/Navigation.qml +++ b/ScreenPlay/qml/Navigation/Navigation.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import ScreenPlay 1.0 import "../Workshop" @@ -79,7 +79,7 @@ Rectangle { state: "inactive" name: "Create" iconSource: "qrc:/assets/icons/icon_plus.svg" - onPageClicked: root.onPageChanged(name) + onPageClicked: (name)=> {root.onPageChanged(name)} } NavigationItem { @@ -88,7 +88,7 @@ Rectangle { state: "inactive" name: "Workshop" iconSource: "qrc:/assets/icons/icon_steam.svg" - onPageClicked: root.onPageChanged(name) + onPageClicked: (name)=> {root.onPageChanged(name)} } NavigationItem { @@ -98,7 +98,7 @@ Rectangle { name: "Installed" amount: ScreenPlay.installedListModel.count iconSource: "qrc:/assets/icons/icon_installed.svg" - onPageClicked: root.onPageChanged(name) + onPageClicked: (name)=> {root.onPageChanged(name)} } NavigationItem { @@ -107,7 +107,7 @@ Rectangle { state: "inactive" name: "Community" iconSource: "qrc:/assets/icons/icon_community.svg" - onPageClicked: root.onPageChanged(name) + onPageClicked: (name)=> {root.onPageChanged(name)} } NavigationItem { @@ -116,7 +116,7 @@ Rectangle { state: "inactive" name: "Settings" iconSource: "qrc:/assets/icons/icon_settings.svg" - onPageClicked: root.onPageChanged(name) + onPageClicked: (name)=> {root.onPageChanged(name)} } } diff --git a/ScreenPlay/qml/Navigation/NavigationItem.qml b/ScreenPlay/qml/Navigation/NavigationItem.qml index 69aa3ace..8e819dd9 100644 --- a/ScreenPlay/qml/Navigation/NavigationItem.qml +++ b/ScreenPlay/qml/Navigation/NavigationItem.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.12 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml b/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml index 92ac31a4..08fa5f1d 100644 --- a/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml +++ b/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 import QtQuick.Controls.Material 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import ScreenPlay 1.0 import "../Common" diff --git a/ScreenPlay/qml/Settings/Settings.qml b/ScreenPlay/qml/Settings/Settings.qml index b1897944..8a481ad7 100644 --- a/ScreenPlay/qml/Settings/Settings.qml +++ b/ScreenPlay/qml/Settings/Settings.qml @@ -1,9 +1,9 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Controls.Material 2.12 -import QtQuick.Dialogs 1.3 +import Qt.labs.platform 1.1 import QtQuick.Layouts 1.3 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import ScreenPlay 1.0 import ScreenPlay.Enums.FillMode 1.0 import Settings 1.0 @@ -72,7 +72,7 @@ Item { headline: qsTr("Autostart") description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.") isChecked: ScreenPlay.settings.autostart - onCheckboxChanged: { + onCheckboxChanged: (checked) => { ScreenPlay.settings.setAutostart(checked); } } @@ -98,7 +98,7 @@ Item { headline: qsTr("Send anonymous crash reports and statistics") description: qsTr("Help us make ScreenPlay faster and more stable. All collected data is purely anonymous and only used for development purposes! We use sentry.io to collect and analyze this data. A big thanks to them for providing us with free premium support for open source projects!") isChecked: ScreenPlay.settings.anonymousTelemetry - onCheckboxChanged: { + onCheckboxChanged: (checked) => { ScreenPlay.settings.setAnonymousTelemetry(checked); } } @@ -121,10 +121,8 @@ Item { folderDialogSaveLocation.open(); } - FileDialog { + FolderDialog { id: folderDialogSaveLocation - - selectFolder: true folder: ScreenPlay.globalVariables.localStoragePath onAccepted: { ScreenPlay.settings.setLocalStoragePath(folderDialogSaveLocation.fileUrls[0]); @@ -262,7 +260,7 @@ Item { headline: qsTr("Pause wallpaper video rendering while another app is in the foreground") description: qsTr("We disable the video rendering (not the audio!) for the best performance. If you have problem you can disable this behaviour here. Wallpaper restart required!") isChecked: ScreenPlay.settings.checkWallpaperVisible - onCheckboxChanged: { + onCheckboxChanged: (checked) =>{ ScreenPlay.settings.setCheckWallpaperVisible(checked); } } diff --git a/ScreenPlay/qml/Settings/SettingsExpander.qml b/ScreenPlay/qml/Settings/SettingsExpander.qml index 5fb33ad6..780f8612 100644 --- a/ScreenPlay/qml/Settings/SettingsExpander.qml +++ b/ScreenPlay/qml/Settings/SettingsExpander.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 -import QtQuick.Dialogs 1.2 + import QtQuick.Layouts 1.12 import QtQuick.Controls.Material 2.2 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Settings/SettingsHeader.qml b/ScreenPlay/qml/Settings/SettingsHeader.qml index 9e1437e2..c4d80f52 100644 --- a/ScreenPlay/qml/Settings/SettingsHeader.qml +++ b/ScreenPlay/qml/Settings/SettingsHeader.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import ScreenPlay 1.0 Item { diff --git a/ScreenPlay/qml/Settings/SettingsPage.qml b/ScreenPlay/qml/Settings/SettingsPage.qml index c2567a21..21a0afa6 100644 --- a/ScreenPlay/qml/Settings/SettingsPage.qml +++ b/ScreenPlay/qml/Settings/SettingsPage.qml @@ -1,9 +1,9 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Controls.Material 2.12 -import QtQuick.Dialogs 1.2 + import QtQuick.Layouts 1.3 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 Page { diff --git a/ScreenPlay/qml/Workshop/Background.qml b/ScreenPlay/qml/Workshop/Background.qml index 6c23240c..0970a2db 100644 --- a/ScreenPlay/qml/Workshop/Background.qml +++ b/ScreenPlay/qml/Workshop/Background.qml @@ -1,5 +1,5 @@ import QtQuick 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import Workshop 1.0 Rectangle { @@ -36,7 +36,7 @@ Rectangle { id: bgImage height: bgImage.sourceSize.height - fillMode: Image.PreserveAspectCrop + //fillMode: Image.PreserveAspectCrop opacity: 0 source: root.backgroundImage @@ -75,15 +75,13 @@ Rectangle { } - MaskedBlur { + FastBlur { id: blur anchors.fill: bgImage source: bgImage - maskSource: maskSource radius: 16 cached: true - samples: 24 opacity: 0 } diff --git a/ScreenPlay/qml/Workshop/Navigation.qml b/ScreenPlay/qml/Workshop/Navigation.qml index ac19f25e..559a400e 100644 --- a/ScreenPlay/qml/Workshop/Navigation.qml +++ b/ScreenPlay/qml/Workshop/Navigation.qml @@ -1,7 +1,7 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Controls.Material 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material.impl 2.12 import Workshop 1.0 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Workshop/PopupOffline.qml b/ScreenPlay/qml/Workshop/PopupOffline.qml index f6c0167c..cc5936e1 100644 --- a/ScreenPlay/qml/Workshop/PopupOffline.qml +++ b/ScreenPlay/qml/Workshop/PopupOffline.qml @@ -1,7 +1,7 @@ import QtQuick 2.0 import QtQuick.Controls 2.13 import QtQuick.Controls.Material 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import Workshop 1.0 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Workshop/ScreenPlayItem.qml b/ScreenPlay/qml/Workshop/ScreenPlayItem.qml index 09108085..ba72fa97 100644 --- a/ScreenPlay/qml/Workshop/ScreenPlayItem.qml +++ b/ScreenPlay/qml/Workshop/ScreenPlayItem.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls Item { id: screenPlayItem diff --git a/ScreenPlay/qml/Workshop/Sidebar.qml b/ScreenPlay/qml/Workshop/Sidebar.qml index e970dba4..8b90138a 100644 --- a/ScreenPlay/qml/Workshop/Sidebar.qml +++ b/ScreenPlay/qml/Workshop/Sidebar.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.3 import QtQuick.Layouts 1.11 import QtWebEngine 1.8 diff --git a/ScreenPlay/qml/Workshop/SteamProfile.qml b/ScreenPlay/qml/Workshop/SteamProfile.qml index d7468f41..456b9021 100644 --- a/ScreenPlay/qml/Workshop/SteamProfile.qml +++ b/ScreenPlay/qml/Workshop/SteamProfile.qml @@ -1,7 +1,7 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Controls.Material 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Layouts 1.12 import Workshop 1.0 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Workshop/SteamWorkshop.qml b/ScreenPlay/qml/Workshop/SteamWorkshop.qml index cd056192..076a51ee 100644 --- a/ScreenPlay/qml/Workshop/SteamWorkshop.qml +++ b/ScreenPlay/qml/Workshop/SteamWorkshop.qml @@ -1,7 +1,7 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Controls.Material 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Layouts 1.12 import Workshop 1.0 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Workshop/Workshop.qml b/ScreenPlay/qml/Workshop/Workshop.qml index 464bd60d..7f13c2f5 100644 --- a/ScreenPlay/qml/Workshop/Workshop.qml +++ b/ScreenPlay/qml/Workshop/Workshop.qml @@ -1,7 +1,7 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Controls.Material 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Layouts 1.12 import Workshop 1.0 import ScreenPlay 1.0 diff --git a/ScreenPlay/qml/Workshop/WorkshopInstalled.qml b/ScreenPlay/qml/Workshop/WorkshopInstalled.qml index a77318a1..5562750d 100644 --- a/ScreenPlay/qml/Workshop/WorkshopInstalled.qml +++ b/ScreenPlay/qml/Workshop/WorkshopInstalled.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 -import QtGraphicalEffects 1.0 +import QtQuick.Controls +import Qt5Compat.GraphicalEffects import Workshop 1.0 as SP Item { diff --git a/ScreenPlay/qml/Workshop/WorkshopItem.qml b/ScreenPlay/qml/Workshop/WorkshopItem.qml index 2aa85e82..e16d96f0 100644 --- a/ScreenPlay/qml/Workshop/WorkshopItem.qml +++ b/ScreenPlay/qml/Workshop/WorkshopItem.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.3 import QtQuick.Controls.Material 2.2 import Workshop 1.0 diff --git a/ScreenPlay/qml/Workshop/upload/UploadProjectBigItem.qml b/ScreenPlay/qml/Workshop/upload/UploadProjectBigItem.qml index 736dc107..a48dfab9 100644 --- a/ScreenPlay/qml/Workshop/upload/UploadProjectBigItem.qml +++ b/ScreenPlay/qml/Workshop/upload/UploadProjectBigItem.qml @@ -1,5 +1,5 @@ import QtQuick 2.12 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls 2.3 import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.12 diff --git a/ScreenPlay/qml/Workshop/upload/UploadProjectItem.qml b/ScreenPlay/qml/Workshop/upload/UploadProjectItem.qml index cf92aa55..c907c13f 100644 --- a/ScreenPlay/qml/Workshop/upload/UploadProjectItem.qml +++ b/ScreenPlay/qml/Workshop/upload/UploadProjectItem.qml @@ -1,6 +1,6 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls.Material.impl 2.12 diff --git a/ScreenPlay/src/createimportvideo.cpp b/ScreenPlay/src/createimportvideo.cpp index 2e0cb1ab..dc4489c3 100644 --- a/ScreenPlay/src/createimportvideo.cpp +++ b/ScreenPlay/src/createimportvideo.cpp @@ -584,7 +584,7 @@ bool CreateImportVideo::createWallpaperVideo() if (tmpOut.contains("Conversion failed!")) { emit createWallpaperStateChanged(ImportVideoState::ConvertingVideoError); } - const auto tmpList = tmpOut.split(QRegExp("\\s+"), Qt::SplitBehaviorFlags::SkipEmptyParts); + const auto tmpList = tmpOut.split(QRegularExpression("\\s+"), Qt::SplitBehaviorFlags::SkipEmptyParts); if (tmpList.length() > 2) { bool ok = false; diff --git a/ScreenPlay/src/globalvariables.cpp b/ScreenPlay/src/globalvariables.cpp index 9c178278..b60d85de 100644 --- a/ScreenPlay/src/globalvariables.cpp +++ b/ScreenPlay/src/globalvariables.cpp @@ -14,7 +14,7 @@ namespace ScreenPlay { ScreenPlay::GlobalVariables::GlobalVariables(QObject* parent) : QObject(parent) { - setLocalSettingsPath(QUrl { QStandardPaths::writableLocation(QStandardPaths::DataLocation) }); + setLocalSettingsPath(QUrl { QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) }); } } diff --git a/ScreenPlay/src/installedlistfilter.h b/ScreenPlay/src/installedlistfilter.h index f0bafe58..ba4c9bb0 100644 --- a/ScreenPlay/src/installedlistfilter.h +++ b/ScreenPlay/src/installedlistfilter.h @@ -34,7 +34,7 @@ #pragma once -#include +#include #include #include diff --git a/ScreenPlay/src/settings.h b/ScreenPlay/src/settings.h index 2ca8ec6f..efb7a291 100644 --- a/ScreenPlay/src/settings.h +++ b/ScreenPlay/src/settings.h @@ -217,13 +217,15 @@ public slots: QFile settingsPlist(homePath + "/Library/LaunchAgents/" + plistFileName); if (settingsPlist.exists()) { if(!settingsPlist.remove()){ - qCritical() << "Unable to remove: " << settingsPlist; + qCritical() << "Unable to remove: " << settingsPlist.fileName(); } } settingsPlist.open(QIODevice::WriteOnly | QIODevice::Truncate); QTextStream out(&settingsPlist); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) out.setCodec("UTF-8"); +#endif out << settingsPlistContent; settingsPlist.flush(); settingsPlist.close(); diff --git a/ScreenPlay/src/util.cpp b/ScreenPlay/src/util.cpp index b9968c68..52128e5c 100644 --- a/ScreenPlay/src/util.cpp +++ b/ScreenPlay/src/util.cpp @@ -63,7 +63,9 @@ bool Util::writeJsonObjectToFile(const QString& absoluteFilePath, const QJsonObj } QTextStream out(&configTmp); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) out.setCodec("UTF-8"); +#endif out << QJsonDocument(object).toJson(); configTmp.close(); @@ -253,7 +255,9 @@ bool Util::writeSettings(const QJsonObject& obj, const QString& absolutePath) } QTextStream out(&file); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) out.setCodec("UTF-8"); +#endif QJsonDocument doc(obj); out << doc.toJson(); @@ -274,8 +278,9 @@ bool Util::writeFile(const QString& text, const QString& absolutePath) } QTextStream out(&file); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) out.setCodec("UTF-8"); - +#endif out << text; file.close(); @@ -295,7 +300,9 @@ bool Util::writeFileFromQrc(const QString& qrcPath, const QString& absolutePath) } QTextStream out(&file); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) out.setCodec("UTF-8"); +#endif QFile qrc(qrcPath); qrc.open(QIODevice::ReadOnly); diff --git a/ScreenPlay/translations/ScreenPlay_zh_cn.qm b/ScreenPlay/translations/ScreenPlay_zh_cn.qm index 6aced98da07c3c45cdc1aa220ae0215a29fdaff0..acb768713faa81f9cc26b3cc7270ddc2e910306d 100644 GIT binary patch delta 3475 zcmYLLcUV++7QOS@%)EJT2Bira7!5=L!%EYrC>W8ZGyw&qNK-&Ss>Zd9ji|9RqNr$s zLa?ADU}25&#RRd$keGlP!4icv*%&_yZfr4o$opge;5)ouJ@?#m?{CUKWNOziTO0=5 zAtDu#`n7`A&$j-?SHKB+h&ss}>Shb&zPLnYaV%iF{PV zoyYFPdg3nT6ZuUg?t5(3H!0|IO2Hr%@jmy6#(zNkG$6Bt_zfIUcsKEt=ZNGX3feDJ zFl>{8ra~Ly>#$+KYXz-VD(K~{V8Lg^-?77iS4n4eg(x76bd{DwrKuED)b8=|@KQl*Ukc6r3IUA!8+GK}r3?gin?F|BntEyapM8iU zh7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kX<9!!d|yj*DzR z#1E=2kq6W^cEEsPDn0JXesS+0#*r%R%jI!D?}nB-j@JO9(V242;UEknD>=U{9drIKdD-1_ zn2HbObx9U<%Hb-<+so@+JkbY+$~!!&!QbV5`?KNk6S-<87`akD`rS+zEXfuwmS}qWz`@Om!y8P`o~Kp1FIEQT7U7F9Ql&$K;=&I`)m&2& zy~d;dja5q4O?Z+Uqbxsy6!?!;imlQhmiba`2=O&fb?JC_TsPx#V(yK`2{4>e}E0ZHEyNe%S?;*;63Zu{<0+r5% z;EWeaR~9~{h8$J?yo1!Z{Grm##W41g83x-M0vh7cH|`h~EH6ZA>J6sPmZ7Y!8+NwA zL(g_YZNpi#@CydZ>+y)lTb1r7RnGs-&~9oE!c_Xx@KXgEkYlOg(VKKktucldUpS*I zqYST+5pq3Y_Oy&mjeN#sTLMdMQt3ucJn{jRlzNi;Vt7E0H?c z7}$bTjY%?2ox28_i8W>^$o)qbjdO=u&}ZH^rfi#sVc>nqq8vGZW)ii z8iY@&{l-({A*S?a#>SyuxbP?Ag#sLy)@ZyopdRD8+<0#eG$0vN_DVE%%*Oj^9ynx? zT^*+cuY`C?mfdk diff --git a/ScreenPlayShader/shaderlibrary.cpp b/ScreenPlayShader/shaderlibrary.cpp index 868813de..5fccb64c 100644 --- a/ScreenPlayShader/shaderlibrary.cpp +++ b/ScreenPlayShader/shaderlibrary.cpp @@ -1,5 +1,7 @@ #include "shaderlibrary.h" +#include + /*! \module ScreenPlayShader \title ScreenPlayShader diff --git a/ScreenPlayUtil/src/util.cpp b/ScreenPlayUtil/src/util.cpp index 5f92d39b..0e73d9b2 100644 --- a/ScreenPlayUtil/src/util.cpp +++ b/ScreenPlayUtil/src/util.cpp @@ -61,7 +61,9 @@ bool writeJsonObjectToFile(const QString& absoluteFilePath, const QJsonObject& o } QTextStream out(&configTmp); - out.setCodec("UTF-8"); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +out.setCodec("UTF-8"); +#endif out << QJsonDocument(object).toJson(); configTmp.close(); diff --git a/ScreenPlayWallpaper/CMakeLists.txt b/ScreenPlayWallpaper/CMakeLists.txt index 607962bc..aa7d2517 100644 --- a/ScreenPlayWallpaper/CMakeLists.txt +++ b/ScreenPlayWallpaper/CMakeLists.txt @@ -21,9 +21,9 @@ set(src main.cpp src/basewindow.cpp) set(headers src/basewindow.h) if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - qt_add_resources(resources SPWResources.qrc) + qt6_add_resources (resources SPWResources.qrc) else() - qtquick_compiler_add_resources(resources SPWResources.qrc) + qt6_add_resources (resources SPWResources.qrc) endif() add_executable(${PROJECT_NAME} ${src} ${headers} ${src_plattform} ${headers_plattform} ${resources}) @@ -51,6 +51,7 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) Widgets WebSockets Svg + Multimedia WebEngineCore WebEngineQuick WebChannel @@ -63,6 +64,7 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::WebSockets Qt${QT_VERSION_MAJOR}::Svg + Qt6::Multimedia Qt6::WebEngineCore Qt6::WebEngineQuick) else() diff --git a/ScreenPlayWallpaper/MultimediaView.qml b/ScreenPlayWallpaper/MultimediaView.qml new file mode 100644 index 00000000..0c4f9f5c --- /dev/null +++ b/ScreenPlayWallpaper/MultimediaView.qml @@ -0,0 +1,21 @@ +import QtQuick 2.0 +import QtMultimedia + +VideoOutput { + id:root + MediaPlayer { + id: mediaPlayer + videoOutput: root + //volume: Wallpaper.volume + //source: Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute) + source: Qt.resolvedUrl("C:/Users/Eli/Videos/videoplayback.webm") + Component.onCompleted: mediaPlayer.play() + //loops: true + onErrorOccurred: function(error, errorString) { + if (MediaPlayer.NoError !== error) { + console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString) + root.fatalError() + } + } + } +} diff --git a/ScreenPlayWallpaper/SPWResources.qrc b/ScreenPlayWallpaper/SPWResources.qrc index fd8f9b66..d4276132 100644 --- a/ScreenPlayWallpaper/SPWResources.qrc +++ b/ScreenPlayWallpaper/SPWResources.qrc @@ -8,5 +8,6 @@ index.html GifWallpaper.qml WebsiteWallpaper.qml + MultimediaView.qml diff --git a/ScreenPlayWallpaper/Test.qml b/ScreenPlayWallpaper/Test.qml index c801782e..e67ea5e9 100644 --- a/ScreenPlayWallpaper/Test.qml +++ b/ScreenPlayWallpaper/Test.qml @@ -19,7 +19,7 @@ Rectangle { //Image property real imgOpacity: 0.75 - signal requestFadeIn() + signal requestFadeIn anchors.fill: parent color: Material.color(Material.Grey, Material.Shade800) @@ -28,15 +28,15 @@ Rectangle { Component.onCompleted: root.requestFadeIn() MouseArea { - // setPosition() + // setPosition() id: ma function setPosition() { - attractor.pointX = mouseX - 25; - attractor.pointY = mouseY - 25; - mouseDot.x = mouseX - mouseDot.center; - mouseDot.y = mouseY - mouseDot.center; + attractor.pointX = mouseX - 25 + attractor.pointY = mouseY - 25 + mouseDot.x = mouseX - mouseDot.center + mouseDot.y = mouseY - mouseDot.center } anchors.fill: parent @@ -44,13 +44,14 @@ Rectangle { propagateComposedEvents: true hoverEnabled: true Component.onCompleted: { - attractor.pointX = parent.width * 0.5; - attractor.pointY = parent.height * 0.5; + attractor.pointX = parent.width * 0.5 + attractor.pointY = parent.height * 0.5 } onPositionChanged: { - setPosition(); + setPosition() } onClicked: { + } } @@ -104,7 +105,6 @@ Rectangle { magnitudeVariation: 25 angleVariation: 10 } - } ImageParticle { @@ -132,7 +132,6 @@ Rectangle { bottom: txtButtonConter.top bottomMargin: 20 } - } Text { @@ -152,7 +151,6 @@ Rectangle { bottom: name.top bottomMargin: 20 } - } Text { @@ -181,10 +179,10 @@ Rectangle { highlighted: true text: qsTr("Click me! - 1") onClicked: { - focus = false; - focus = true; - print("Button Clicked!"); - txtButtonConter.counter = txtButtonConter.counter - 1; + focus = false + focus = true + print("Button Clicked!") + txtButtonConter.counter = txtButtonConter.counter - 1 } } @@ -192,10 +190,10 @@ Rectangle { highlighted: true text: qsTr("Exit Wallpaper") onClicked: { - focus = false; - focus = true; - print("Exit Wallpaper"); - Wallpaper.terminate(); + focus = false + focus = true + print("Exit Wallpaper") + Wallpaper.terminate() } } @@ -204,24 +202,32 @@ Rectangle { focusPolicy: Qt.ClickFocus text: qsTr("Click me! +1") onClicked: { - print("Button Clicked!"); - txtButtonConter.counter = txtButtonConter.counter + 1; + print("Button Clicked!") + txtButtonConter.counter = txtButtonConter.counter + 1 } } - } - WebView { + // WebView { + // width: 1000 + // height: 400 + // url: "https://screen-play.app" + + // anchors { + // horizontalCenter: parent.horizontalCenter + // bottom: parent.bottom + // bottomMargin: 50 + // } + + // } + MultimediaView { width: 1000 height: 400 - url: "https://screen-play.app" anchors { horizontalCenter: parent.horizontalCenter bottom: parent.bottom bottomMargin: 50 } - } - } diff --git a/ScreenPlayWallpaper/Wallpaper.qml b/ScreenPlayWallpaper/Wallpaper.qml index 7428eb5c..07a75268 100644 --- a/ScreenPlayWallpaper/Wallpaper.qml +++ b/ScreenPlayWallpaper/Wallpaper.qml @@ -14,7 +14,7 @@ Rectangle { function init() { switch (Wallpaper.type) { case InstalledType.VideoWallpaper: - loader.source = "qrc:/WebView.qml"; + loader.source = "qrc:/MultimediaView.qml"; break; case InstalledType.HTMLWallpaper: loader.setSource("qrc:/WebView.qml", { diff --git a/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/config.qml b/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/config.qml index 3cc30740..a79b0347 100644 --- a/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/config.qml +++ b/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/config.qml @@ -1,7 +1,7 @@ import QtQuick 2.11 import QtQuick.Controls 2.4 as QQC import QtQuick.Window 2.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.wallpapers.image 2.0 as Wallpaper import org.kde.kcm 1.1 as KCM diff --git a/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/main.qml b/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/main.qml index 60285a0a..750dd909 100644 --- a/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/main.qml +++ b/ScreenPlayWallpaper/kde/ScreenPlay/contents/ui/main.qml @@ -1,5 +1,5 @@ import QtQuick 2.11 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import QtQuick.Window 2.0 import Qt.WebSockets 1.15 import QtWebEngine 1.8 diff --git a/ScreenPlayWallpaper/main.cpp b/ScreenPlayWallpaper/main.cpp index d2621af7..4d345f2b 100644 --- a/ScreenPlayWallpaper/main.cpp +++ b/ScreenPlayWallpaper/main.cpp @@ -3,7 +3,12 @@ #include #include #include -#include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#include +#else +#include +#endif + #include "ScreenPlayUtil/util.h" @@ -19,7 +24,13 @@ int main(int argc, char* argv[]) { //QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QtWebEngine::initialize(); +#else + + QtWebEngineQuick::initialize(); + +#endif QApplication app(argc, argv); diff --git a/ScreenPlayWallpaper/src/basewindow.cpp b/ScreenPlayWallpaper/src/basewindow.cpp index b6fc599c..4fc3a29f 100644 --- a/ScreenPlayWallpaper/src/basewindow.cpp +++ b/ScreenPlayWallpaper/src/basewindow.cpp @@ -32,7 +32,6 @@ BaseWindow::BaseWindow( , m_debugMode(debugMode) , m_sdk(std::make_unique(appID, type)) { - qInfo() << "parent"; QApplication::instance()->installEventFilter(this); qRegisterMetaType(); diff --git a/ScreenPlayWallpaper/src/winwindow.cpp b/ScreenPlayWallpaper/src/winwindow.cpp index 4619e48c..1237f554 100644 --- a/ScreenPlayWallpaper/src/winwindow.cpp +++ b/ScreenPlayWallpaper/src/winwindow.cpp @@ -175,6 +175,13 @@ WinWindow::WinWindow( connect(this, &BaseWindow::reloadQML, this, [this]() { clearComponentCache(); }); + connect( + &m_window, &QQuickView::statusChanged, + this, [](auto status) { + if (status == QQuickView::Status::Error) + QCoreApplication::exit(-1); + }, + Qt::QueuedConnection); connect(guiAppInst, &QApplication::screenAdded, this, &WinWindow::configureWindowGeometry); connect(guiAppInst, &QApplication::screenRemoved, this, &WinWindow::configureWindowGeometry); connect(guiAppInst, &QApplication::primaryScreenChanged, this, &WinWindow::configureWindowGeometry); @@ -470,8 +477,7 @@ void WinWindow::configureWindowGeometry() setWidth(m_window.width()); setHeight(m_window.height()); - // Instead of setting "renderType: Text.NativeRendering" every time - // we can set it here once :) + // Instead of setting "renderType: Text.NativeRendering" every time we can set it here once m_window.setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering); m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView); m_window.setSource(QUrl("qrc:/Wallpaper.qml"));