Explicitly document usage of Qt bug workaround.

Task-number: QTBUG-49694
Change-Id: I4516949af78320a1cdead9bce8ac90fe2ddc7fa9
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Jake Petroules
2015-11-30 01:54:33 -08:00
parent 8be94f73e5
commit 46b5eefcbf

View File

@@ -693,6 +693,8 @@ void QtcProcess::start()
qWarning("QtcProcess::start: Empty environment set when running '%s'.", qPrintable(m_command)); qWarning("QtcProcess::start: Empty environment set when running '%s'.", qPrintable(m_command));
env = m_environment; env = m_environment;
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
// QTBUG-49694
// If the process environment has no libraryPath, // If the process environment has no libraryPath,
// Qt will copy creator's libraryPath into the process environment. // Qt will copy creator's libraryPath into the process environment.
// That's brain dead, and we work around it // That's brain dead, and we work around it
@@ -702,6 +704,7 @@ void QtcProcess::start()
if (env.constFind(libraryPath) == env.constEnd()) if (env.constFind(libraryPath) == env.constEnd())
env.set(libraryPath, QString()); env.set(libraryPath, QString());
} }
#endif
QProcess::setEnvironment(env.toStringList()); QProcess::setEnvironment(env.toStringList());
} else { } else {
env = Environment::systemEnvironment(); env = Environment::systemEnvironment();