diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-08-25 15:47:32 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-08-29 08:39:40 +0000 |
commit | 06b2ff604a569e82cc28a46c3748dc73db436055 (patch) | |
tree | fec30fc8559bd9de279b1d291df3efd114bbe2a4 /src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | |
parent | 1ca42e24cba68022bbde5c93da84778dd053cdfa (diff) |
QmlProfiler: Move output parser into LocalQmlProfilerRunner
In the general case we don't want the QmlProfilerRunControl to parse
the QML debug port from the application output. As for most platforms
the ports are mapped via some remote connection mechanism the parsed
port is almost certainly wrong.
In the case of local connections, however, the port is actually
correct, so we keep the output parser in the LocalQmlProfilerRunner.
Change-Id: Ifdaae85196d8b034e67bc2ba0b8c05be980b62e5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/localqmlprofilerrunner.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp index 3be605542e..bffe0d23c8 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -79,6 +79,35 @@ LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuratio this, &LocalQmlProfilerRunner::start); connect(runControl, &RunControl::finished, this, &LocalQmlProfilerRunner::stop); + + m_outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()); + + connect(runControl, &Debugger::AnalyzerRunControl::appendMessageRequested, + this, [this](RunControl *runControl, const QString &msg, Utils::OutputFormat format) { + Q_UNUSED(runControl); + Q_UNUSED(format); + m_outputParser.processOutput(msg); + }); + + connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort, + runControl, [this, runControl](Utils::Port port) { + runControl->notifyRemoteSetupDone(port); + }); + + connect(&m_outputParser, &QmlDebug::QmlOutputParser::noOutputMessage, + runControl, [this, runControl]() { + runControl->notifyRemoteSetupDone(Utils::Port()); + }); + + connect(&m_outputParser, &QmlDebug::QmlOutputParser::connectingToSocketMessage, + runControl, [this, runControl]() { + runControl->notifyRemoteSetupDone(Utils::Port()); + }); + + connect(&m_outputParser, &QmlDebug::QmlOutputParser::errorMessage, + runControl, [this, runControl](const QString &message) { + runControl->notifyRemoteSetupFailed(message); + }); } void LocalQmlProfilerRunner::start() |