Commit bfbaab30 authored by David Faure's avatar David Faure
Browse files

Port the Open With dialog to ApplicationLauncherJob.

Tested on a weird *.SPR file from my Borland Pascal years :)
parent 30629de4
......@@ -27,6 +27,8 @@
#include <kio/job.h>
#include <QMimeDatabase>
#include <QMimeType>
#include <KIO/ApplicationLauncherJob>
#include <KIO/JobUiDelegate>
// Local
#include "konqview.h"
......@@ -122,7 +124,12 @@ void KonqRun::foundMimeType(const QString &_type)
if (selectedService) {
KRun::setPreferredService(selectedService->desktopEntryName());
} else {
KRun::displayOpenWithDialog(QList<QUrl>() << url(), m_pMainWindow, false /*tempfile*/, suggestedFileName());
// Open-with dialog
KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob();
job->setUrls({url()});
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, m_pMainWindow));
job->setSuggestedFileName(suggestedFileName());
job->start();
setFinished(true);
}
}
......
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