QNX: Fix tst_selftest

GRAPHICS_ROOT and TZ environment variables are needed in child
processes in order to successfully run the auto test selftests.

Change-Id: I7befabd535b4c47b1e75acbe3d6158d0d9b811b3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
bb10
Bernd Weimer 2014-05-15 15:57:01 +02:00 committed by The Qt Project
parent 72558e810d
commit fa3d264b0b
1 changed files with 4 additions and 2 deletions

View File

@ -526,9 +526,11 @@ static QProcessEnvironment processEnvironment()
const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment();
foreach (const QString &key, systemEnvironment.keys()) {
const bool useVariable = key == QLatin1String("PATH") || key == QLatin1String("QT_QPA_PLATFORM")
#ifdef Q_OS_UNIX
#if defined(Q_OS_QNX)
|| key == QLatin1String("GRAPHICS_ROOT") || key == QLatin1String("TZ")
#elif defined(Q_OS_UNIX)
|| key == QLatin1String("HOME") || key == QLatin1String("USER") // Required for X11 on openSUSE
# ifndef Q_OS_MAC
# if !defined(Q_OS_MAC)
|| key == QLatin1String("DISPLAY") || key == QLatin1String("XAUTHLOCALHOSTNAME")
|| key.startsWith(QLatin1String("XDG_"))
# endif // !Q_OS_MAC