From a26eda8d3809159615a5fe95b1cf8eb154b1374b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 25 Nov 2007 14:51:41 +0000 Subject: [PATCH] there's no need having 2-liners inside their own method when this method is only invoked once... svn path=/trunk/KDE/kdebase/apps/; revision=741371 --- src/dolphinmainwindow.cpp | 27 ++++++--------------------- src/dolphinmainwindow.h | 3 --- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ddabf21a4..63feb996e 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -210,15 +210,18 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls, switch (action) { case Qt::MoveAction: - moveUrls(urls, destination); + KonqOperations::copy(this, KonqOperations::MOVE, urls, destination); + m_undoCommandTypes.append(KonqFileUndoManager::MOVE); break; case Qt::CopyAction: - copyUrls(urls, destination); + KonqOperations::copy(this, KonqOperations::COPY, urls, destination); + m_undoCommandTypes.append(KonqFileUndoManager::COPY); break; case Qt::LinkAction: - linkUrls(urls, destination); + KonqOperations::copy(this, KonqOperations::LINK, urls, destination); + m_undoCommandTypes.append(KonqFileUndoManager::LINK); break; default: @@ -1437,24 +1440,6 @@ void DolphinMainWindow::updateGoActions() goUpAction->setEnabled(currentUrl.upUrl() != currentUrl); } -void DolphinMainWindow::copyUrls(const KUrl::List& source, const KUrl& dest) -{ - KonqOperations::copy(this, KonqOperations::COPY, source, dest); - m_undoCommandTypes.append(KonqFileUndoManager::COPY); -} - -void DolphinMainWindow::moveUrls(const KUrl::List& source, const KUrl& dest) -{ - KonqOperations::copy(this, KonqOperations::MOVE, source, dest); - m_undoCommandTypes.append(KonqFileUndoManager::MOVE); -} - -void DolphinMainWindow::linkUrls(const KUrl::List& source, const KUrl& dest) -{ - KonqOperations::copy(this, KonqOperations::LINK, source, dest); - m_undoCommandTypes.append(KonqFileUndoManager::LINK); -} - void DolphinMainWindow::clearStatusBar() { m_activeViewContainer->statusBar()->clear(); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index ef694513c..278ffffc7 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -443,9 +443,6 @@ private: void updateEditActions(); void updateViewActions(); void updateGoActions(); - void copyUrls(const KUrl::List& source, const KUrl& dest); - void moveUrls(const KUrl::List& source, const KUrl& dest); - void linkUrls(const KUrl::List& source, const KUrl& dest); void clearStatusBar(); /** -- 2.47.3