From: Peter Penz Date: Tue, 2 Aug 2011 17:56:00 +0000 (+0200) Subject: Minor cleanups X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/10f0f8d5585e89fba5c0570b4144c9df369c3bfd Minor cleanups - Cleanup whitespaces after signal-normalization patch - Cleanup DolphinView::Mode numbering --- diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 83877dcba..95a90edd8 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -150,12 +150,12 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) : connect(m_dirLister, SIGNAL(refreshItems(QList >)), 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); diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 3313130a8..c9be8a56a 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -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. */ diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index aeea67428..e67cbd87a 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -118,7 +118,8 @@ void ViewProperties::setViewMode(DolphinView::Mode mode) DolphinView::Mode ViewProperties::viewMode() const { - return static_cast(m_node->viewMode()); + const int mode = qBound(0, m_node->viewMode(), 2); + return static_cast(mode); } void ViewProperties::setPreviewsShown(bool show)