]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Minor cleanups
authorPeter Penz <peter.penz19@gmail.com>
Tue, 2 Aug 2011 17:56:00 +0000 (19:56 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 2 Aug 2011 17:58:22 +0000 (19:58 +0200)
- Cleanup whitespaces after signal-normalization patch
- Cleanup DolphinView::Mode numbering

src/views/dolphinview.cpp
src/views/dolphinview.h
src/views/viewproperties.cpp

index 83877dcba80c16044ab476a4eb289d4b3f83837f..95a90edd88cd575f1abe08ea3d4d593c658efd4b 100644 (file)
@@ -150,12 +150,12 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) :
     connect(m_dirLister, SIGNAL(refreshItems(QList<QPair<KFileItem,KFileItem> >)),
             this, SLOT(slotRefreshItems()));
 
-    connect(m_dirLister, SIGNAL(clear()),                      this, SIGNAL(itemCountChanged()));
-    connect(m_dirLister, SIGNAL(newItems(KFileItemList)),      this, SIGNAL(itemCountChanged()));
-    connect(m_dirLister, SIGNAL(infoMessage(QString)),  this, SIGNAL(infoMessage(QString)));
-    connect(m_dirLister, SIGNAL(errorMessage(QString)), this, SIGNAL(infoMessage(QString)));
-    connect(m_dirLister, SIGNAL(percent(int)),                 this, SIGNAL(pathLoadingProgress(int)));
-    connect(m_dirLister, SIGNAL(urlIsFileError(KUrl)),  this, SIGNAL(urlIsFileError(KUrl)));
+    connect(m_dirLister, SIGNAL(clear()),                     this, SIGNAL(itemCountChanged()));
+    connect(m_dirLister, SIGNAL(newItems(KFileItemList)),     this, SIGNAL(itemCountChanged()));
+    connect(m_dirLister, SIGNAL(infoMessage(QString)),        this, SIGNAL(infoMessage(QString)));
+    connect(m_dirLister, SIGNAL(errorMessage(QString)),       this, SIGNAL(infoMessage(QString)));
+    connect(m_dirLister, SIGNAL(percent(int)),                this, SIGNAL(pathLoadingProgress(int)));
+    connect(m_dirLister, SIGNAL(urlIsFileError(KUrl)),        this, SIGNAL(urlIsFileError(KUrl)));
     connect(m_dirLister, SIGNAL(itemsDeleted(KFileItemList)), this, SIGNAL(itemCountChanged()));
 
     m_container = new DolphinItemListContainer(m_dirLister, this);
index 3313130a8787668620f9ea831e136fe1c2303de9..c9be8a56a1eed1b0ead6033b07c6561d6a6d4d4f 100644 (file)
@@ -82,13 +82,13 @@ public:
          * The icon, the name and the size of the items are
          * shown per default as a table.
          */
-        DetailsView = 1,
+        DetailsView,
 
         /**
          * The items are shown as icons with the name-label aligned
          * to the right side.
          */
-        CompactView = 3
+        CompactView
     };
 
     /** Defines the sort order for the items of a directory. */
index aeea67428feacaba1b36cd4144674484e91315b3..e67cbd87a3f66555651cc2d980522dc816af8fd4 100644 (file)
@@ -118,7 +118,8 @@ void ViewProperties::setViewMode(DolphinView::Mode mode)
 
 DolphinView::Mode ViewProperties::viewMode() const
 {
-    return static_cast<DolphinView::Mode>(m_node->viewMode());
+    const int mode = qBound(0, m_node->viewMode(), 2);
+    return static_cast<DolphinView::Mode>(mode);
 }
 
 void ViewProperties::setPreviewsShown(bool show)