- popup->addSeparator();
- foreach (QAction* action, m_parent->customContextMenuActions()) {
- popup->addAction(action);
+ if (!m_fileItem.isNull()) {
+ // insert 'Properties' entry
+ QAction* propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this);
+ propertiesAction->setIcon(KIcon("document-properties"));
+ connect(propertiesAction, &QAction::triggered, this, &TreeViewContextMenu::showProperties);
+ popup->addAction(propertiesAction);
+ }
+
+ QList<QAction*> customActions = m_parent->customContextMenuActions();
+ if (!customActions.isEmpty()) {
+ popup->addSeparator();
+ foreach (QAction* action, customActions) {
+ popup->addAction(action);
+ }