X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5bb6bf8d1eec5c720dfd4a090aa535c1f0e8f8b4..a2c9c05de2dfabbb2bb614390c8e03023dad2bd1:/src/settings/dolphinsettingsdialog.cpp diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index d699ef894..eed2f5155 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -14,8 +14,8 @@ #include "startup/startupsettingspage.h" #include "trash/trashsettingspage.h" #include "viewmodes/viewsettingspage.h" -#include "config-kuserfeedback.h" -#ifdef HAVE_KUSERFEEDBACK +#include "config-dolphin.h" +#if HAVE_KUSERFEEDBACK #include "userfeedback/dolphinfeedbackprovider.h" #include "userfeedback/userfeedbacksettingspage.h" #endif @@ -25,6 +25,8 @@ #include #include +#include + #include #include @@ -86,7 +88,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, K QStringLiteral("open_in_new_window"), QStringLiteral("copy_location"), QStringLiteral("duplicate"), - QStringLiteral("open_terminal"), + QStringLiteral("open_terminal_here") }); KPageWidgetItem* contextMenuSettingsFrame = addPage(contextMenuSettingsPage, i18nc("@title:group", "Context Menu")); @@ -105,7 +107,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, K connect(trashSettingsPage, &TrashSettingsPage::changed, this, &DolphinSettingsDialog::enableApply); } -#ifdef HAVE_KUSERFEEDBACK +#if HAVE_KUSERFEEDBACK // User Feedback UserFeedbackSettingsPage* feedbackSettingsPage = nullptr; if (DolphinFeedbackProvider::instance()->isEnabled()) { @@ -124,7 +126,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, K if (trashSettingsPage) { m_pages.append(trashSettingsPage); } -#ifdef HAVE_KUSERFEEDBACK +#if HAVE_KUSERFEEDBACK if (feedbackSettingsPage) { m_pages.append(feedbackSettingsPage); } @@ -179,17 +181,29 @@ void DolphinSettingsDialog::closeEvent(QCloseEvent* event) return; } +#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) + const auto response = KMessageBox::warningTwoActionsCancel(this, +#else const auto response = KMessageBox::warningYesNoCancel(this, +#endif i18n("You have unsaved changes. Do you want to apply the changes or discard them?"), i18n("Warning"), KStandardGuiItem::save(), KStandardGuiItem::discard(), KStandardGuiItem::cancel()); switch (response) { +#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) + case KMessageBox::PrimaryAction: +#else case KMessageBox::Yes: +#endif applySettings(); Q_FALLTHROUGH(); +#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) + case KMessageBox::SecondaryAction: +#else case KMessageBox::No: +#endif event->accept(); break; case KMessageBox::Cancel: