mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-01 08:09:48 +02:00
Merge remote-tracking branch 'origin/161-refactor-screenplaywallpaper-to-no-longer-inherit-from-basewindow' into 161-refactor-screenplaywallpaper-to-no-longer-inherit-from-basewindow
This commit is contained in:
commit
c74ea74459
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -99,6 +99,30 @@
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper",
|
||||
"type": "cppdbg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ScreenPlayWidget Debug",
|
||||
"request": "launch",
|
||||
"type": "cppvsdbg", // Must be set otherwise VSCode does not know we want to debug c++
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"windows": {
|
||||
"environment": [
|
||||
{
|
||||
"name": "Path",
|
||||
"value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;"
|
||||
}
|
||||
],
|
||||
"type": "cppvsdbg",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug/bin/ScreenPlayWidget.exe"
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_Debug/bin/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget",
|
||||
"type": "cppdbg"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -5,8 +5,15 @@ Item {
|
||||
implicitWidth: 300
|
||||
implicitHeight: 200
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.fill:parent
|
||||
opacity: 0.9
|
||||
color: "#333333"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: name
|
||||
id: text
|
||||
text: qsTr("My Widget 🚀")
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
@ -23,10 +23,6 @@ bool ProjectFile::init()
|
||||
return false;
|
||||
|
||||
// Required:
|
||||
if (!obj.contains("description"))
|
||||
return false;
|
||||
description = obj.value("description").toString();
|
||||
|
||||
if (!obj.contains("file"))
|
||||
return false;
|
||||
file = obj.value("file").toString();
|
||||
@ -38,7 +34,17 @@ bool ProjectFile::init()
|
||||
if (!obj.contains("type"))
|
||||
return false;
|
||||
|
||||
auto typeParsed = ScreenPlayUtil::getInstalledTypeFromString(obj.value("type").toString());
|
||||
if (!typeParsed) {
|
||||
qWarning() << "Type could not parsed from: " << *typeParsed;
|
||||
return false;
|
||||
}
|
||||
type = typeParsed.value();
|
||||
|
||||
// Optional:
|
||||
if (!obj.contains("description"))
|
||||
description = obj.value("description").toString();
|
||||
|
||||
if (obj.contains("previewGIF"))
|
||||
previewGIF = obj.value("previewGIF").toString();
|
||||
|
||||
@ -51,9 +57,7 @@ bool ProjectFile::init()
|
||||
if (obj.contains("previewThumbnail")) {
|
||||
preview = obj.value("previewThumbnail").toString();
|
||||
} else {
|
||||
if (!obj.contains("preview")) {
|
||||
return false;
|
||||
}
|
||||
if (obj.contains("preview"))
|
||||
preview = obj.value("preview").toString();
|
||||
}
|
||||
|
||||
@ -68,13 +72,7 @@ bool ProjectFile::init()
|
||||
}
|
||||
}
|
||||
|
||||
auto typeParsed = ScreenPlayUtil::getInstalledTypeFromString(obj.value("type").toString());
|
||||
if (!typeParsed) {
|
||||
qWarning() << "Type could not parsed from: " << *typeParsed;
|
||||
return false;
|
||||
}
|
||||
|
||||
type = typeParsed.value();
|
||||
if (type == InstalledType::InstalledType::GifWallpaper) {
|
||||
preview = previewGIF;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user