diff options
| author | Peter Penz <[email protected]> | 2011-09-01 15:56:54 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-09-01 15:57:34 +0200 |
| commit | fc5cb366c2b96bc9fc170a5a45308dde0fc64375 (patch) | |
| tree | f9f2812b1b16616d9f2894c86ec1756028fe4e40 /src | |
| parent | 9e6d73aef89453c1c251a8678d730e3dea2f8d54 (diff) | |
Removed warning, minor coding style update
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/dolphinview.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 448bd9daa..53171966c 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); } } } |
