diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-03-30 12:38:12 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-04-18 14:10:12 +0200 |
commit | e35fe2a770d536ed9086fbdcd71cdf40a97afee8 (patch) | |
tree | 8daad1772da75e4ce102a2507efbc8e8d84ca51c /src/plugins/fakevim | |
parent | 9a89f573e03e4042d3c4c91f8183ae39e55667fb (diff) | |
download | qt-creator-e35fe2a770d536ed9086fbdcd71cdf40a97afee8.tar.gz |
file manager: introduce saveFile() and remove blockFileChange() & unblockFileChange()
this replaces the ever-repeating idiom block/save/unblock with a single
call.
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r-- | src/plugins/fakevim/fakevimplugin.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index cb9f1ab724..94959fdc52 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1466,10 +1466,7 @@ void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd) const QString fileName = handler->currentFileName(); if (editor && editor->file()->fileName() == fileName) { // Handle that as a special case for nicer interaction with core - Core::IFile *file = editor->file(); - Core::ICore::instance()->fileManager()->blockFileChange(file); - file->save(fileName); - Core::ICore::instance()->fileManager()->unblockFileChange(file); + Core::ICore::instance()->fileManager()->saveFile(editor->file(), fileName); // Check result by reading back. QFile file3(fileName); file3.open(QIODevice::ReadOnly); |