Port from KRun (deprecated) to OpenUrlJob
This commit is contained in:
parent
5fc9fb0fb2
commit
be63cea8e8
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue