]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix compilation on OpenSolaris with Sun Studio
authorPeter Penz <peter.penz19@gmail.com>
Sun, 14 Mar 2010 13:18:09 +0000 (13:18 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 14 Mar 2010 13:18:09 +0000 (13:18 +0000)
Thanks to Tropikhajma for the patch!

BUG: 230251

svn path=/trunk/KDE/kdebase/apps/; revision=1103145

src/dolphinpart.cpp

index 0a17c788414e5818f66dff5d8f44dbc1d89b2b54..519d05741dc146a6c460a9cb3ec0429057126a2a 100644 (file)
@@ -384,8 +384,13 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item,
 
     // TODO: We should change the signature of the slots (and signals) for being able
     //       to tell for which items we want a popup.
-    const KFileItemList items = (m_view->selectedItems().count() ? m_view->selectedItems()
-                                 : KFileItemList() << item);
+    KFileItemList items;
+    if (m_view->selectedItems().isEmpty()) {
+        items.append(item);
+    } else {
+        items = m_view->selectedItems();
+    }
+
     KFileItemListProperties capabilities(items);
 
     KParts::BrowserExtension::ActionGroupMap actionGroups;