title: Different results for QString to const char*
body: <p>I have a code snippet to test a code bug.   </p>
  
  <pre><code>    #include &lt;QCoreApplication&gt;
      #include &lt;QDebug&gt;
  
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
          QString name = QString("Lucy");
          QString interest = QString("Swimming");
  
          const char* strInterest = interest.toLatin1().data();
          const char* strName = name.toLatin1().data();
  
          qDebug()&lt;&lt;"QName: "&lt;&lt;name&lt;&lt;" QInterest: "&lt;&lt;interest;
          qDebug()&lt;&lt;"Name: "&lt;&lt;strName&lt;&lt;" Interest: "&lt;&lt;strInterest;
  
          return a.exec();
      }
  </code></pre>
  
  <p>The result on <b>macOS</b>:
  <code>
  QName:  "Lucy"  QInterest:  "Swimming"
  Name:  Lucy  Interest:
  </code>.  </p>
  
  <p>The result on <b>ubuntu</b>:
  <code>
  root@:test$ ./testCharP 
  QName:  "Lucy"  QInterest:  "Swimming" 
  Name:    Interest:
  </code>.<br>
  As you can see, the converted buffer does not be saved as a const value, what about the problem?
  Also, there are some differences between these two OS, what is the cause maybe?.</p>