aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-05-29 13:14:16 +0200
committerhjk <hjk@qt.io>2017-05-30 08:57:08 +0000
commit76185b3b0911c6187c705aa9fa3c4239a47178c3 (patch)
tree4b651275a03c8128a2d52ceca2b9208aa626f576 /src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
parent2317d06a80a3abb71b5fe6ef07eeeb3c41ee9a1a (diff)
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>
Diffstat (limited to 'src/plugins/qmlprofiler/localqmlprofilerrunner.cpp')
-rw-r--r--src/plugins/qmlprofiler/localqmlprofilerrunner.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
index ec686bfaf5..bd3fe0aa95 100644
--- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
+++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
@@ -25,11 +25,13 @@
#include "localqmlprofilerrunner.h"
#include "qmlprofilerplugin.h"
+#include "qmlprofilerruncontrol.h"
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/target.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
@@ -67,14 +69,16 @@ Utils::Port LocalQmlProfilerRunner::findFreePort(QString &host)
}
LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuration,
- RunControl *runControl) :
- QObject(runControl),
+ QmlProfilerRunner *runner) :
+ QObject(runner->runControl()),
+ m_runControl(runner->runControl()),
m_configuration(configuration)
{
+ auto runControl = runner->runControl();
connect(&m_launcher, &ApplicationLauncher::appendMessage,
this, &LocalQmlProfilerRunner::appendMessage);
connect(this, &LocalQmlProfilerRunner::stopped,
- runControl, &RunControl::notifyRemoteFinished);
+ runner, &QmlProfilerRunner::notifyRemoteFinished);
connect(this, &LocalQmlProfilerRunner::appendMessage,
runControl, &RunControl::appendMessage);
connect(runControl, &RunControl::starting,
@@ -92,23 +96,27 @@ LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuratio
});
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
- runControl, [this, runControl](Utils::Port port) {
+ runControl, [this, runControl, runner](Utils::Port port) {
runControl->notifyRemoteSetupDone(port);
+ runner->notifyRemoteSetupDone(port);
});
connect(&m_outputParser, &QmlDebug::QmlOutputParser::noOutputMessage,
- runControl, [this, runControl]() {
+ runControl, [this, runControl, runner]() {
runControl->notifyRemoteSetupDone(Utils::Port());
+ runner->notifyRemoteSetupDone(Utils::Port());
});
connect(&m_outputParser, &QmlDebug::QmlOutputParser::connectingToSocketMessage,
- runControl, [this, runControl]() {
+ runControl, [this, runControl, runner]() {
runControl->notifyRemoteSetupDone(Utils::Port());
+ runner->notifyRemoteSetupDone(Utils::Port());
});
connect(&m_outputParser, &QmlDebug::QmlOutputParser::errorMessage,
- runControl, [this, runControl](const QString &message) {
+ runControl, [this, runControl, runner](const QString &message) {
runControl->notifyRemoteSetupFailed(message);
+ runner->notifyRemoteSetupFailed(message);
});
}