- KMessageBox::information(window(),
- i18nc("@info", "Dolphin must be restarted to apply the "
- "updated version control systems settings."),
- QString(), // default title
- QStringLiteral("ShowVcsRestartInformation"));
+ if (!laterSelected) {
+ KMessageBox::ButtonCode promptRestart =
+ KMessageBox::questionTwoActions(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::PrimaryAction) {
+ Dolphin::openNewWindow();
+ qApp->quit();
+ } else {
+ laterSelected = true;
+ }
+ }