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
PIM
Kontact
Commits
40dfa954
Commit
40dfa954
authored
Oct 15, 2022
by
Laurent Montel
Browse files
Adapt to new api (scripted)
parent
b7833265
Pipeline
#248499
passed with stage
in 10 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ksettingsdialog/kontactkcmultidialog.cpp
View file @
40dfa954
...
...
@@ -13,6 +13,7 @@
#include
"kontact_debug.h"
#include
"kontactkcmultidialog_p.h"
#include
<KCModuleProxy>
#include
<kwidgetsaddons_version.h>
#include
<KCModuleProxy>
#include
<KIO/ApplicationLauncherJob>
...
...
@@ -40,19 +41,31 @@ bool KontactKCMultiDialogPrivate::resolveChanges(KCModuleProxy *currentProxy)
}
// Let the user decide
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
const
int
queryUser
=
KMessageBox
::
warningTwoActionsCancel
(
q
,
#else
const
int
queryUser
=
KMessageBox
::
warningYesNoCancel
(
q
,
i18n
(
"The settings of the current module have changed.
\n
"
"Do you want to apply the changes or discard them?"
),
i18n
(
"Apply Settings"
),
KStandardGuiItem
::
apply
(),
KStandardGuiItem
::
discard
(),
KStandardGuiItem
::
cancel
());
#endif
i18n
(
"The settings of the current module have changed.
\n
"
"Do you want to apply the changes or discard them?"
),
i18n
(
"Apply Settings"
),
KStandardGuiItem
::
apply
(),
KStandardGuiItem
::
discard
(),
KStandardGuiItem
::
cancel
());
switch
(
queryUser
)
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
case
KMessageBox
::
ButtonCode
::
PrimaryAction
:
#else
case
KMessageBox
::
Yes
:
#endif
return
moduleSave
(
currentProxy
);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
case
KMessageBox
::
ButtonCode
::
SecondaryAction
:
#else
case
KMessageBox
::
No
:
#endif
currentProxy
->
load
();
return
true
;
...
...
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