QmlProfiler: Convert to a RunWorker based setup

This also re-enables the remote linux case and enables
the recording of a single run of events.

Change-Id: I9ea55017c8e5f2f17e6f32c5453df48093e41931
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-05-29 13:14:16 +02:00
parent 2317d06a80
commit 76185b3b09
9 changed files with 90 additions and 71 deletions

View File

@@ -60,9 +60,10 @@ void LocalQmlProfilerRunnerTest::testRunner()
// should not be used anywhere but cannot be empty
configuration.socket = connection.analyzerSocket = QString("invalid");
rc = new QmlProfilerRunControl(nullptr);
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
auto worker = new QmlProfilerRunner(rc);
rc->setConnection(connection);
auto runner = new LocalQmlProfilerRunner(configuration, rc);
auto runner = new LocalQmlProfilerRunner(configuration, worker);
connectRunner(runner);
rc->initiateStart();
@@ -81,9 +82,10 @@ void LocalQmlProfilerRunnerTest::testRunner1()
configuration.debuggee.commandLineArguments = QString("-test QmlProfiler,");
delete rc;
rc = new QmlProfilerRunControl(nullptr);
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
auto worker = new QmlProfilerRunner(rc);
rc->setConnection(connection);
auto runner = new LocalQmlProfilerRunner(configuration, rc);
auto runner = new LocalQmlProfilerRunner(configuration, worker);
connectRunner(runner);
rc->initiateStart();
QTimer::singleShot(0, this, &LocalQmlProfilerRunnerTest::testRunner2);
@@ -101,9 +103,10 @@ void LocalQmlProfilerRunnerTest::testRunner2()
connection.analyzerSocket.clear();
configuration.port = connection.analyzerPort =
LocalQmlProfilerRunner::findFreePort(connection.analyzerHost);
rc = new QmlProfilerRunControl(nullptr);
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
auto worker = new QmlProfilerRunner(rc);
rc->setConnection(connection);
auto runner = new LocalQmlProfilerRunner(configuration, rc);
auto runner = new LocalQmlProfilerRunner(configuration, worker);
connectRunner(runner);
rc->initiateStart();