diff options
| author | Nicolas Fella <[email protected]> | 2023-11-07 15:45:01 +0100 |
|---|---|---|
| committer | Nicolas Fella <[email protected]> | 2023-11-08 13:36:51 +0000 |
| commit | 2cd3d58eec5695899c26ca66a631fb79867b6584 (patch) | |
| tree | 8ea47aeaea6eda7aee91885fe545cd930cd070a9 /src/dolphinpart.cpp | |
| parent | 8297e0a8c97c6e1f6d46b9ecc9c5f495f294d5b8 (diff) | |
Port away from KMoreTools
The idea behind KMoreTools was to point the user at external tools for a given job.
It provides a rather complex framework for that, including suggesting not-yet-installed tools.
The UX behind that isn't great though, which somewhat deep menu hierarchies and a somewhat arbitrary list of tools.
Most KDE apps have moved away from it, with only Dolphin remaining.
Instead provide direct integration with relevant KDE tools (Filelight, KDiskFree, KFind)
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 4ba1f0742..bb27e0a5e 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -28,7 +28,6 @@ #include <KLocalizedString> #include <KMessageBox> #include <KMimeTypeEditor> -#include <KMoreToolsMenuFactory> #include <KPluginFactory> #include <KPluginMetaData> #include <KSharedConfig> @@ -527,17 +526,10 @@ void DolphinPart::slotOpenTerminal() void DolphinPart::slotFindFile() { - QMenu searchTools; - KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames(&searchTools, {"files-find"}, QUrl::fromLocalFile(localFilePathOrHome())); - QList<QAction *> actions = searchTools.actions(); - if (!(actions.isEmpty())) { - actions.first()->trigger(); - } else { - KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(QStringLiteral("kfind"), {url().toString()}, this); - job->setDesktopName(QStringLiteral("org.kde.kfind")); - job->setUiDelegate(new KDialogJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, widget())); - job->start(); - } + KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(QStringLiteral("kfind"), {url().toString()}, this); + job->setDesktopName(QStringLiteral("org.kde.kfind")); + job->setUiDelegate(new KDialogJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, widget())); + job->start(); } void DolphinPart::updateNewMenu() |
