Commit 7a14f05a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile against kio 5.69.0

parent 9f075c60
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "MessageCore/MessageCoreSettings" #include "MessageCore/MessageCoreSettings"
#include "MessageCore/NodeHelper" #include "MessageCore/NodeHelper"
#include "MessageCore/StringUtil" #include "MessageCore/StringUtil"
#include <kio_version.h>
#include "PimCommon/RenameFileDialog" #include "PimCommon/RenameFileDialog"
...@@ -154,7 +155,11 @@ bool Util::checkOverwrite(const QUrl &url, QWidget *w) ...@@ -154,7 +155,11 @@ bool Util::checkOverwrite(const QUrl &url, QWidget *w)
if (url.isLocalFile()) { if (url.isLocalFile()) {
fileExists = QFile::exists(url.toLocalFile()); fileExists = QFile::exists(url.toLocalFile());
} else { } else {
auto job = KIO::stat(url, KIO::StatJob::DestinationSide, 0); #if KIO_VERSION < QT_VERSION_CHECK(5, 69, 0)
auto job = KIO::stat(url, KIO::StatJob::DestinationSide, 0, KIO::JobFlag::DefaultFlags);
#else
auto job = KIO::statDetails(url, KIO::StatJob::DestinationSide, KIO::StatDetail::Basic);
#endif
KJobWidgets::setWindow(job, w); KJobWidgets::setWindow(job, w);
fileExists = job->exec(); fileExists = job->exec();
} }
...@@ -316,7 +321,11 @@ bool Util::saveContents(QWidget *parent, const KMime::Content::List &contents, Q ...@@ -316,7 +321,11 @@ bool Util::saveContents(QWidget *parent, const KMime::Content::List &contents, Q
if (curUrl.isLocalFile()) { if (curUrl.isLocalFile()) {
fileExists = QFile::exists(curUrl.toLocalFile()); fileExists = QFile::exists(curUrl.toLocalFile());
} else { } else {
#if KIO_VERSION < QT_VERSION_CHECK(5, 69, 0)
auto job = KIO::stat(curUrl, KIO::StatJob::DestinationSide, 0); auto job = KIO::stat(curUrl, KIO::StatJob::DestinationSide, 0);
#else
auto job = KIO::statDetails(url, KIO::StatJob::DestinationSide, KIO::StatDetail::Basic);
#endif
KJobWidgets::setWindow(job, parent); KJobWidgets::setWindow(job, parent);
fileExists = job->exec(); fileExists = job->exec();
} }
......
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