title: How to get QString::fromAscii in Qt5?
body: <p>I have a function to get the name of the computer as QString. While updating my program to Qt5 the function <strong>QString::fromAscii</strong> still doesn't exist anymore. How can I get it to QString?</p>
  <pre><code>    QString AppConfig::GetMachinename()
      {
          char* buf = new char[512];
          DWORD size;
          int res;
          QString machineName;
          if ((res = GetComputerNameA(buf, &amp;size)))
          {
              machineName = QString::fromAscii(buf, size);
          }
          else
              machineName = &quot;FALSE!&quot;;
          return machineName;
      }
  </code></pre>