mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Removed warning, minor coding style update
This commit is contained in:
parent
9e6d73aef8
commit
fc5cb366c2
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue