┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinremoteencoding.cpp4
-rw-r--r--src/views/dolphinview.cpp30
-rw-r--r--src/views/dolphinviewactionhandler.cpp2
3 files changed, 5 insertions, 31 deletions
diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp
index 2881915ac..32dd6bd29 100644
--- a/src/views/dolphinremoteencoding.cpp
+++ b/src/views/dolphinremoteencoding.cpp
@@ -87,7 +87,7 @@ void DolphinRemoteEncoding::fillMenu()
QMenu *menu = m_menu->menu();
menu->clear();
- menu->addAction(i18n("Default"), this, SLOT(slotDefault()), 0)->setCheckable(true);
+ menu->addAction(i18n("Default"), this, &DolphinRemoteEncoding::slotDefault)->setCheckable(true);
for (int i = 0; i < m_encodingDescriptions.size(); i++) {
QAction *action = new QAction(m_encodingDescriptions.at(i), this);
action->setCheckable(true);
@@ -96,7 +96,7 @@ void DolphinRemoteEncoding::fillMenu()
}
menu->addSeparator();
- menu->addAction(i18n("Reload"), this, SLOT(slotReload()), 0);
+ menu->addAction(i18n("Reload"), this, &DolphinRemoteEncoding::slotReload);
m_idDefault = m_encodingDescriptions.size() + 2;
connect(menu, &QMenu::triggered, this, &DolphinRemoteEncoding::slotItemSelected);
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 13c8b4df2..3db81ec18 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -35,7 +35,7 @@
#include <KFileItemListProperties>
#include <KFormat>
#include <KIO/CopyJob>
-#include <KIO/DeleteJob>
+#include <KIO/DeleteOrTrashJob>
#include <KIO/DropJob>
#include <KIO/JobUiDelegate>
#include <KIO/Paste>
@@ -49,11 +49,6 @@
#include <kwidgetsaddons_version.h>
-#include <kio_version.h>
-#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
-#include <KIO/DeleteOrTrashJob>
-#endif
-
#include <QAbstractItemView>
#include <QActionGroup>
#include <QApplication>
@@ -624,7 +619,7 @@ void DolphinView::requestStatusBarText()
return;
}
- m_statJobForStatusBarText = KIO::statDetails(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
+ m_statJobForStatusBarText = KIO::stat(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
connect(m_statJobForStatusBarText, &KJob::result, this, &DolphinView::slotStatJobResult);
m_statJobForStatusBarText->start();
}
@@ -758,43 +753,22 @@ void DolphinView::trashSelectedItems()
{
const QList<QUrl> list = simplifiedSelectedUrls();
-#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
using Iface = KIO::AskUserActionInterface;
auto *trashJob = new KIO::DeleteOrTrashJob(list, Iface::Trash, Iface::DefaultConfirmation, this);
connect(trashJob, &KJob::result, this, &DolphinView::slotTrashFileFinished);
m_selectNextItem = true;
trashJob->start();
-#else
- KIO::JobUiDelegate uiDelegate;
- uiDelegate.setWindow(window());
- if (uiDelegate.askDeleteConfirmation(list, KIO::JobUiDelegate::Trash, KIO::JobUiDelegate::DefaultConfirmation)) {
- KIO::Job *job = KIO::trash(list);
- KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Trash, list, QUrl(QStringLiteral("trash:/")), job);
- KJobWidgets::setWindow(job, this);
- connect(job, &KIO::Job::result, this, &DolphinView::slotTrashFileFinished);
- }
-#endif
}
void DolphinView::deleteSelectedItems()
{
const QList<QUrl> list = simplifiedSelectedUrls();
-#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
using Iface = KIO::AskUserActionInterface;
auto *trashJob = new KIO::DeleteOrTrashJob(list, Iface::Delete, Iface::DefaultConfirmation, this);
connect(trashJob, &KJob::result, this, &DolphinView::slotTrashFileFinished);
m_selectNextItem = true;
trashJob->start();
-#else
- KIO::JobUiDelegate uiDelegate;
- uiDelegate.setWindow(window());
- if (uiDelegate.askDeleteConfirmation(list, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation)) {
- KIO::Job *job = KIO::del(list);
- KJobWidgets::setWindow(job, this);
- connect(job, &KIO::Job::result, this, &DolphinView::slotDeleteFileFinished);
- }
-#endif
}
void DolphinView::cutSelectedItemsToClipboard()
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp
index 7117e9e1b..4408a9e47 100644
--- a/src/views/dolphinviewactionhandler.cpp
+++ b/src/views/dolphinviewactionhandler.cpp
@@ -215,7 +215,7 @@ void DolphinViewActionHandler::createActions(SelectionMode::ActionTextHelper *ac
viewModeActions->addAction(compactAction);
viewModeActions->addAction(detailsAction);
viewModeActions->setToolBarMode(KSelectAction::MenuMode);
- connect(viewModeActions, &KSelectAction::triggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
+ connect(viewModeActions, &KSelectAction::actionTriggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
QAction *zoomInAction = KStandardAction::zoomIn(this, &DolphinViewActionHandler::zoomIn, m_actionCollection);
zoomInAction->setWhatsThis(i18nc("@info:whatsthis zoom in", "This increases the icon size."));