diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-04-28 10:53:14 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-10 12:54:52 +0200 |
commit | 9ff8d1c34a74bd852a7eb2016b46ab2904340b05 (patch) | |
tree | 923330e5d529a8b616c4d4ecbf6c42d48f14a5b9 /src/corelib/io/qprocess_unix.cpp | |
parent | 299d10549f5aff50cd6211eb3d3e58c17f13be81 (diff) |
make QProcessEnvironment on Unix cache converted variable names
the converted keys also cache their hash, as they are used only for the
purpose of looking up in a qhash.
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 18f1613aa8ece72d24ac10e28f06e3db1d8ce400)
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 7ee66ec955..7edefd3820 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -483,7 +483,7 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environm #endif const QByteArray envLibraryPath = qgetenv(libraryPath); bool needToAddLibraryPath = !envLibraryPath.isEmpty() && - !environment.contains(libraryPath); + !environment.contains(QProcessEnvironmentPrivate::Key(QByteArray(libraryPath))); char **envp = new char *[environment.count() + 2]; envp[environment.count()] = 0; @@ -492,7 +492,7 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environm QProcessEnvironmentPrivate::Hash::ConstIterator it = environment.constBegin(); const QProcessEnvironmentPrivate::Hash::ConstIterator end = environment.constEnd(); for ( ; it != end; ++it) { - QByteArray key = it.key(); + QByteArray key = it.key().key; QByteArray value = it.value(); key.reserve(key.length() + 1 + value.length()); key.append('='); |