diff options
| author | Méven Car <[email protected]> | 2023-08-28 10:32:35 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-08-28 10:36:37 +0200 |
| commit | 1318f16fd7b84de79c04eb468d61e1c9b7b52e15 (patch) | |
| tree | 430c477f6d9229eede00ece60d11b09be3b498cc /src/trash | |
| parent | a2e888d9a03add380c113c0f5edff5391e90a358 (diff) | |
Clean obsolete ifdefs since dolphin requires KF 5.101+
Diffstat (limited to 'src/trash')
| -rw-r--r-- | src/trash/dolphintrash.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/trash/dolphintrash.cpp b/src/trash/dolphintrash.cpp index b37a7430d..007f48a33 100644 --- a/src/trash/dolphintrash.cpp +++ b/src/trash/dolphintrash.cpp @@ -13,13 +13,8 @@ #include <KNotification> #include <QList> -#include <kio_version.h> -#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0) #include <KIO/DeleteOrTrashJob> -#else -#include <KIO/JobUiDelegate> -#include <KJobWidgets> -#endif +#include <kio_version.h> Trash::Trash() : m_trashDirLister(new KDirLister()) @@ -62,22 +57,10 @@ static void notifyEmptied() void Trash::empty(QWidget *window) { -#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0) using Iface = KIO::AskUserActionInterface; auto *emptyJob = new KIO::DeleteOrTrashJob(QList<QUrl>{}, Iface::EmptyTrash, Iface::DefaultConfirmation, window); QObject::connect(emptyJob, &KIO::Job::result, notifyEmptied); emptyJob->start(); -#else - KIO::JobUiDelegate uiDelegate; - uiDelegate.setWindow(window); - bool confirmed = uiDelegate.askDeleteConfirmation(QList<QUrl>(), KIO::JobUiDelegate::EmptyTrash, KIO::JobUiDelegate::DefaultConfirmation); - if (confirmed) { - KIO::Job *job = KIO::emptyTrash(); - KJobWidgets::setWindow(job, window); - job->uiDelegate()->setAutoErrorHandlingEnabled(true); - QObject::connect(job, &KIO::Job::result, notifyEmptied); - } -#endif } bool Trash::isEmpty() |
