Removed warning, minor coding style update

This commit is contained in:
Peter Penz 2011-09-01 15:56:54 +02:00
parent 9e6d73aef8
commit fc5cb366c2

View file

@ -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 {
emit itemActivated(fileItem);
foreach (const KFileItem& item, items) {
if (item.isDir()) {
emit tabRequested(item.url());
} else {
emit itemActivated(item);
}
}
}