From: Nicolas Fella Date: Thu, 3 Feb 2022 23:18:00 +0000 (+0100) Subject: Fix opening FTP files in their preferred app X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/3b4676b3871cad5cd0e4695b211581f8db8accd0 Fix opening FTP files in their preferred app When passing an URL like ftp://foo/bar.txt OpenUrlJob opens it in the default handler for ftp urls, not the one for txt files, which would be more appropriate here By passing along the mimetype we can change that behavior to what we want BUG: 443253 --- diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 5520bf794..70e473601 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -649,7 +649,7 @@ void DolphinViewContainer::slotItemActivated(const KFileItem& item) return; } - KIO::OpenUrlJob *job = new KIO::OpenUrlJob(item.targetUrl()); + KIO::OpenUrlJob *job = new KIO::OpenUrlJob(item.targetUrl(), item.mimetype()); job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this)); job->setShowOpenOrExecuteDialog(true); job->start();