diff options
author | hjk <hjk@qt.io> | 2017-03-30 11:54:23 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-04-05 13:47:53 +0000 |
commit | 112e32228aa41bf356604e099c807ebb14bf8e5e (patch) | |
tree | 1df8bbc75a982b58a2d4d2bf34e8ab2ed1437b72 /src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | |
parent | 43fc2ebeb06d0e0c820ec6316e8dc67df6ad4db1 (diff) |
ProjectExplorer: Merge AnalyzerRunControl into RunControl
The change is "conceptually wrong", the AnalyzerRunControl derived
classes' functionality should be provided by ToolRunners based classes
encapsulating/"being" the current Analyzer*Runner classes.
However, the AnalyzerRunControl is only three (empty even) virtual
functions, but a big obstacle in merging attempt due to a lot of
mechanical followup changes in downstream users.
The current construction mechanism of analyzer run controls is actually
two different mechanisms (locally direct RunControlFactories, and a
"generic" createAnalyzerRunControl wrapper for remote cases). The generic
createAnalyzerRunControl makes it difficult to migrated them one-by-one,
due to the various downstream users.
So instead of merging the per-analyzer two uses directly reduce
the "indirection" distance by removing the AnalyzerRunControl
intermediate layer. After that the createAnalyzerRunControl mechanism
can be dissolved by using normal RunControlFactories also for
the remote cases. After that, porting to ToolRunner, and combining
with ther local equivalent can be done one by one.
Change-Id: I0ddace33fcce210cf3a547ac5bb23b3d85013934
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/localqmlprofilerrunner.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp index 4f71863566..ec686bfaf5 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -31,8 +31,8 @@ #include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/kitinformation.h> #include <projectexplorer/target.h> + #include <qmldebug/qmldebugcommandlinearguments.h> -#include <debugger/analyzer/analyzerruncontrol.h> #include <utils/temporaryfile.h> @@ -67,24 +67,24 @@ Utils::Port LocalQmlProfilerRunner::findFreePort(QString &host) } LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuration, - Debugger::AnalyzerRunControl *runControl) : + RunControl *runControl) : QObject(runControl), m_configuration(configuration) { connect(&m_launcher, &ApplicationLauncher::appendMessage, this, &LocalQmlProfilerRunner::appendMessage); connect(this, &LocalQmlProfilerRunner::stopped, - runControl, &Debugger::AnalyzerRunControl::notifyRemoteFinished); + runControl, &RunControl::notifyRemoteFinished); connect(this, &LocalQmlProfilerRunner::appendMessage, - runControl, &Debugger::AnalyzerRunControl::appendMessage); - connect(runControl, &Debugger::AnalyzerRunControl::starting, + runControl, &RunControl::appendMessage); + connect(runControl, &RunControl::starting, this, &LocalQmlProfilerRunner::start); connect(runControl, &RunControl::finished, this, &LocalQmlProfilerRunner::stop); m_outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()); - connect(runControl, &Debugger::AnalyzerRunControl::appendMessageRequested, + connect(runControl, &RunControl::appendMessageRequested, this, [this](RunControl *runControl, const QString &msg, Utils::OutputFormat format) { Q_UNUSED(runControl); Q_UNUSED(format); |