Fix for TestQtSurfaceExtension in path with spaces

Use the QProcess::start() variant with explicit (empty, in these cases)
arguments, so the program strings are not parsed as shell commands,
thus preserving paths with spaces as such.
This commit is contained in:
Friedrich W. H. Kossebau 2017-06-03 00:16:59 +02:00
parent 43aca8a949
commit 2da0a9428d

View file

@ -79,7 +79,7 @@ void TestQtSurfaceExtension::testCloseWindow()
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert(QStringLiteral("WAYLAND_DISPLAY"), s_socketName); env.insert(QStringLiteral("WAYLAND_DISPLAY"), s_socketName);
process.setProcessEnvironment(env); process.setProcessEnvironment(env);
process.start(binary); process.start(binary, QStringList());
QVERIFY(surfaceExtensionSpy.wait()); QVERIFY(surfaceExtensionSpy.wait());
QCOMPARE(surfaceExtensionSpy.count(), 1); QCOMPARE(surfaceExtensionSpy.count(), 1);
auto *extension = surfaceExtensionSpy.first().first().value<QtExtendedSurfaceInterface*>(); auto *extension = surfaceExtensionSpy.first().first().value<QtExtendedSurfaceInterface*>();