]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix deprecated method calls when using KIO >= 5.82
authorDavid Faure <faure@kde.org>
Sat, 6 Mar 2021 13:12:13 +0000 (15:12 +0200)
committerDavid Faure <faure@kde.org>
Tue, 6 Apr 2021 13:12:20 +0000 (15:12 +0200)
src/kitemviews/private/kfileitemmodeldirlister.cpp
src/trash/dolphintrash.cpp

index 90c9708744cb1a7cfca7de1d5c5f031358c6b993..eb860a2b9f4e7ae2178b1752a03c6f2f4b9ec727 100644 (file)
@@ -8,11 +8,16 @@
 
 #include <KLocalizedString>
 #include <KIO/Job>
+#include <kio_version.h>
 
 KFileItemModelDirLister::KFileItemModelDirLister(QObject* parent) :
     KDirLister(parent)
 {
+#if KIO_VERSION < QT_VERSION_CHECK(5, 82, 0)
     setAutoErrorHandlingEnabled(false, nullptr);
+#else
+    setAutoErrorHandlingEnabled(false);
+#endif
 }
 
 KFileItemModelDirLister::~KFileItemModelDirLister()
index bec266c3bab3818643ad85433873e4b3e84cc46a..8684cda0690db9a2c337e50dd441a78816ffda3a 100644 (file)
@@ -8,6 +8,7 @@
 #include "dolphintrash.h"
 
 #include <KIO/JobUiDelegate>
+#include <kio_version.h>
 #include <KJobWidgets>
 #include <QList>
 #include <KNotification>
@@ -21,7 +22,11 @@ Trash::Trash()
     // The trash icon must always be updated dependent on whether
     // the trash is empty or not. We use a KDirLister that automatically
     // watches for changes if the number of items has been changed.
+#if KIO_VERSION < QT_VERSION_CHECK(5, 82, 0)
     m_trashDirLister->setAutoErrorHandlingEnabled(false, nullptr);
+#else
+    m_trashDirLister->setAutoErrorHandlingEnabled(false);
+#endif
     m_trashDirLister->setDelayedMimeTypes(true);
     auto trashDirContentChanged = [this]() {
         bool isTrashEmpty = m_trashDirLister->items().isEmpty();