Remove \r from git process output

Task-number: QTCREATORBUG-9443
Task-number: QTCREATORBUG-9448

Change-Id: I02e65eab6be5d129b605067425f6774550fbf511
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
jkobus
2013-06-06 11:32:51 +02:00
committed by Jarek Kobus
parent f2fa59d649
commit 5e407c08d7

View File

@@ -263,7 +263,7 @@ void GitDiffHandler::slotFileListReceived(const QByteArray &data)
if (m_editor.isNull())
return;
const QString fileList = m_editor->editorWidget()->codec()->toUnicode(data);
const QString fileList = m_editor->editorWidget()->codec()->toUnicode(data).remove(QLatin1Char('\r'));
QStringList fileNames = fileList.split(QLatin1Char('\n'), QString::SkipEmptyParts);
fileNames.removeDuplicates();
@@ -355,7 +355,7 @@ void GitDiffHandler::slotFileContentsReceived(const QByteArray &data)
QMap<Revision, bool>::iterator itRevEnd
= revisions.end();
if (itRev != itRevEnd) {
const QString contents = m_editor->editorWidget()->codec()->toUnicode(data);
const QString contents = m_editor->editorWidget()->codec()->toUnicode(data).remove(QLatin1Char('\r'));
m_collectedRevisions[fileName][itRev.key()] = contents;
itRev = revisions.erase(itRev);