forked from qt-creator/qt-creator
CppTools: Replace "\r\n" with "\n" in cpp file content
When we get the file working copy it never contains "\r\n" line endings. Let's provide the same behavior when we have no working copy and read the file from disk. Task-number: QTCREATORBUG-19905 Change-Id: I720d62426860dcdcdd8520db5430d9f4f5900ab6 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -228,6 +228,7 @@ bool CppSourceProcessor::getFileContents(const QString &absoluteFilePath,
|
||||
qPrintable(error));
|
||||
return false;
|
||||
}
|
||||
contents->replace("\r\n", "\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user