diff options
| author | David Faure <[email protected]> | 2021-03-06 15:12:13 +0200 |
|---|---|---|
| committer | David Faure <[email protected]> | 2021-04-06 15:12:20 +0200 |
| commit | 2200e3c06daa0b23cfbc1277e351a2a08e586953 (patch) | |
| tree | 6ef7c47b6af8ac7df7f1516db0c119f65651ea85 /src/trash | |
| parent | f334a736b9e9d23e02b1e36913a825d087753b8c (diff) | |
Fix deprecated method calls when using KIO >= 5.82
Diffstat (limited to 'src/trash')
| -rw-r--r-- | src/trash/dolphintrash.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |
