From e2b1ab498d0e3b194d5aaa9dd8d6a7112d1a0201 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 13 May 2009 16:15:31 +0200 Subject: Remove the xxxRaw versions of the QProcessEnvironment functions. If we ever decide we need them later, we can readd. For the moment, let's keep the QString versions only. --- src/corelib/io/qprocess.cpp | 27 ++------------------------- src/corelib/io/qprocess.h | 5 ----- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 3d143e9..b9dd9d7 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -238,29 +238,6 @@ QString QProcessEnvironment::value(const QString &name, const QString &defaultVa return valueToString(result); } -bool QProcessEnvironment::containsRaw(const QByteArray &name) const -{ - return d ? d->hash.contains(prepareName(name)) : false; -} - -void QProcessEnvironment::insertRaw(const QByteArray &name, const QByteArray &value) -{ - d->hash.insert(prepareName(name), prepareValue(value)); -} - -void QProcessEnvironment::removeRaw(const QByteArray &name) -{ - d->hash.remove(prepareName(name)); -} - -QByteArray QProcessEnvironment::valueRaw(const QByteArray &name, const QByteArray &defaultValue) const -{ - if (!d) - return defaultValue; - QProcessEnvironmentPrivate::Unit result = d->hash.value(prepareName(name), prepareValue(defaultValue)); - return valueToByteArray(result); -} - QStringList QProcessEnvironment::toStringList() const { return d ? d->toList() : QStringList(); @@ -2038,7 +2015,7 @@ QStringList QProcess::systemEnvironment() /*! \since 4.5 - Returns the environment of the calling process as a QHash. + Returns the environment of the calling process as a QProcessEnvironment. \sa QProcess::systemEnvironment() */ @@ -2053,7 +2030,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment() QByteArray name(entry, equal - entry); QByteArray value(equal + 1); - env.insertRaw(name, value); + env.insert(QString::fromLocal8Bit(name), QString::fromLocal8Bit(value)); } return env; } diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h index 116168b..0498d1e 100644 --- a/src/corelib/io/qprocess.h +++ b/src/corelib/io/qprocess.h @@ -85,11 +85,6 @@ public: void remove(const QString &name); QString value(const QString &name, const QString &defaultValue = QString()) const; - bool containsRaw(const QByteArray &name) const; - void insertRaw(const QByteArray &name, const QByteArray &value); - void removeRaw(const QByteArray &name); - QByteArray valueRaw(const QByteArray &name, const QByteArray &defaultValue = QByteArray()) const; - QStringList toStringList() const; static QProcessEnvironment systemEnvironment(); -- cgit v0.12