diff options
| -rw-r--r-- | src/kitemviews/private/kfileitemmodeldirlister.cpp | 5 | ||||
| -rw-r--r-- | src/trash/dolphintrash.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/kitemviews/private/kfileitemmodeldirlister.cpp b/src/kitemviews/private/kfileitemmodeldirlister.cpp index 90c970874..eb860a2b9 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.cpp +++ b/src/kitemviews/private/kfileitemmodeldirlister.cpp @@ -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() diff --git a/src/trash/dolphintrash.cpp b/src/trash/dolphintrash.cpp index bec266c3b..8684cda06 100644 --- a/src/trash/dolphintrash.cpp +++ b/src/trash/dolphintrash.cpp @@ -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(); |
