Commit 9ae855e0 authored by Méven Car's avatar Méven Car

Kicker/RecentUsageModel: Allow to open smb:/ sftp:/ resources

Since D10835 opening urls that needed mimetype determination such as smb:/ or sftp:/ urls were always opened with a "Open With" dialog.
To keep the same security but adding some convenience, use KRun::setRunExecutables to disable executable run here.

Reviewers: #plasma, broulik, aleksejshilin, hein

Reviewed By: #plasma, hein

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 99450132
......@@ -343,18 +343,9 @@ bool RecentUsageModel::trigger(int row, const QString &actionId, const QVariant
if (!resource.startsWith(QLatin1String("applications:"))) {
const QUrl resourceUrl = docData(resource, Kicker::UrlRole).toUrl();
const QList<QUrl> urlsList{resourceUrl};
QMimeDatabase db;
QMimeType mime = db.mimeTypeForUrl(resourceUrl);
KService::Ptr service = KMimeTypeTrader::self()->preferredService(;
if (service) {
KRun::runApplication(*service, urlsList, nullptr);
} else {
QTimer::singleShot(0, [urlsList] {
KRun::displayOpenWithDialog(urlsList, nullptr);
KRun *run = new KRun(resourceUrl, nullptr);
return true;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment