[Interest] Issue with expanding an environmental variable.

jschneiderman at gog.com jschneiderman at gog.com
Mon Mar 6 09:07:38 CET 2017


From: jschneiderman at gog.com
Sent: piÄ…tek, 3 marca 2017 16:52
To: Jesus Fernandez
Subject: RE: [Interest] Issue with expanding an environmental variable.


Are you using QString::fromUtf8 to decode the received QByteArray?
_______________________________________________

Thank-you, that was the problem exactly!

Changing it to look like this:

const QByteArray envVarValue{qgetenv("envVar")};
const auto var{QString::fromUtf8(envVarValue)};

fixed it.

Thanks again,

John Schneiderman
Senior Software Engineer
GOG.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170306/a3e5bf4b/attachment.html>


More information about the Interest mailing list