summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/client/tst_client.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-14 11:10:42 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-10-14 13:18:34 +0000
commitbd6eb42fa31919aff1906aa60036aa33fd3edaa4 (patch)
treea05852b68725a2abaf9a3310c6d9db81f42b463a /tests/auto/client/client/tst_client.cpp
parent277de587f956dba2a68eb82b9666063ab12c51c4 (diff)
Fix build: Use temporary directories for tests' XDG_RUNTIME_DIR
Using XDG_RUNTIME_DIR="." does not work after qtbase 5542785, and it was a rather brittle solution anyway. Fixes: QTBUG-79185 Change-Id: Iaf9ced66709cc6cbac8a2d54efc64e1a8c528561 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/client/tst_client.cpp')
-rw-r--r--tests/auto/client/client/tst_client.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 83b9e6ce0..e7729ce8b 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -507,7 +507,8 @@ void tst_WaylandClient::longWindowTitleWithUtf16Characters()
int main(int argc, char **argv)
{
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ QTemporaryDir tmpRuntimeDir;
+ setenv("XDG_RUNTIME_DIR", tmpRuntimeDir.path().toLocal8Bit(), 1);
setenv("QT_QPA_PLATFORM", "wayland", 1); // force QGuiApplication to use wayland plugin
MockCompositor compositor;