summaryrefslogtreecommitdiff
path: root/src/plugins/fakevim
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2012-02-14 16:43:51 +0100
committerEike Ziller <eike.ziller@nokia.com>2012-02-20 13:32:49 +0100
commitd66acb51d0c8b511df9f679806cbd3d84cce41ef (patch)
tree58289c9e7f7bc6107b4d620fad791a206d097555 /src/plugins/fakevim
parent266da3568d2db185f67227d38e29cd20d28fb2bd (diff)
downloadqt-creator-d66acb51d0c8b511df9f679806cbd3d84cce41ef.tar.gz
Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively. Change-Id: I1e04e555409be09242db6890f9e013396f83aeed Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 015d6ff47d..350d9b58a5 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -44,9 +44,9 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/openeditorsmodel.h>
-#include <coreplugin/filemanager.h>
+#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
-#include <coreplugin/ifile.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/id.h>
#include <coreplugin/statusbarwidget.h>
@@ -726,7 +726,7 @@ public:
const int basePosition = interface->position() - needle.size();
- QTextCursor tc(interface->document());
+ QTextCursor tc(interface->textDocument());
tc.setPosition(interface->position());
tc.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
@@ -1388,7 +1388,7 @@ void FakeVimPluginPrivate::editorOpened(Core::IEditor *editor)
connect(ICore::instance(), SIGNAL(saveSettingsRequested()),
SLOT(writeSettings()));
- handler->setCurrentFileName(editor->file()->fileName());
+ handler->setCurrentFileName(editor->document()->fileName());
handler->installEventFilter();
// pop up the bar
@@ -1495,9 +1495,9 @@ void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
// :w[rite]
Core::IEditor *editor = m_editorToHandler.key(handler);
const QString fileName = handler->currentFileName();
- if (editor && editor->file()->fileName() == fileName) {
+ if (editor && editor->document()->fileName() == fileName) {
// Handle that as a special case for nicer interaction with core
- FileManager::saveFile(editor->file());
+ DocumentManager::saveDocument(editor->document());
// Check result by reading back.
QFile file3(fileName);
file3.open(QIODevice::ReadOnly);
@@ -1512,8 +1512,8 @@ void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
}
} else if (cmd.matches("wa", "wall")) {
// :w[all]
- QList<IFile *> toSave = FileManager::modifiedFiles();
- QList<IFile *> failed = FileManager::saveModifiedFilesSilently(toSave);
+ QList<IDocument *> toSave = DocumentManager::modifiedDocuments();
+ QList<IDocument *> failed = DocumentManager::saveModifiedDocumentsSilently(toSave);
if (failed.isEmpty())
handler->showBlackMessage(tr("Saving succeeded"));
else