Man Pages: open unsupported links externally
External opening offers a much better experience than the current silent ignoring of the user's navigation attempt.
I have tried the following code in place of
QDesktopServices::openUrl(url))
:
auto* const job = new KIO::OpenUrlJob{url};
job->setUiDelegate(new KIO::JobUiDelegate(
KJobUiDelegate::AutoHandlingEnabled,
ICore::self()->uiController()->activeMainWindow()));
// job->setStartupId(KStartupInfo::startupId());
job->start();
The KIO::OpenUrlJob()
code probably handles errors better, but it is
more verbose and requires including 4 headers. Errors are uncommon in
this case, so I decided to go with the simpler alternative.
Edited by Igor Kushnir