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

@@ -781,9 +781,7 @@ bool GitPlugin::submitEditorAboutToClose(VCSBase::VCSBaseSubmitEditor *submitEdi
bool closeEditor = true;
if (!fileList.empty() || !m_commitAmendSHA1.isEmpty()) {
// get message & commit
m_core->fileManager()->blockFileChange(fileIFace);
fileIFace->save();
m_core->fileManager()->unblockFileChange(fileIFace);
m_core->fileManager()->saveFile(fileIFace);
closeEditor = m_gitClient->addAndCommit(m_submitRepository,
editor->panelData(),