Port away from deprecated KIO::stat()

GIT_SILENT
parent d2549f90
......@@ -35,6 +35,7 @@
#include <KGuiItem>
#include <KIconLoader>
#include <kio_version.h>
#include <KIO/StatJob>
#include <KIO/CopyJob>
#include <KJobWidgets>
......@@ -288,7 +289,11 @@ void HighscoresDialog::slotUser2()
// kDebug(11001) ;
QUrl url = QFileDialog::getSaveFileUrl(this, tr("HighscoresDialog"), QUrl(), QString());
if ( url.isEmpty() ) return;
#if KIO_VERSION >= QT_VERSION_CHECK(5, 69, 0)
auto job = KIO::statDetails(url, KIO::StatJob::SourceSide, KIO::StatNoDetails);
#else
auto job = KIO::stat(url, KIO::StatJob::SourceSide, 0);
#endif
KJobWidgets::setWindow(job, this);
job->exec();
if (!job->error()) {
......
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