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

@@ -630,9 +630,7 @@ bool BazaarPlugin::submitEditorAboutToClose(VCSBase::VCSBaseSubmitEditor *submit
QStringList files = commitEditor->checkedFiles();
if (!files.empty()) {
//save the commit message
m_core->fileManager()->blockFileChange(editorFile);
editorFile->save();
m_core->fileManager()->unblockFileChange(editorFile);
m_core->fileManager()->saveFile(editorFile);
//rewrite entries of the form 'file => newfile' to 'newfile' because
//this would mess the commit command