forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user