use the Hash typedef

Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 10fd0d3e5c88c7b0265db3acdd75cb3d6f35ee63)
This commit is contained in:
Oswald Buddenhagen 2011-04-21 17:22:13 +02:00 committed by Olivier Goffart
parent 4b75ceea08
commit 9590b7b662
3 changed files with 13 additions and 13 deletions

View File

@ -190,7 +190,7 @@ template<> void QSharedDataPointer<QProcessEnvironmentPrivate>::detach()
QStringList QProcessEnvironmentPrivate::toList() const
{
QStringList result;
QHash<Unit, Unit>::ConstIterator it = hash.constBegin(),
Hash::ConstIterator it = hash.constBegin(),
end = hash.constEnd();
for ( ; it != end; ++it) {
QString data = nameToString(it.key());
@ -224,7 +224,7 @@ QProcessEnvironment QProcessEnvironmentPrivate::fromList(const QStringList &list
QStringList QProcessEnvironmentPrivate::keys() const
{
QStringList result;
QHash<Unit, Unit>::ConstIterator it = hash.constBegin(),
Hash::ConstIterator it = hash.constBegin(),
end = hash.constEnd();
for ( ; it != end; ++it)
result << nameToString(it.key());
@ -233,7 +233,7 @@ QStringList QProcessEnvironmentPrivate::keys() const
void QProcessEnvironmentPrivate::insert(const Hash &h)
{
QHash<Unit, Unit>::ConstIterator it = h.constBegin(),
Hash::ConstIterator it = h.constBegin(),
end = h.constEnd();
for ( ; it != end; ++it)
hash.insert(it.key(), it.value());

View File

@ -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();

View File

@ -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,7 +299,7 @@ static QByteArray qt_create_environment(const QHash<QString, QString> &environme
}
int pos = 0;
QHash<QString, QString>::ConstIterator it = copy.constBegin(),
QProcessEnvironmentPrivate::Hash::ConstIterator it = copy.constBegin(),
end = copy.constEnd();
static const wchar_t equal = L'=';