Explorar el 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 hace 10 años
padre
commit
acc1eeaeee
Se han modificado 1 ficheros con 1 adiciones y 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();
 }