summaryrefslogtreecommitdiff
path: root/src/plugins/diffeditor/diffeditordocument.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-11 16:27:23 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-13 09:10:22 +0100
commit9605244f6d73aced9ec33eea105030ae23eea896 (patch)
treeec52b6659c211c36be2c07beecd09b1e2aef9132 /src/plugins/diffeditor/diffeditordocument.cpp
parente123f5a4d9ec164073d75fd926acadd9d4b2243b (diff)
downloadqt-creator-9605244f6d73aced9ec33eea105030ae23eea896.tar.gz
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>
Diffstat (limited to 'src/plugins/diffeditor/diffeditordocument.cpp')
-rw-r--r--src/plugins/diffeditor/diffeditordocument.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/diffeditor/diffeditordocument.cpp b/src/plugins/diffeditor/diffeditordocument.cpp
index eb52c03a1c..b2204e98a7 100644
--- a/src/plugins/diffeditor/diffeditordocument.cpp
+++ b/src/plugins/diffeditor/diffeditordocument.cpp
@@ -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;