Commit be63cea8 authored by Ahmad Samir's avatar Ahmad Samir Committed by Nicolas Fella

Port from KRun (deprecated) to OpenUrlJob

parent 5fc9fb0f
Pipeline #37039 passed with stage
in 10 minutes and 46 seconds
......@@ -11,9 +11,10 @@
#include <QDebug>
#include <QStandardPaths>
#include <KIO/OpenUrlJob>
#include <KNotificationJobUiDelegate>
#include <KLocalizedString>
#include <KNotification>
#include <KRun>
#include <KFilePlacesModel>
#include <KPluginFactory>
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment