Add more information about how to get a QString from qgetenv
Change-Id: Ic712654c8d4735a59bf02cf6a7e1c689ca9a886c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
4a6cb89f29
commit
944bf6867f
@ -3220,12 +3220,16 @@ static QBasicMutex environmentMutex;
|
||||
|
||||
Returns the value of the environment variable with name \a
|
||||
varName. To get the variable string, use QByteArray::constData().
|
||||
To convert the data to a QString use QString::fromLocal8Bit().
|
||||
|
||||
\note qgetenv() was introduced because getenv() from the standard
|
||||
C library was deprecated in VC2005 (and later versions). qgetenv()
|
||||
uses the new replacement function in VC, and calls the standard C
|
||||
library's implementation on all other platforms.
|
||||
|
||||
\warning Don't use qgetenv on Windows if the content may contain
|
||||
non-US-ASCII characters, like file paths.
|
||||
|
||||
\sa qputenv(), qEnvironmentVariableIsSet(), qEnvironmentVariableIsEmpty()
|
||||
*/
|
||||
QByteArray qgetenv(const char *varName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user