Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Desktop
Commits
6bfef995
Commit
6bfef995
authored
Jun 27, 2022
by
Fushan Wen
Committed by
Nate Graham
Jun 29, 2022
Browse files
desktoppackage: warn on close if there are unsaved settings
CCBUG: 403384
parent
7351e80d
Pipeline
#196863
passed with stage
in 3 minutes and 18 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
desktoppackage/contents/configuration/AppletConfiguration.qml
View file @
6bfef995
...
...
@@ -33,6 +33,22 @@ Rectangle {
property
ConfigModel
globalConfigModel
:
globalAppletConfigModel
function
closing
()
{
if
(
applyButton
.
enabled
)
{
messageDialog
.
item
=
null
;
messageDialog
.
open
();
return
false
;
}
return
true
;
}
Connections
{
target
:
configDialog
function
onClosing
(
event
)
{
event
.
accepted
=
closing
();
}
}
ConfigModel
{
id
:
globalAppletConfigModel
ConfigCategory
{
...
...
@@ -280,6 +296,7 @@ Rectangle {
if
(
item
)
{
root
.
open
(
item
);
}
else
{
applyButton
.
enabled
=
false
;
configDialog
.
close
();
}
}
...
...
@@ -355,13 +372,9 @@ Rectangle {
QQC2.Action
{
id
:
cancelAction
onTriggered
:
{
if
(
applyButton
.
enabled
)
{
messageDialog
.
item
=
null
;
messageDialog
.
open
();
return
;
if
(
root
.
closing
())
{
configDialog
.
close
();
}
configDialog
.
close
();
}
shortcut
:
"
Escape
"
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment