Explorar o código

ENH: Use platform-specific EOL character in log file

By default text files have \r\n ending on Windows and \n on Linux/Mac. The old implementation had \n end-of-line character hardcoded for all platforms.
On Windows, when trying to open a file (or copy-paste contents) that use \n as end-of-line character in a simple editor, such as Notepad, all the lines appear in one single line. This is very confusing for average users.
Andras Lasso %!s(int64=10) %!d(string=hai) anos
pai
achega
acc1eeaeee
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Libs/Core/ctkFileLogger.cpp

+ 1 - 1
Libs/Core/ctkFileLogger.cpp

@@ -136,7 +136,7 @@ void ctkFileLogger::logMessage(const QString& msg)
     return;
     }
   QTextStream s(&f);
-  s << msg << "\n";
+  s << msg << endl;
   f.close();
 }