diff options
author | David Schulz <david.schulz@qt.io> | 2021-06-11 14:34:34 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2021-06-17 11:13:51 +0000 |
commit | f66df921d74c323d899f996d9ca520c224355a90 (patch) | |
tree | 42ef20fe9de0b55b756d9ba56b731d1a474c9c08 /src/plugins/fakevim | |
parent | 55b91a76172a3235b4879daf0b675519d5b02db7 (diff) |
Core: filepathify file renaming
Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r-- | src/plugins/fakevim/fakevimplugin.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 09148aa5793..49ded4a2048 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -531,9 +531,9 @@ public: void editorAboutToClose(Core::IEditor *); void currentEditorAboutToChange(Core::IEditor *); - void allDocumentsRenamed(const QString &oldName, const QString &newName); - void documentRenamed(Core::IDocument *document, const QString &oldName, const QString &newName); - void renameFileNameInEditors(const QString &oldName, const QString &newName); + void allDocumentsRenamed(const FilePath &oldPath, const FilePath &newPath); + void documentRenamed(Core::IDocument *document, const FilePath &oldPath, const FilePath &newPath); + void renameFileNameInEditors(const FilePath &oldPath, const FilePath &newPath); void setUseFakeVim(bool on); void setUseFakeVimInternal(bool on); @@ -1881,23 +1881,23 @@ void FakeVimPluginPrivate::currentEditorAboutToChange(IEditor *editor) handler->enterCommandMode(); } -void FakeVimPluginPrivate::allDocumentsRenamed(const QString &oldName, const QString &newName) +void FakeVimPluginPrivate::allDocumentsRenamed(const FilePath &oldPath, const FilePath &newPath) { - renameFileNameInEditors(oldName, newName); - FakeVimHandler::updateGlobalMarksFilenames(oldName, newName); + renameFileNameInEditors(oldPath, newPath); + FakeVimHandler::updateGlobalMarksFilenames(oldPath.toString(), newPath.toString()); } void FakeVimPluginPrivate::documentRenamed( - IDocument *, const QString &oldName, const QString &newName) + IDocument *, const FilePath &oldPath, const FilePath &newPath) { - renameFileNameInEditors(oldName, newName); + renameFileNameInEditors(oldPath, newPath); } -void FakeVimPluginPrivate::renameFileNameInEditors(const QString &oldName, const QString &newName) +void FakeVimPluginPrivate::renameFileNameInEditors(const FilePath &oldPath, const FilePath &newPath) { foreach (FakeVimHandler *handler, m_editorToHandler.values()) { - if (handler->currentFileName() == oldName) - handler->setCurrentFileName(newName); + if (handler->currentFileName() == oldPath.toString()) + handler->setCurrentFileName(newPath.toString()); } } |