From c5b06919a8fb5d20aae41f0edf9e2ffa99eb1a8a Mon Sep 17 00:00:00 2001
From: Geir Vattekar <geir.vattekar@nokia.com>
Date: Tue, 15 Jun 2010 13:59:41 +0200
Subject:     Doc: Documented qputenv and qgetenv

    Task-number: QTBUG-4041
    Reviewed-by: Morten Engvoldsen
---
 src/corelib/global/qglobal.cpp | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 373c0b4..b31c83b 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2503,6 +2503,19 @@ void qFatal(const char *msg, ...)
 
 // getenv is declared as deprecated in VS2005. This function
 // makes use of the new secure getenv function.
+/*!
+    \relates <QtGlobal>
+
+    Returns the value of the environment variable with name \a
+    varName. To get the variable string, use QByteArray::constData().
+
+    \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.
+
+    \sa qputenv()
+*/
 QByteArray qgetenv(const char *varName)
 {
 #if defined(_MSC_VER) && _MSC_VER >= 1400
@@ -2522,6 +2535,20 @@ QByteArray qgetenv(const char *varName)
 #endif
 }
 
+/*!
+    \relates <QtGlobal>
+
+    This function sets the \a value of the environment variable named
+    \a varName. It will create the variable if it does not exist. It
+    returns 0 if the variable could not be set.
+
+    \note qputenv() was introduced because putenv() from the standard
+    C library was deprecated in VC2005 (and later versions). qputenv()
+    uses the replacement function in VC, and calls the standard C
+    library's implementation on all other platforms.
+
+    \sa qgetenv()
+*/
 bool qputenv(const char *varName, const QByteArray& value)
 {
 #if defined(_MSC_VER) && _MSC_VER >= 1400
-- 
cgit v0.12