Selftest - copy XAUTHORITY environment variable

Otherwise XOpenDisplay in a newly spawned process may fail with
a 'No protocol specified' message (as it recently happened in
CentOS 8.1 vm).

Fixes: QTBUG-87621
Pick-to: 5.15
Change-Id: Ib6c08c7f154fb2a126d32a4aa52b535e5daa1589
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Timur Pocheptsov 2020-10-28 12:45:04 +01:00 committed by Liang Qi
parent 07ff70a0da
commit 524b19fc23

View File

@ -943,7 +943,7 @@ static QProcessEnvironment testEnvironment()
|| key == "QEMU_SET_ENV" || key == "QEMU_LD_PREFIX" // Required for QEMU
# if !defined(Q_OS_MACOS)
|| key == "DISPLAY" || key == "XAUTHLOCALHOSTNAME"
|| key.startsWith("XDG_")
|| key.startsWith("XDG_") || key == "XAUTHORITY"
# endif // !Q_OS_MACOS
#endif // Q_OS_UNIX
#ifdef __COVERAGESCANNER__