┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.cpp
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2020-04-14 00:11:16 +0200
committerDavid Faure <[email protected]>2020-04-18 13:07:08 +0200
commitec2c69726a89daea1348efbd0e1c6e92145f1773 (patch)
tree05bd671a754718565245a069f1a9cc3a78dec9b3 /src/dolphinpart.cpp
parent8fa3e7c14521199390af02b08b4086a3da71f60c (diff)
DolphinPart: port dolphin's last use of KRun::run to CommandLauncherJob.
Summary: I chose CommandLauncherJob rather than ApplicationLauncherJob because that would require either looking up org.kde.kfind.desktop (with a risk of failure) or duplicating the icon name... Test Plan: commented out the if() block of the slot, to make sure we end up launching kfind with this code. Then konqueror /, and Ctrl+F. Reviewers: broulik Reviewed By: broulik Differential Revision: https://phabricator.kde.org/D28810
Diffstat (limited to 'src/dolphinpart.cpp')
-rw-r--r--src/dolphinpart.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index 7e7425121..0c41b2bec 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -34,6 +34,7 @@
#include <KActionCollection>
#include <KAuthorized>
#include <KConfigGroup>
+#include <KDialogJobUiDelegate>
#include <KFileItemListProperties>
#include <KIconLoader>
#include <KJobWidgets>
@@ -42,7 +43,7 @@
#include <KMimeTypeEditor>
#include <KNS3/KMoreToolsMenuFactory>
#include <KPluginFactory>
-#include <KRun>
+#include <KIO/CommandLauncherJob>
#include <KSharedConfig>
#include <KToolInvocation>
@@ -546,7 +547,10 @@ void DolphinPart::slotFindFile()
if (!(actions.isEmpty())) {
actions.first()->trigger();
} else {
- KRun::run(QStringLiteral("kfind"), {url()}, widget());
+ 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();
}
}