use the Hash typedef
Reviewed-by: thiago Reviewed-by: dt (cherry picked from commit 10fd0d3e5c88c7b0265db3acdd75cb3d6f35ee63)
This commit is contained in:
parent
4b75ceea08
commit
9590b7b662
@ -190,8 +190,8 @@ template<> void QSharedDataPointer<QProcessEnvironmentPrivate>::detach()
|
||||
QStringList QProcessEnvironmentPrivate::toList() const
|
||||
{
|
||||
QStringList result;
|
||||
QHash<Unit, Unit>::ConstIterator it = hash.constBegin(),
|
||||
end = hash.constEnd();
|
||||
Hash::ConstIterator it = hash.constBegin(),
|
||||
end = hash.constEnd();
|
||||
for ( ; it != end; ++it) {
|
||||
QString data = nameToString(it.key());
|
||||
QString value = valueToString(it.value());
|
||||
@ -224,8 +224,8 @@ QProcessEnvironment QProcessEnvironmentPrivate::fromList(const QStringList &list
|
||||
QStringList QProcessEnvironmentPrivate::keys() const
|
||||
{
|
||||
QStringList result;
|
||||
QHash<Unit, Unit>::ConstIterator it = hash.constBegin(),
|
||||
end = hash.constEnd();
|
||||
Hash::ConstIterator it = hash.constBegin(),
|
||||
end = hash.constEnd();
|
||||
for ( ; it != end; ++it)
|
||||
result << nameToString(it.key());
|
||||
return result;
|
||||
@ -233,8 +233,8 @@ QStringList QProcessEnvironmentPrivate::keys() const
|
||||
|
||||
void QProcessEnvironmentPrivate::insert(const Hash &h)
|
||||
{
|
||||
QHash<Unit, Unit>::ConstIterator it = h.constBegin(),
|
||||
end = h.constEnd();
|
||||
Hash::ConstIterator it = h.constBegin(),
|
||||
end = h.constEnd();
|
||||
for ( ; it != end; ++it)
|
||||
hash.insert(it.key(), it.value());
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
|
||||
}
|
||||
}
|
||||
|
||||
static char **_q_dupEnvironment(const QHash<QByteArray, QByteArray> &environment, int *envc)
|
||||
static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environment, int *envc)
|
||||
{
|
||||
*envc = 0;
|
||||
if (environment.isEmpty())
|
||||
@ -489,8 +489,8 @@ static char **_q_dupEnvironment(const QHash<QByteArray, QByteArray> &environment
|
||||
envp[environment.count()] = 0;
|
||||
envp[environment.count() + 1] = 0;
|
||||
|
||||
QHash<QByteArray, QByteArray>::ConstIterator it = environment.constBegin();
|
||||
const QHash<QByteArray, QByteArray>::ConstIterator end = environment.constEnd();
|
||||
QProcessEnvironmentPrivate::Hash::ConstIterator it = environment.constBegin();
|
||||
const QProcessEnvironmentPrivate::Hash::ConstIterator end = environment.constEnd();
|
||||
for ( ; it != end; ++it) {
|
||||
QByteArray key = it.key();
|
||||
QByteArray value = it.value();
|
||||
|
@ -278,11 +278,11 @@ static QString qt_create_commandline(const QString &program, const QStringList &
|
||||
return args;
|
||||
}
|
||||
|
||||
static QByteArray qt_create_environment(const QHash<QString, QString> &environment)
|
||||
static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &environment)
|
||||
{
|
||||
QByteArray envlist;
|
||||
if (!environment.isEmpty()) {
|
||||
QHash<QString, QString> copy = environment;
|
||||
QProcessEnvironmentPrivate::Hash copy = environment;
|
||||
|
||||
// add PATH if necessary (for DLL loading)
|
||||
if (!copy.contains(QLatin1String("PATH"))) {
|
||||
@ -299,8 +299,8 @@ static QByteArray qt_create_environment(const QHash<QString, QString> &environme
|
||||
}
|
||||
|
||||
int pos = 0;
|
||||
QHash<QString, QString>::ConstIterator it = copy.constBegin(),
|
||||
end = copy.constEnd();
|
||||
QProcessEnvironmentPrivate::Hash::ConstIterator it = copy.constBegin(),
|
||||
end = copy.constEnd();
|
||||
|
||||
static const wchar_t equal = L'=';
|
||||
static const wchar_t nul = L'\0';
|
||||
|
Loading…
Reference in New Issue
Block a user