From fc5cb366c2b96bc9fc170a5a45308dde0fc64375 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 1 Sep 2011 15:56:54 +0200 Subject: [PATCH] Removed warning, minor coding style update --- src/views/dolphinview.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 448bd9daa8..53171966c8 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -703,18 +703,21 @@ void DolphinView::activate() void DolphinView::slotItemActivated(int index) { + Q_UNUSED(index); + const KFileItemList items = selectedItems(); - if (items.isEmpty()) + if (items.isEmpty()) { return; + } + if (items.count() == 1) { emit itemActivated(items.at(0)); // caught by DolphinViewContainer or DolphinPart - } - else { - foreach (const KFileItem& fileItem, items) { - if (fileItem.isDir()) { - emit tabRequested(fileItem.url()); + } else { + foreach (const KFileItem& item, items) { + if (item.isDir()) { + emit tabRequested(item.url()); } else { - emit itemActivated(fileItem); + emit itemActivated(item); } } }