From 10f0f8d5585e89fba5c0570b4144c9df369c3bfd Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 2 Aug 2011 19:56:00 +0200 Subject: [PATCH] Minor cleanups - Cleanup whitespaces after signal-normalization patch - Cleanup DolphinView::Mode numbering --- src/views/dolphinview.cpp | 12 ++++++------ src/views/dolphinview.h | 4 ++-- src/views/viewproperties.cpp | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) 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) -- 2.47.3