mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Fix linux ui loading
This was because of buggy require property and missing Q_IMPORT_QML_PLUGIN
This commit is contained in:
parent
c281ec5599
commit
0c837d81cb
@ -196,6 +196,7 @@ target_link_libraries(
|
|||||||
Qt6::Core
|
Qt6::Core
|
||||||
Qt6::WebSockets
|
Qt6::WebSockets
|
||||||
Qt6::Svg
|
Qt6::Svg
|
||||||
|
ScreenPlayQmlplugin
|
||||||
SteamSDKQtEnums)
|
SteamSDKQtEnums)
|
||||||
|
|
||||||
if(${TESTS_ENABLED})
|
if(${TESTS_ENABLED})
|
||||||
@ -224,10 +225,11 @@ qt_add_lrelease(
|
|||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
||||||
|
|
||||||
|
qt_add_library(ScreenPlayQml STATIC)
|
||||||
qt_add_qml_module(
|
qt_add_qml_module(
|
||||||
${PROJECT_NAME}
|
ScreenPlayQml
|
||||||
URI
|
URI
|
||||||
${PROJECT_NAME}
|
ScreenPlayQml
|
||||||
VERSION
|
VERSION
|
||||||
1.0
|
1.0
|
||||||
QML_FILES
|
QML_FILES
|
||||||
|
@ -62,7 +62,7 @@ App::App()
|
|||||||
QGuiApplication::setOrganizationName("ScreenPlay");
|
QGuiApplication::setOrganizationName("ScreenPlay");
|
||||||
QGuiApplication::setOrganizationDomain("screen-play.app");
|
QGuiApplication::setOrganizationDomain("screen-play.app");
|
||||||
QGuiApplication::setApplicationName("ScreenPlay");
|
QGuiApplication::setApplicationName("ScreenPlay");
|
||||||
QGuiApplication::setApplicationVersion("0.15.0");
|
QGuiApplication::setApplicationVersion(QVersionNumber(0, 15, 0).toString());
|
||||||
QGuiApplication::setQuitOnLastWindowClosed(false);
|
QGuiApplication::setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
QFontDatabase::addApplicationFont(":/assets/fonts/LibreBaskerville-Italic.ttf");
|
QFontDatabase::addApplicationFont(":/assets/fonts/LibreBaskerville-Italic.ttf");
|
||||||
@ -216,7 +216,7 @@ void App::init()
|
|||||||
setupKDE();
|
setupKDE();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/ScreenPlay/main.qml")));
|
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/ScreenPlayQml/main.qml")));
|
||||||
|
|
||||||
// Must be called last to display a error message on startup by the qml engine
|
// Must be called last to display a error message on startup by the qml engine
|
||||||
m_screenPlayManager->init(m_globalVariables, m_monitorListModel, m_settings);
|
m_screenPlayManager->init(m_globalVariables, m_monitorListModel, m_settings);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
Q_IMPORT_QML_PLUGIN(ScreenPlayQmlPlugin)
|
||||||
|
|
||||||
#include <sentry.h>
|
#include <sentry.h>
|
||||||
#define DOCTEST_CONFIG_IMPLEMENT
|
#define DOCTEST_CONFIG_IMPLEMENT
|
||||||
|
@ -38,12 +38,12 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (name === "Installed") {
|
if (name === "Installed") {
|
||||||
stackView.replace("qrc:/ScreenPlay/qml/Installed/Installed.qml", {
|
stackView.replace("qrc:/ScreenPlayQml/qml/Installed/Installed.qml", {
|
||||||
"sidebar": sidebar
|
"sidebar": sidebar
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
stackView.replace("qrc:/ScreenPlay/qml/" + name + "/" + name + ".qml", {
|
stackView.replace("qrc:/ScreenPlayQml/qml/" + name + "/" + name + ".qml", {
|
||||||
"modalSource": content
|
"modalSource": content
|
||||||
})
|
})
|
||||||
sidebar.state = "inactive"
|
sidebar.state = "inactive"
|
||||||
@ -58,7 +58,7 @@ ApplicationWindow {
|
|||||||
title: "ScreenPlay Alpha - " + ScreenPlay.version()
|
title: "ScreenPlay Alpha - " + ScreenPlay.version()
|
||||||
minimumHeight: 450
|
minimumHeight: 450
|
||||||
minimumWidth: 1050
|
minimumWidth: 1050
|
||||||
flags: Qt.FramelessWindowHint | Qt.Window
|
property bool enableCustomWindowNavigation: Qt.platform.os === "windows" || Qt.platform.os === "osx"
|
||||||
|
|
||||||
// Partial workaround for
|
// Partial workaround for
|
||||||
// https://bugreports.qt.io/browse/QTBUG-86047
|
// https://bugreports.qt.io/browse/QTBUG-86047
|
||||||
@ -74,8 +74,11 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
if(root.enableCustomWindowNavigation){
|
||||||
|
root.flags = Qt.FramelessWindowHint | Qt.Window
|
||||||
|
}
|
||||||
setTheme(ScreenPlay.settings.theme)
|
setTheme(ScreenPlay.settings.theme)
|
||||||
stackView.push("qrc:/ScreenPlay/qml/Installed/Installed.qml", {
|
stackView.push("qrc:/ScreenPlayQml/qml/Installed/Installed.qml", {
|
||||||
"sidebar": sidebar
|
"sidebar": sidebar
|
||||||
})
|
})
|
||||||
if (!ScreenPlay.settings.silentStart)
|
if (!ScreenPlay.settings.silentStart)
|
||||||
@ -112,6 +115,8 @@ ApplicationWindow {
|
|||||||
anchors.margins: 1
|
anchors.margins: 1
|
||||||
Navigation.WindowNavigation {
|
Navigation.WindowNavigation {
|
||||||
id: windowNav
|
id: windowNav
|
||||||
|
enabled: root.enableCustomWindowNavigation
|
||||||
|
visible: enabled
|
||||||
z:5
|
z:5
|
||||||
modalSource: content
|
modalSource: content
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -121,7 +126,7 @@ ApplicationWindow {
|
|||||||
Item {
|
Item {
|
||||||
id: content
|
id: content
|
||||||
anchors {
|
anchors {
|
||||||
top: windowNav.bottom
|
top: root.enableCustomWindowNavigation ? windowNav.bottom : parent.top
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
@ -8,7 +8,7 @@ import ScreenPlay 1.0
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Item modalSource
|
property Item modalSource
|
||||||
|
|
||||||
XMLNewsfeed {
|
XMLNewsfeed {
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -12,11 +12,11 @@ import ScreenPlay.QMLUtilities 1.0
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Item modalSource
|
property Item modalSource
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
wizardContentWrapper.state = "in";
|
wizardContentWrapper.state = "in";
|
||||||
stackView.push("qrc:/ScreenPlay/qml/Create/StartInfo.qml");
|
stackView.push("qrc:/ScreenPlayQml/qml/Create/StartInfo.qml");
|
||||||
}
|
}
|
||||||
|
|
||||||
Sidebar {
|
Sidebar {
|
||||||
|
@ -43,7 +43,7 @@ Rectangle {
|
|||||||
function onWizardExited() {
|
function onWizardExited() {
|
||||||
root.expanded = true
|
root.expanded = true
|
||||||
stackView.clear(StackView.PushTransition)
|
stackView.clear(StackView.PushTransition)
|
||||||
stackView.push("qrc:/ScreenPlay/qml/Create/StartInfo.qml")
|
stackView.push("qrc:/ScreenPlayQml/qml/Create/StartInfo.qml")
|
||||||
listView.currentIndex = 0
|
listView.currentIndex = 0
|
||||||
ScreenPlay.util.setNavigationActive(true)
|
ScreenPlay.util.setNavigationActive(true)
|
||||||
}
|
}
|
||||||
@ -54,70 +54,70 @@ Rectangle {
|
|||||||
model: ListModel {
|
model: ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("Tools Overview")
|
headline: qsTr("Tools Overview")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/StartInfo.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/StartInfo.qml"
|
||||||
category: "Home"
|
category: "Home"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("Video Import h264 (.mp4)")
|
headline: qsTr("Video Import h264 (.mp4)")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/Importh264/Importh264.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/Importh264/Importh264.qml"
|
||||||
category: "Video Wallpaper"
|
category: "Video Wallpaper"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("Video Import VP8 & VP9 (.webm)")
|
headline: qsTr("Video Import VP8 & VP9 (.webm)")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/ImportWebm/ImportWebm.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/ImportWebm/ImportWebm.qml"
|
||||||
category: "Video Wallpaper"
|
category: "Video Wallpaper"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("Video import (all types)")
|
headline: qsTr("Video import (all types)")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml"
|
||||||
category: "Video Wallpaper"
|
category: "Video Wallpaper"
|
||||||
objectName: "videoImportConvert"
|
objectName: "videoImportConvert"
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("GIF Wallpaper")
|
headline: qsTr("GIF Wallpaper")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/GifWallpaper.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/GifWallpaper.qml"
|
||||||
category: "Video Wallpaper"
|
category: "Video Wallpaper"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("QML Wallpaper")
|
headline: qsTr("QML Wallpaper")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/QMLWallpaper.qml"
|
||||||
category: "Code Wallpaper"
|
category: "Code Wallpaper"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("HTML5 Wallpaper")
|
headline: qsTr("HTML5 Wallpaper")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/HTMLWallpaper.qml"
|
||||||
category: "Code Wallpaper"
|
category: "Code Wallpaper"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("Website Wallpaper")
|
headline: qsTr("Website Wallpaper")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/WebsiteWallpaper.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/WebsiteWallpaper.qml"
|
||||||
category: "Code Wallpaper"
|
category: "Code Wallpaper"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("QML Widget")
|
headline: qsTr("QML Widget")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/QMLWidget.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/QMLWidget.qml"
|
||||||
category: "Code Widgets"
|
category: "Code Widgets"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
ListElement {
|
ListElement {
|
||||||
headline: qsTr("HTML Widget")
|
headline: qsTr("HTML Widget")
|
||||||
source: "qrc:/ScreenPlay/qml/Create/Wizards/HTMLWidget.qml"
|
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/HTMLWidget.qml"
|
||||||
category: "Code Widgets"
|
category: "Code Widgets"
|
||||||
objectName: ""
|
objectName: ""
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ Item {
|
|||||||
property bool refresh: false
|
property bool refresh: false
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
|
|
||||||
required property Sidebar sidebar
|
property Sidebar sidebar
|
||||||
|
|
||||||
signal setNavigationItem(var pos)
|
signal setNavigationItem(var pos)
|
||||||
signal setSidebarActive(var active)
|
signal setSidebarActive(var active)
|
||||||
@ -73,7 +73,7 @@ Item {
|
|||||||
active: false
|
active: false
|
||||||
z: 99
|
z: 99
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: "qrc:/ScreenPlay/qml/Installed/InstalledWelcomeScreen.qml"
|
source: "qrc:/ScreenPlayQml/qml/Installed/InstalledWelcomeScreen.qml"
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@ -89,7 +89,7 @@ Item {
|
|||||||
objectName: "gridView"
|
objectName: "gridView"
|
||||||
|
|
||||||
property bool isDragging: false
|
property bool isDragging: false
|
||||||
property bool isScrolling: gridView.verticalVelocity != 0
|
property bool isScrolling: gridView.verticalVelocity !== 0
|
||||||
|
|
||||||
boundsBehavior: Flickable.DragOverBounds
|
boundsBehavior: Flickable.DragOverBounds
|
||||||
maximumFlickVelocity: 5000
|
maximumFlickVelocity: 5000
|
||||||
@ -297,7 +297,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.Dialog {
|
Dialog {
|
||||||
id: deleteDialog
|
id: deleteDialog
|
||||||
title: qsTr("Are you sure you want to delete this item?")
|
title: qsTr("Are you sure you want to delete this item?")
|
||||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
@ -12,7 +12,7 @@ import "../Common"
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Item modalSource
|
property Item modalSource
|
||||||
|
|
||||||
function indexOfValue(model, value) {
|
function indexOfValue(model, value) {
|
||||||
for (var i = 0; i < model.length; i++) {
|
for (var i = 0; i < model.length; i++) {
|
||||||
|
@ -17,7 +17,7 @@ Item {
|
|||||||
id: screenPlayWorkshop
|
id: screenPlayWorkshop
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (screenPlayWorkshop.init()) {
|
if (screenPlayWorkshop.init()) {
|
||||||
stackView.push("qrc:/ScreenPlay/qml/Workshop/SteamWorkshopStartPage.qml", {
|
stackView.push("qrc:/ScreenPlayQml/qml/Workshop/SteamWorkshopStartPage.qml", {
|
||||||
"stackView": stackView,
|
"stackView": stackView,
|
||||||
"screenPlayWorkshop": screenPlayWorkshop,
|
"screenPlayWorkshop": screenPlayWorkshop,
|
||||||
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
||||||
|
@ -276,7 +276,7 @@ Item {
|
|||||||
text: qsTr("Profile")
|
text: qsTr("Profile")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
stackView.push(
|
stackView.push(
|
||||||
"qrc:/ScreenPlay/qml/Workshop/SteamProfile.qml", {
|
"qrc:/ScreenPlayQml/qml/Workshop/SteamProfile.qml", {
|
||||||
"screenPlayWorkshop": root.screenPlayWorkshop,
|
"screenPlayWorkshop": root.screenPlayWorkshop,
|
||||||
"steamWorkshop": root.steamWorkshop
|
"steamWorkshop": root.steamWorkshop
|
||||||
})
|
})
|
||||||
@ -295,7 +295,7 @@ Item {
|
|||||||
text: qsTr("Upload")
|
text: qsTr("Upload")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
stackView.push(
|
stackView.push(
|
||||||
"qrc:/ScreenPlay/qml/Workshop/upload/UploadProject.qml", {
|
"qrc:/ScreenPlayQml/qml/Workshop/upload/UploadProject.qml", {
|
||||||
"screenPlayWorkshop": root.screenPlayWorkshop,
|
"screenPlayWorkshop": root.screenPlayWorkshop,
|
||||||
"steamWorkshop": root.steamWorkshop
|
"steamWorkshop": root.steamWorkshop
|
||||||
})
|
})
|
||||||
|
@ -9,16 +9,16 @@ import ScreenPlay
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Item modalSource
|
property Item modalSource
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (ScreenPlay.settings.steamVersion) {
|
if (ScreenPlay.settings.steamVersion) {
|
||||||
workshopLoader.setSource(
|
workshopLoader.setSource(
|
||||||
"qrc:/ScreenPlay/qml/Workshop/SteamWorkshop.qml", {
|
"qrc:/ScreenPlayQml/qml/Workshop/SteamWorkshop.qml", {
|
||||||
"modalSource": modalSource
|
"modalSource": modalSource
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
workshopLoader.setSource("qrc:/ScreenPlay/qml/Workshop/Forum.qml")
|
workshopLoader.setSource("qrc:/ScreenPlayQml/qml/Workshop/Forum.qml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ Item {
|
|||||||
active: false
|
active: false
|
||||||
z: 99
|
z: 99
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: "qrc:/ScreenPlay/qml/Installed/InstalledUserHelper.qml"
|
source: "qrc:/ScreenPlayQml/qml/Installed/InstalledUserHelper.qml"
|
||||||
}
|
}
|
||||||
|
|
||||||
transitions: [
|
transitions: [
|
||||||
|
@ -60,7 +60,7 @@ BaseWindow::BaseWindow(
|
|||||||
|
|
||||||
if (projectFilePath == "test") {
|
if (projectFilePath == "test") {
|
||||||
setType(ScreenPlay::InstalledType::InstalledType::QMLWallpaper);
|
setType(ScreenPlay::InstalledType::InstalledType::QMLWallpaper);
|
||||||
setProjectSourceFileAbsolute({ "qrc:/ScreenPlayWallpaper/qml/Test.qml" });
|
setProjectSourceFileAbsolute({ "qrc:/ScreenPlayQmlWallpaper/qml/Test.qml" });
|
||||||
setupLiveReloading();
|
setupLiveReloading();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user