DiffEditor: Save description along with diff.

Save complete, git-applicable patch when saving the result of
for example 'git show'. Strips some Creator-specific tags
off the description and reformats the description such
that it is accepted by git.

Change-Id: I739d85a7263f97e2149a2794974ba026f2eca067
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Friedemann Kleint
2014-11-11 16:27:23 +01:00
parent e123f5a4d9
commit 9605244f6d
5 changed files with 68 additions and 21 deletions

View File

@@ -78,9 +78,7 @@ bool DiffEditorDocument::save(QString *errorString, const QString &fileName, boo
Q_UNUSED(errorString)
Q_UNUSED(autoSave)
const QString contents = DiffUtils::makePatch(m_controller->diffFiles());
const bool ok = write(fileName, format(), contents, errorString);
const bool ok = write(fileName, format(), m_controller->contents(), errorString);
if (!ok)
return false;