From be63cea8e86d667296f77ac603867b4cc4c37f7b Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Fri, 9 Oct 2020 19:30:09 +0000 Subject: [PATCH] Port from KRun (deprecated) to OpenUrlJob --- plugins/sftp/sftpplugin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/sftp/sftpplugin.cpp b/plugins/sftp/sftpplugin.cpp index 9a6484567..a9e9bdf0e 100644 --- a/plugins/sftp/sftpplugin.cpp +++ b/plugins/sftp/sftpplugin.cpp @@ -11,9 +11,10 @@ #include #include +#include +#include #include #include -#include #include #include @@ -112,8 +113,10 @@ QString SftpPlugin::getMountError() bool SftpPlugin::startBrowsing() { if (mountAndWait()) { - //return new KRun(QUrl::fromLocalFile(mountPoint()), 0); - return new KRun(QUrl(QStringLiteral("kdeconnect://") + deviceId), nullptr); + auto *job = new KIO::OpenUrlJob(QUrl(QStringLiteral("kdeconnect://") + deviceId)); + job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled)); + job->start(); + return true; } return false; }