┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2023-08-28 10:32:35 +0200
committerMéven Car <[email protected]>2023-08-28 10:36:37 +0200
commit1318f16fd7b84de79c04eb468d61e1c9b7b52e15 (patch)
tree430c477f6d9229eede00ece60d11b09be3b498cc /src/settings
parenta2e888d9a03add380c113c0f5edff5391e90a358 (diff)
Clean obsolete ifdefs since dolphin requires KF 5.101+
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/contextmenu/contextmenusettingspage.cpp9
-rw-r--r--src/settings/dolphinsettingsdialog.cpp12
-rw-r--r--src/settings/viewpropertiesdialog.cpp8
3 files changed, 0 insertions, 29 deletions
diff --git a/src/settings/contextmenu/contextmenusettingspage.cpp b/src/settings/contextmenu/contextmenusettingspage.cpp
index 03e55ba32..fa3d0b256 100644
--- a/src/settings/contextmenu/contextmenusettingspage.cpp
+++ b/src/settings/contextmenu/contextmenusettingspage.cpp
@@ -206,24 +206,15 @@ void ContextMenuSettingsPage::applySettings()
VersionControlSettings::self()->save();
if (!laterSelected) {
-#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
KMessageBox::ButtonCode promptRestart =
KMessageBox::questionTwoActions(window(),
-#else
- KMessageBox::ButtonCode promptRestart =
- KMessageBox::questionYesNo(window(),
-#endif
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 KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (promptRestart == KMessageBox::ButtonCode::PrimaryAction) {
-#else
- if (promptRestart == KMessageBox::ButtonCode::Yes) {
-#endif
Dolphin::openNewWindow();
qApp->quit();
} else {
diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp
index 45aa7b65a..3a2ad31e9 100644
--- a/src/settings/dolphinsettingsdialog.cpp
+++ b/src/settings/dolphinsettingsdialog.cpp
@@ -160,29 +160,17 @@ 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:
diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp
index f7bd754b1..c630f8113 100644
--- a/src/settings/viewpropertiesdialog.cpp
+++ b/src/settings/viewpropertiesdialog.cpp
@@ -333,11 +333,7 @@ void ViewPropertiesDialog::applyViewProperties()
const bool applyToSubFolders = m_applyToSubFolders && m_applyToSubFolders->isChecked();
if (applyToSubFolders) {
const QString text(i18nc("@info", "The view properties of all sub-folders will be changed. Do you want to continue?"));
-#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (KMessageBox::questionTwoActions(this, text, {}, KStandardGuiItem::cont(), KStandardGuiItem::cancel()) == KMessageBox::SecondaryAction) {
-#else
- if (KMessageBox::questionYesNo(this, text, {}, KStandardGuiItem::cont(), KStandardGuiItem::cancel()) == KMessageBox::No) {
-#endif
return;
}
@@ -367,11 +363,7 @@ void ViewPropertiesDialog::applyViewProperties()
if (applyToAllFolders) {
const QString text(i18nc("@info", "The view properties of all folders will be changed. Do you want to continue?"));
-#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (KMessageBox::questionTwoActions(this, text, {}, KStandardGuiItem::cont(), KStandardGuiItem::cancel()) == KMessageBox::SecondaryAction) {
-#else
- if (KMessageBox::questionYesNo(this, text, {}, KStandardGuiItem::cont(), KStandardGuiItem::cancel()) == KMessageBox::No) {
-#endif
return;
}