forked from qt-creator/qt-creator
QmlProfiler: Split server url passing from custom startup request
Orthogonal concepts, that only happen to coincide. Also, make the server directly settable instead of relying on the runControl's connection(). Change-Id: I2472acafcc50aede2cb6f99421901f0e67531b91 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -45,6 +45,7 @@ LocalQmlProfilerRunnerTest::LocalQmlProfilerRunnerTest(QObject *parent) : QObjec
|
||||
|
||||
void LocalQmlProfilerRunnerTest::connectRunner(QmlProfilerRunner *runner)
|
||||
{
|
||||
runner->setAutoStart();
|
||||
connect(runner, &QmlProfilerRunner::localRunnerStarted, this, [this] {
|
||||
QVERIFY(!running);
|
||||
++runCount;
|
||||
@@ -66,7 +67,6 @@ void LocalQmlProfilerRunnerTest::testRunner()
|
||||
|
||||
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
rc->setRunnable(debuggee);
|
||||
rc->setConnection(UrlConnection(serverUrl));
|
||||
auto runner = new QmlProfilerRunner(rc);
|
||||
runner->setServerUrl(serverUrl);
|
||||
connectRunner(runner);
|
||||
@@ -89,7 +89,6 @@ void LocalQmlProfilerRunnerTest::testRunner1()
|
||||
delete rc;
|
||||
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
rc->setRunnable(debuggee);
|
||||
rc->setConnection(serverUrl);
|
||||
auto runner = new QmlProfilerRunner(rc);
|
||||
runner->setServerUrl(serverUrl);
|
||||
connectRunner(runner);
|
||||
@@ -108,7 +107,6 @@ void LocalQmlProfilerRunnerTest::testRunner2()
|
||||
serverUrl = UrlConnection::localHostAndFreePort();
|
||||
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
rc->setRunnable(debuggee);
|
||||
rc->setConnection(serverUrl);
|
||||
auto runner = new QmlProfilerRunner(rc);
|
||||
runner->setServerUrl(serverUrl);
|
||||
connectRunner(runner);
|
||||
|
||||
Reference in New Issue
Block a user