summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 54df8b1f61..6b3cb502e5 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -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)