file manager: introduce saveFile() and remove blockFileChange() & unblockFileChange()

this replaces the ever-repeating idiom block/save/unblock with a single
call.
This commit is contained in:
Oswald Buddenhagen
2011-03-30 12:38:12 +02:00
parent 9a89f573e0
commit e35fe2a770
10 changed files with 33 additions and 71 deletions

View File

@@ -664,9 +664,7 @@ bool MercurialPlugin::submitEditorAboutToClose(VCSBase::VCSBaseSubmitEditor *sub
const QStringList files = commitEditor->checkedFiles();
if (!files.empty()) {
//save the commit message
core->fileManager()->blockFileChange(editorFile);
editorFile->save();
core->fileManager()->unblockFileChange(editorFile);
core->fileManager()->saveFile(editorFile);
QHash<int, QVariant> extraOptions;
extraOptions[MercurialClient::AuthorCommitOptionId] = commitEditor->committerInfo();