forked from qt-creator/qt-creator
Add into settings default line ending for new files
Add option into the Qt Creator settings option to configure what line ending will the newly create files have. Change-Id: I0fa67a54c78524dc943c01acb925c1bac1e47cc1 Fixes: QTCREATORBUG-3590 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -215,7 +215,9 @@ TextFileFormat::ReadResult readTextFile(const QString &fileName, const QTextCode
|
||||
return TextFileFormat::ReadMemoryAllocationError;
|
||||
}
|
||||
|
||||
*format = TextFileFormat::detect(data);
|
||||
if (!data.isEmpty())
|
||||
*format = TextFileFormat::detect(data);
|
||||
|
||||
if (!format->codec)
|
||||
format->codec = defaultCodec ? defaultCodec : QTextCodec::codecForLocale();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user