From 7bb060f0cfe800dba142d34dedb0656194077f9a Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 23 Sep 2022 14:58:11 +0300 Subject: [PATCH] libs: deal with TODOs related to KonqOperations Signed-off-by: Ivailo Monev --- dolphin/src/views/dolphinview.cpp | 4 +-- libs/konq/konq_operations.cpp | 23 +++------------- libs/konq/konq_operations.h | 46 ++++++------------------------- 3 files changed, 14 insertions(+), 59 deletions(-) diff --git a/dolphin/src/views/dolphinview.cpp b/dolphin/src/views/dolphinview.cpp index 9c19fb61..da915471 100644 --- a/dolphin/src/views/dolphinview.cpp +++ b/dolphin/src/views/dolphinview.cpp @@ -1441,7 +1441,7 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray& role, con m_model->setData(index, data); } - KonqOperations* op = KonqOperations::renameV2(this, oldUrl, newName); + KonqOperations* op = KonqOperations::rename(this, oldUrl, newName); if (op && !newNameExistsAlready) { // Only connect the renamingFailed signal if there is no item with the new name // in the model yet, see bug 328262. @@ -1582,7 +1582,7 @@ void DolphinView::applyModeToView() void DolphinView::pasteToUrl(const KUrl& url) { - KonqOperations* op = KonqOperations::doPasteV2(this, url); + KonqOperations* op = KonqOperations::doPaste(this, url); if (op) { m_clearSelectionBeforeSelectingNewItems = true; m_markFirstNewlySelectedItemAsCurrent = true; diff --git a/libs/konq/konq_operations.cpp b/libs/konq/konq_operations.cpp index c9aa430f..207c679b 100644 --- a/libs/konq/konq_operations.cpp +++ b/libs/konq/konq_operations.cpp @@ -133,12 +133,7 @@ KIO::SimpleJob* KonqOperations::mkdir( QWidget *parent, const KUrl & url ) return job; } -void KonqOperations::doPaste( QWidget * parent, const KUrl & destUrl, const QPoint &pos ) -{ - (void) KonqOperations::doPasteV2( parent, destUrl, pos ); -} - -KonqOperations *KonqOperations::doPasteV2(QWidget *parent, const KUrl &destUrl, const QPoint &pos) +KonqOperations *KonqOperations::doPaste( QWidget * parent, const KUrl & destUrl, const QPoint &pos ) { QClipboard *clipboard = QApplication::clipboard(); const QMimeData *data = clipboard->mimeData(); @@ -723,12 +718,7 @@ static QString translatePath( QString path ) // krazy:exclude=passbyvalue return path; } -void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const KUrl& newurl ) -{ - renameV2(parent, oldurl, newurl); -} - -KonqOperations *KonqOperations::renameV2( QWidget * parent, const KUrl & oldurl, const KUrl& newurl ) +KonqOperations *KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const KUrl& newurl ) { kDebug(1203) << "oldurl=" << oldurl << " newurl=" << newurl; if ( oldurl == newurl ) @@ -850,17 +840,12 @@ void KonqOperations::slotResult(KJob *job) deleteLater(); } -void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const QString & name ) -{ - renameV2(parent, oldurl, name); -} - -KonqOperations *KonqOperations::renameV2( QWidget * parent, const KUrl & oldurl, const QString & name ) +KonqOperations *KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const QString & name ) { KUrl newurl( oldurl ); newurl.setPath( oldurl.directory( KUrl::AppendTrailingSlash ) + name ); kDebug(1203) << "KonqOperations::rename("<