Commit ecb5baf3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated krun method

parent c135dea2
Pipeline #21443 passed with stage
in 7 minutes and 7 seconds
...@@ -25,7 +25,13 @@ ...@@ -25,7 +25,13 @@
#include "calendarsupport_debug.h" #include "calendarsupport_debug.h"
#include <KIO/ApplicationLauncherJob> #include <KIO/ApplicationLauncherJob>
#include <kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#else
#include <KRun> #include <KRun>
#endif
#include <KService> #include <KService>
#include <QUrl> #include <QUrl>
...@@ -99,7 +105,12 @@ bool UriHandler::process(const QString &uri) ...@@ -99,7 +105,12 @@ bool UriHandler::process(const QString &uri)
return startKAddressbook(uri); return startKAddressbook(uri);
} }
} else { // no special URI, let KDE handle it } else { // no special URI, let KDE handle it
#if KIO_VERSION >= QT_VERSION_CHECK(5, 71, 0)
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(QUrl(uri));
job->start();
#else
new KRun(QUrl(uri), nullptr); new KRun(QUrl(uri), nullptr);
#endif
} }
return false; return false;
......
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