Commit 73082d2e authored by Blaster goo's avatar Blaster goo Committed by Nate Graham
Browse files

Currently, when changing Version Control settings in Configure -> Context Menu, it

tells you to restart to apply those settings. This commit changes that by asking you
if you would like to restart now or later.

FEATURE: 441192
FIXED-IN: 21.12
parent 2f5e4cb0
Pipeline #87869 passed with stage
in 5 minutes and 50 seconds
......@@ -11,6 +11,7 @@
#include "dolphin_contextmenusettings.h"
#include "settings/serviceitemdelegate.h"
#include "settings/servicemodel.h"
#include "global.h"
#include <KDesktopFile>
#include <KLocalizedString>
......@@ -30,6 +31,7 @@
#include <QShowEvent>
#include <QSortFilterProxyModel>
#include <QLineEdit>
#include <QApplication>
......@@ -37,6 +39,8 @@ namespace
const char VersionControlServicePrefix[] = "_version_control_";
const char DeleteService[] = "_delete";
const char CopyToMoveToService[] ="_copy_to_move_to";
bool laterSelected = false;
ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent,
......@@ -192,11 +196,21 @@ void ContextMenuSettingsPage::applySettings()
i18nc("@info", "Dolphin must be restarted to apply the "
"updated version control systems settings."),
QString(), // default title
if (!laterSelected) {
KMessageBox::ButtonCode promptRestart = KMessageBox::questionYesNo(window(),
i18nc("@info", "Dolphin must be restarted to apply the "
"updated version control system settings."),
i18nc("@info", "Restart now?"),
KGuiItem(QApplication::translate("KStandardGuiItem", "&Restart"), QStringLiteral("dialog-restart")),
KGuiItem(QApplication::translate("KStandardGuiItem", "&Later"), QStringLiteral("dialog-later"))
if (promptRestart == KMessageBox::ButtonCode::Yes) {
} else {
laterSelected = true;
Markdown is supported
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