Commit 40dfa954 authored by Laurent Montel's avatar Laurent Montel
Browse files

Adapt to new api (scripted)

parent b7833265
Pipeline #248499 passed with stage
in 10 minutes and 3 seconds
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment