]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/viewpropertiesdialog.cpp
SVN_SILENT made messages (.desktop file) - always resolve ours
[dolphin.git] / src / settings / viewpropertiesdialog.cpp
index 08d6b1041912f9661f89998318b2356dcff8cf7a..30995f1f72d5644a1f0ce291b621bb85d55045d7 100644 (file)
@@ -18,6 +18,8 @@
 #include <KMessageBox>
 #include <KWindowConfig>
 
+#include <kwidgetsaddons_version.h>
+
 #if HAVE_BALOO
     #include <Baloo/IndexerConfig>
 #endif
@@ -347,9 +349,15 @@ 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;
         }
 
@@ -381,9 +389,15 @@ 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;
         }