fix QProcessEnvironment documentation re case conversion
Change-Id: I854382d1d431ee084ef0faa2e240e093b9183ec8 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
parent
42760e43ea
commit
0dea24054f
@ -125,16 +125,15 @@ QT_BEGIN_NAMESPACE
|
|||||||
The environment of the calling process can be obtained using
|
The environment of the calling process can be obtained using
|
||||||
QProcessEnvironment::systemEnvironment().
|
QProcessEnvironment::systemEnvironment().
|
||||||
|
|
||||||
On Unix systems, the variable names are case-sensitive. For that reason,
|
On Unix systems, the variable names are case-sensitive. Note that the
|
||||||
this class will not touch the names of the variables. Note as well that
|
|
||||||
Unix environment allows both variable names and contents to contain arbitrary
|
Unix environment allows both variable names and contents to contain arbitrary
|
||||||
binary data (except for the NUL character), but this is not supported by
|
binary data (except for the NUL character). QProcessEnvironment will preserve
|
||||||
QProcessEnvironment. This class only supports names and values that are
|
such variables, but does not support manipulating variables whose names or
|
||||||
encodable by the current locale settings (see QTextCodec::codecForLocale).
|
values are not encodable by the current locale settings (see
|
||||||
|
QTextCodec::codecForLocale).
|
||||||
|
|
||||||
On Windows, the variable names are case-insensitive. Therefore,
|
On Windows, the variable names are case-insensitive, but case-preserving.
|
||||||
QProcessEnvironment will always uppercase the names and do case-insensitive
|
QProcessEnvironment behaves accordingly.
|
||||||
comparisons.
|
|
||||||
|
|
||||||
On Windows CE, the concept of environment does not exist. This class will
|
On Windows CE, the concept of environment does not exist. This class will
|
||||||
keep the values set for compatibility with other platforms, but the values
|
keep the values set for compatibility with other platforms, but the values
|
||||||
@ -298,9 +297,6 @@ void QProcessEnvironment::clear()
|
|||||||
Returns true if the environment variable of name \a name is found in
|
Returns true if the environment variable of name \a name is found in
|
||||||
this QProcessEnvironment object.
|
this QProcessEnvironment object.
|
||||||
|
|
||||||
On Windows, variable names are case-insensitive, so the key is converted
|
|
||||||
to uppercase before searching. On other systems, names are case-sensitive
|
|
||||||
so no trasformation is applied.
|
|
||||||
|
|
||||||
\sa insert(), value()
|
\sa insert(), value()
|
||||||
*/
|
*/
|
||||||
@ -314,10 +310,6 @@ bool QProcessEnvironment::contains(const QString &name) const
|
|||||||
into this QProcessEnvironment object. If that variable already existed,
|
into this QProcessEnvironment object. If that variable already existed,
|
||||||
it is replaced by the new value.
|
it is replaced by the new value.
|
||||||
|
|
||||||
On Windows, variable names are case-insensitive, so this function always
|
|
||||||
uppercases the variable name before inserting. On other systems, names
|
|
||||||
are case-sensitive, so no transformation is applied.
|
|
||||||
|
|
||||||
On most systems, inserting a variable with no contents will have the
|
On most systems, inserting a variable with no contents will have the
|
||||||
same effect for applications as if the variable had not been set at all.
|
same effect for applications as if the variable had not been set at all.
|
||||||
However, to guarantee that there are no incompatibilities, to remove a
|
However, to guarantee that there are no incompatibilities, to remove a
|
||||||
@ -336,9 +328,6 @@ void QProcessEnvironment::insert(const QString &name, const QString &value)
|
|||||||
QProcessEnvironment object. If that variable did not exist before,
|
QProcessEnvironment object. If that variable did not exist before,
|
||||||
nothing happens.
|
nothing happens.
|
||||||
|
|
||||||
On Windows, variable names are case-insensitive, so the key is converted
|
|
||||||
to uppercase before searching. On other systems, names are case-sensitive
|
|
||||||
so no trasformation is applied.
|
|
||||||
|
|
||||||
\sa contains(), insert(), value()
|
\sa contains(), insert(), value()
|
||||||
*/
|
*/
|
||||||
@ -353,10 +342,6 @@ void QProcessEnvironment::remove(const QString &name)
|
|||||||
\a name and returns its value. If the variable is not found in this object,
|
\a name and returns its value. If the variable is not found in this object,
|
||||||
then \a defaultValue is returned instead.
|
then \a defaultValue is returned instead.
|
||||||
|
|
||||||
On Windows, variable names are case-insensitive, so the key is converted
|
|
||||||
to uppercase before searching. On other systems, names are case-sensitive
|
|
||||||
so no trasformation is applied.
|
|
||||||
|
|
||||||
\sa contains(), insert(), remove()
|
\sa contains(), insert(), remove()
|
||||||
*/
|
*/
|
||||||
QString QProcessEnvironment::value(const QString &name, const QString &defaultValue) const
|
QString QProcessEnvironment::value(const QString &name, const QString &defaultValue) const
|
||||||
@ -376,10 +361,10 @@ QString QProcessEnvironment::value(const QString &name, const QString &defaultVa
|
|||||||
each environment variable that is set. The environment variable's name
|
each environment variable that is set. The environment variable's name
|
||||||
and its value are separated by an equal character ('=').
|
and its value are separated by an equal character ('=').
|
||||||
|
|
||||||
The QStringList contents returned by this function are suitable for use
|
The QStringList contents returned by this function are suitable for
|
||||||
with the QProcess::setEnvironment function. However, it is recommended
|
presentation.
|
||||||
to use QProcess::setProcessEnvironment instead since that will avoid
|
Use with the QProcess::setEnvironment function is not recommended due to
|
||||||
unnecessary copying of the data.
|
potential encoding problems under Unix, and worse performance.
|
||||||
|
|
||||||
\sa systemEnvironment(), QProcess::systemEnvironment(), QProcess::environment(),
|
\sa systemEnvironment(), QProcess::systemEnvironment(), QProcess::environment(),
|
||||||
QProcess::setEnvironment()
|
QProcess::setEnvironment()
|
||||||
|
Loading…
Reference in New Issue
Block a user