┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 0d31df2da..635121062 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -48,7 +48,6 @@
#include <KJobWidgets>
#include <KLocalizedString>
#include <KMessageBox>
-#include <KMoreToolsMenuFactory>
#include <KProtocolInfo>
#include <KProtocolManager>
#include <KShell>
@@ -1127,15 +1126,20 @@ void DolphinMainWindow::toggleShowMenuBar()
QPointer<QAction> DolphinMainWindow::preferredSearchTool()
{
m_searchTools.clear();
- KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames(&m_searchTools, {"files-find"}, m_activeViewContainer->url());
- QList<QAction *> actions = m_searchTools.actions();
- if (actions.isEmpty()) {
- return nullptr;
- }
- QAction *action = actions.first();
- if (action->isSeparator()) {
+
+ KService::Ptr kfind = KService::serviceByDesktopName(QStringLiteral("org.kde.kfind"));
+
+ if (!kfind) {
return nullptr;
}
+
+ auto *action = new QAction(QIcon::fromTheme(kfind->icon()), kfind->name(), this);
+
+ connect(action, &QAction::triggered, this, [kfind] {
+ auto *job = new KIO::ApplicationLauncherJob(kfind);
+ job->start();
+ });
+
return action;
}