From: David Faure Date: Thu, 15 Nov 2007 10:10:42 +0000 (+0000) Subject: KonqUndoManager -> KonqFileUndoManager, to prepare for a KonqUndoManager in konqueror, X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/205bf2035d30517e781271bbcae8e4c102d71871 KonqUndoManager -> KonqFileUndoManager, to prepare for a KonqUndoManager in konqueror, Taking this opportunity for filename==classname and a .cpp extension, as well. svn path=/trunk/KDE/kdebase/apps/; revision=737032 --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 8f68724ac..18476adb5 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -89,9 +89,9 @@ DolphinMainWindow::DolphinMainWindow(int id) : new MainWindowAdaptor(this); QDBusConnection::sessionBus().registerObject(QString("/dolphin/MainWindow%1").arg(m_id), this); - KonqUndoManager::incRef(); + KonqFileUndoManager::incRef(); - KonqUndoManager* undoManager = KonqUndoManager::self(); + KonqFileUndoManager* undoManager = KonqFileUndoManager::self(); undoManager->setUiInterface(new UndoUiInterface(this)); connect(undoManager, SIGNAL(undoAvailable(bool)), @@ -104,7 +104,7 @@ DolphinMainWindow::DolphinMainWindow(int id) : DolphinMainWindow::~DolphinMainWindow() { - KonqUndoManager::decRef(); + KonqFileUndoManager::decRef(); DolphinApplication::app()->removeMainWindow(this); } @@ -127,7 +127,7 @@ void DolphinMainWindow::rename(const KUrl& oldUrl, const KUrl& newUrl) { clearStatusBar(); KonqOperations::rename(this, oldUrl, newUrl); - m_undoCommandTypes.append(KonqUndoManager::RENAME); + m_undoCommandTypes.append(KonqFileUndoManager::RENAME); } void DolphinMainWindow::refreshViews() @@ -492,7 +492,7 @@ void DolphinMainWindow::moveToTrash() clearStatusBar(); const KUrl::List selectedUrls = m_activeViewContainer->view()->selectedUrls(); KonqOperations::del(this, KonqOperations::TRASH, selectedUrls); - m_undoCommandTypes.append(KonqUndoManager::TRASH); + m_undoCommandTypes.append(KonqFileUndoManager::TRASH); } void DolphinMainWindow::deleteItems() @@ -561,31 +561,31 @@ void DolphinMainWindow::slotUndoAvailable(bool available) } if (available && (m_undoCommandTypes.count() > 0)) { - const KonqUndoManager::CommandType command = m_undoCommandTypes.takeFirst(); + const KonqFileUndoManager::CommandType command = m_undoCommandTypes.takeFirst(); DolphinStatusBar* statusBar = m_activeViewContainer->statusBar(); switch (command) { - case KonqUndoManager::COPY: + case KonqFileUndoManager::COPY: statusBar->setMessage(i18nc("@info:status", "Copy operation completed."), DolphinStatusBar::OperationCompleted); break; - case KonqUndoManager::MOVE: + case KonqFileUndoManager::MOVE: statusBar->setMessage(i18nc("@info:status", "Move operation completed."), DolphinStatusBar::OperationCompleted); break; - case KonqUndoManager::LINK: + case KonqFileUndoManager::LINK: statusBar->setMessage(i18nc("@info:status", "Link operation completed."), DolphinStatusBar::OperationCompleted); break; - case KonqUndoManager::TRASH: + case KonqFileUndoManager::TRASH: statusBar->setMessage(i18nc("@info:status", "Move to trash operation completed."), DolphinStatusBar::OperationCompleted); break; - case KonqUndoManager::RENAME: + case KonqFileUndoManager::RENAME: statusBar->setMessage(i18nc("@info:status", "Renaming operation completed."), DolphinStatusBar::OperationCompleted); break; - case KonqUndoManager::MKDIR: + case KonqFileUndoManager::MKDIR: statusBar->setMessage(i18nc("@info:status", "Created folder."), DolphinStatusBar::OperationCompleted); break; @@ -608,7 +608,7 @@ void DolphinMainWindow::slotUndoTextChanged(const QString& text) void DolphinMainWindow::undo() { clearStatusBar(); - KonqUndoManager::self()->undo(); + KonqFileUndoManager::self()->undo(); } void DolphinMainWindow::cut() @@ -1536,19 +1536,19 @@ void DolphinMainWindow::updateGoActions() void DolphinMainWindow::copyUrls(const KUrl::List& source, const KUrl& dest) { KonqOperations::copy(this, KonqOperations::COPY, source, dest); - m_undoCommandTypes.append(KonqUndoManager::COPY); + 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(KonqUndoManager::MOVE); + 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(KonqUndoManager::LINK); + m_undoCommandTypes.append(KonqFileUndoManager::LINK); } void DolphinMainWindow::clearStatusBar() @@ -1631,7 +1631,7 @@ void DolphinMainWindow::toggleAdditionalInfo(const char* actionName, } DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) : - KonqUndoManager::UiInterface(mainWin), + KonqFileUndoManager::UiInterface(mainWin), m_mainWin(mainWin) { Q_ASSERT(m_mainWin != 0); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index ca8001165..e33de4ef6 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -484,7 +484,7 @@ private: * assures that all errors are shown in the status bar of Dolphin * instead as modal error dialog with an OK button. */ - class UndoUiInterface : public KonqUndoManager::UiInterface + class UndoUiInterface : public KonqFileUndoManager::UiInterface { public: UndoUiInterface(DolphinMainWindow* mainWin); @@ -503,7 +503,7 @@ private: DolphinViewContainer* m_viewContainer[SecondaryView + 1]; /// remember pending undo operations until they are finished - QList m_undoCommandTypes; + QList m_undoCommandTypes; }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index f3a836b73..0a7516c45 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -201,7 +201,7 @@ void DolphinViewContainer::renameSelectedItems() view->statusBar()->setMessage(dialog.errorString(), DolphinStatusBar::Error); } else { - // TODO: check how this can be integrated into KonqUndoManager/KonqOperations + // TODO: check how this can be integrated into KonqFileUndoManager/KonqOperations // as one operation instead of n rename operations like it is done now... Q_ASSERT(newName.contains('#'));