summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-04-21 15:50:40 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-04-29 10:59:52 (GMT)
commit11a79c65ea992be0e2ede7dc8f60660c9190291f (patch)
tree0bf46d83e6448ddbbbce634b9e91968f4fb1cd74 /src/corelib/io
parente989a4d375b279b3ea61139cb07596e0e4b79e28 (diff)
downloadQt-11a79c65ea992be0e2ede7dc8f60660c9190291f.zip
Qt-11a79c65ea992be0e2ede7dc8f60660c9190291f.tar.gz
Qt-11a79c65ea992be0e2ede7dc8f60660c9190291f.tar.bz2
split QProcessEnvironmentPrivate::Unit into Key and Value
Reviewed-by: thiago Reviewed-by: dt
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qprocess.cpp16
-rw-r--r--src/corelib/io/qprocess_p.h9
2 files changed, 14 insertions, 11 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index f82a872..ecad92c 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -144,22 +144,22 @@ QT_BEGIN_NAMESPACE
\sa QProcess, QProcess::systemEnvironment(), QProcess::setProcessEnvironment()
*/
#ifdef Q_OS_WIN
-static inline QProcessEnvironmentPrivate::Unit prepareName(const QString &name)
+static inline QProcessEnvironmentPrivate::Key prepareName(const QString &name)
{ return name.toUpper(); }
-static inline QString nameToString(const QProcessEnvironmentPrivate::Unit &name)
+static inline QString nameToString(const QProcessEnvironmentPrivate::Key &name)
{ return name; }
-static inline QProcessEnvironmentPrivate::Unit prepareValue(const QString &value)
+static inline QProcessEnvironmentPrivate::Value prepareValue(const QString &value)
{ return value; }
-static inline QString valueToString(const QProcessEnvironmentPrivate::Unit &value)
+static inline QString valueToString(const QProcessEnvironmentPrivate::Value &value)
{ return value; }
#else
-static inline QProcessEnvironmentPrivate::Unit prepareName(const QString &name)
+static inline QProcessEnvironmentPrivate::Key prepareName(const QString &name)
{ return name.toLocal8Bit(); }
-static inline QString nameToString(const QProcessEnvironmentPrivate::Unit &name)
+static inline QString nameToString(const QProcessEnvironmentPrivate::Key &name)
{ return QString::fromLocal8Bit(name); }
-static inline QProcessEnvironmentPrivate::Unit prepareValue(const QString &value)
+static inline QProcessEnvironmentPrivate::Value prepareValue(const QString &value)
{ return value.toLocal8Bit(); }
-static inline QString valueToString(const QProcessEnvironmentPrivate::Unit &value)
+static inline QString valueToString(const QProcessEnvironmentPrivate::Value &value)
{ return QString::fromLocal8Bit(value); }
#endif
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index 7bfcb31..b2a69ef 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -85,11 +85,14 @@ class QProcessEnvironmentPrivate: public QSharedData
{
public:
#ifdef Q_OS_WIN
- typedef QString Unit;
+ typedef QString Key;
+ typedef QString Value;
#else
- typedef QByteArray Unit;
+ typedef QByteArray Key;
+ typedef QByteArray Value;
#endif
- typedef QHash<Unit, Unit> Hash;
+
+ typedef QHash<Key, Value> Hash;
Hash hash;
static QProcessEnvironment fromList(const QStringList &list);