I want to set QtCreator to use CRLF instead of LF in unix. Is there a way to do that?
PS: I know I can use dos2unix on the files however I don't want to do that.
I want to set QtCreator to use CRLF instead of LF in unix. Is there a way to do that?
PS: I know I can use dos2unix on the files however I don't want to do that.
The next QtCreator version will have the possibility to change the line endings for an open document from the toolbar.
Depending on the time I'll try to also try to make a default option into QtCreator settings for newly created files.
It is bug in QtCreator - https://bugreports.qt.io/browse/QTCREATORBUG-3590 May be some one reopen it again.
Some possibilities: 1. I notice once QtCreator opens a CRLF file in Linux, it treats it like a CRLF file, so you'd only have to run dos2unix once on the file. 2. 'diff --strip-trailing-cr ...' works. 3. As mentioned in the comments, most version control systems can be set to do local or fixed line endings, so you may chase the problem in your VCS tool instead of Creator.
I tried out various encodings under Tools->Options->Editor, but none seem to affect the line ending (and I'm surprised Creator doesn't seem to have a setting for this--but option 4 is you can always get Creator's source code...)