]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/viewpropertiesdialog.cpp
It compiles fine with "-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS"
[dolphin.git] / src / settings / viewpropertiesdialog.cpp
index 6e4efab1b7a2f0640ee774bf219f5b4348e79cd7..2a35f7eb8bba8b1107f1edebcc06fc782135e918 100644 (file)
 #include "additionalinfodialog.h"
 #include "views/dolphinview.h"
 #include "settings/dolphinsettings.h"
-#include "dolphinsortfilterproxymodel.h"
 #include "dolphin_generalsettings.h"
 #include "dolphin_iconsmodesettings.h"
-#include "viewproperties.h"
 #include "viewpropsprogressinfo.h"
 
 #include <config-nepomuk.h>
 #ifdef HAVE_NEPOMUK
-#include <nepomuk/resourcemanager.h>
+#include <Nepomuk/ResourceManager>
 #endif
 
-#include <kcomponentdata.h>
-#include <klocale.h>
-#include <kiconloader.h>
-#include <kio/netaccess.h>
-#include <kmessagebox.h>
-#include <kstandarddirs.h>
-#include <kurl.h>
-#include <kcombobox.h>
+#include <KComponentData>
+#include <KLocale>
+#include <KIconLoader>
+#include <KIO/NetAccess>
+#include <KMessageBox>
+#include <KStandardDirs>
+#include <KUrl>
+#include <KComboBox>
 
 #include <QAction>
 #include <QButtonGroup>
@@ -54,6 +52,9 @@
 #include <QRadioButton>
 #include <QBoxLayout>
 
+#include <views/dolphinsortfilterproxymodel.h>
+#include <views/viewproperties.h>
+
 ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     KDialog(dolphinView),
     m_isDirty(false),
@@ -72,7 +73,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     m_applyToAllFolders(0),
     m_useAsDefault(0)
 {
-    Q_ASSERT(dolphinView != 0);
+    Q_ASSERT(dolphinView);
     const bool useGlobalViewProps = DolphinSettings::instance().generalSettings()->globalViewProps();
 
     setCaption(i18nc("@title:window", "View Properties"));
@@ -331,8 +332,7 @@ void ViewPropertiesDialog::applyViewProperties()
         return;
     }
 
-    const bool applyToSubFolders = (m_applyToSubFolders != 0) &&
-                                   m_applyToSubFolders->isChecked();
+    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 (KMessageBox::questionYesNo(this, text) == KMessageBox::No) {
@@ -347,13 +347,11 @@ void ViewPropertiesDialog::applyViewProperties()
         info->show();
     }
 
-    const bool applyToAllFolders = (m_applyToAllFolders != 0) &&
-                                   m_applyToAllFolders->isChecked();
+    const bool applyToAllFolders = m_applyToAllFolders && m_applyToAllFolders->isChecked();
 
     // If the user selected 'Apply To All Folders' the view properties implicitely
     // are also used as default for new folders.
-    const bool useAsDefault = applyToAllFolders ||
-                              ((m_useAsDefault != 0) && m_useAsDefault->isChecked());
+    const bool useAsDefault = applyToAllFolders || (m_useAsDefault && m_useAsDefault->isChecked());
     if (useAsDefault) {
         // For directories where no .directory file is available, the .directory
         // file stored for the global view properties is used as fallback. To update