diff --git a/src/widgets/kfileitemactions.cpp b/src/widgets/kfileitemactions.cpp --- a/src/widgets/kfileitemactions.cpp +++ b/src/widgets/kfileitemactions.cpp @@ -607,9 +607,6 @@ // "Open With..." for folders is really not very useful, especially for remote folders. // (media:/something, or trash:/, or ftp://...) if (!d->m_props.isDirectory() || isLocal) { - if (!topMenu->actions().isEmpty()) { - topMenu->addSeparator(); - } QAction *runAct = new QAction(this); QString runActionName; @@ -650,9 +647,11 @@ if (!offers.isEmpty()) { QMenu *menu = topMenu; - // Always show the top app inline - QAction *act = d->createAppAction(offers.takeFirst(), true); - menu->addAction(act); + // Show the top app inline for files, but not folders + if (!d->m_props.isDirectory()) { + QAction *act = d->createAppAction(offers.takeFirst(), true); + menu->addAction(act); + } // If there are still more apps, show them in a sub-menu if (!offers.isEmpty()) { // submenu 'open with'