summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-16 08:17:02 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-16 08:17:02 (GMT)
commit8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d (patch)
treec328303e395088f88ba721e96bd6e09a008ad581 /src/corelib
parent71e333de0c258796a924b1d858253381d689cf19 (diff)
parentbb8142436bacf5a4fa31880b58a8b3b6bc7b4d5b (diff)
downloadQt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.zip
Qt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.tar.gz
Qt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6
Conflicts: src/plugins/imageformats/gif/qgifhandler.cpp
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.cpp27
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp4
2 files changed, 29 insertions, 2 deletions
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
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 4e6e6b9..0a5e06e 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1073,7 +1073,7 @@ void QCoreApplication::exit(int returnCode)
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
- posted. It is \e {not safe} to modify or delete the event after
+ posted. It is \e {not safe} to access the event after
it has been posted.
When control returns to the main event loop, all events that are
@@ -1104,7 +1104,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event)
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
- posted. It is \e {not safe} to modify or delete the event after
+ posted. It is \e {not safe} to access the event after
it has been posted.
When control returns to the main event loop, all events that are