Make sure we always quote the qmldebug command line arguments

Change-Id: I5ce68c238e0ab05d19715659a9cc2161e51e1a7e
Task-number: QTCREATORBUG-20260
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-04-16 13:42:43 +02:00
parent fa11070977
commit 17d530d60d
5 changed files with 39 additions and 14 deletions

View File

@@ -31,6 +31,7 @@
#include <qmlprofiler/qmlprofilertool.h>
#include <utils/url.h>
#include <utils/temporaryfile.h>
#include <QtTest>
#include <QTcpServer>
@@ -148,6 +149,31 @@ void LocalQmlProfilerRunnerTest::testRunner()
runControl->initiateFinish();
QTRY_VERIFY(runControl.isNull());
QVERIFY(profiler.isNull());
debuggee.commandLineArguments = QString("-test QmlProfiler,");
serverUrl.setScheme(Utils::urlSocketScheme());
{
Utils::TemporaryFile file("file with spaces");
if (file.open())
serverUrl.setPath(file.fileName());
}
runControl = new ProjectExplorer::RunControl(nullptr,
ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
runControl->setRunnable(debuggee);
profiler = new LocalQmlProfilerSupport(&tool, runControl, serverUrl);
connectRunner();
runControl->initiateStart();
QTRY_VERIFY_WITH_TIMEOUT(running, 30000);
QTRY_VERIFY_WITH_TIMEOUT(!running, 30000);
QCOMPARE(startCount, 4);
QCOMPARE(stopCount, 4);
QCOMPARE(runCount, 3);
runControl->initiateFinish();
QTRY_VERIFY(runControl.isNull());
QVERIFY(profiler.isNull());
}
void LocalQmlProfilerRunnerTest::testFindFreePort()