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