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
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();