Commit 6e711dd5 authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix build with KIO before 5.69.0

Commit 823abcd2 introduced a call to KIO::statDetails(), which only exists
since KIO 5.69.0.
But the specified minimum KDE Frameworks version is 5.55.0, so switch back
to using KIO::stat() when building with KIO < 5.69.0.

Also, pass KIO::StatNoDetails to KIO::statDetails() to not request unnecessary
details, as the intention is to just check whether the file exists.
parent b110846f
......@@ -53,6 +53,7 @@
#include <KSharedConfig>
#include <KConfigGroup>
#include <KHelpClient>
#include <kio_version.h>
#include <skanlite_debug.h>
......@@ -397,6 +398,11 @@ bool urlExists(const QUrl& url)
else {
KIO::StatJob *statJob = KIO::statDetails(url, KIO::StatJob::DestinationSide);
KIO::StatJob *statJob = KIO::stat(url, KIO::StatJob::DestinationSide, 0);
KIO::StatJob *statJob = KIO::statDetails(url, KIO::StatJob::DestinationSide, KIO::StatNoDetails);
KJobWidgets::setWindow(statJob, QApplication::activeWindow());
if (!statJob->exec()) {
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