forked from qt-creator/qt-creator
Qnx: Fix Qml profiler startup
This essentially replicates the RemoteLinux setup with the additional Slog2Info runner. Verified to work with Qt 5.9.2 on a BD-SL i.MX6Q_Sabre-Lite_Board armle running QNX 6.6.0 2014/02/22-19:07:53EST Task-number: QTCREATORBUG-18954 Change-Id: Iffea289b7c7f25d23472c9e12b5e45c460c93795 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -36,76 +36,54 @@
|
|||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <qmldebug/qmldebugcommandlinearguments.h>
|
#include <qmldebug/qmldebugcommandlinearguments.h>
|
||||||
#include <qmldebug/qmloutputparser.h>
|
#include <qmldebug/qmloutputparser.h>
|
||||||
|
|
||||||
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QnxAnalyzeeRunner : public SimpleTargetRunner
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
QnxAnalyzeeRunner(RunControl *runControl, PortsGatherer *portsGatherer)
|
|
||||||
: SimpleTargetRunner(runControl), m_portsGatherer(portsGatherer)
|
|
||||||
{
|
|
||||||
setDisplayName("QnxAnalyzeeRunner");
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
void start() override
|
|
||||||
{
|
|
||||||
Utils::Port port = m_portsGatherer->findPort();
|
|
||||||
|
|
||||||
auto r = runnable().as<StandardRunnable>();
|
|
||||||
if (!r.commandLineArguments.isEmpty())
|
|
||||||
r.commandLineArguments += ' ';
|
|
||||||
r.commandLineArguments +=
|
|
||||||
QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, port);
|
|
||||||
|
|
||||||
setRunnable(r);
|
|
||||||
|
|
||||||
SimpleTargetRunner::start();
|
|
||||||
}
|
|
||||||
|
|
||||||
PortsGatherer *m_portsGatherer;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// QnxDebugSupport
|
|
||||||
|
|
||||||
QnxQmlProfilerSupport::QnxQmlProfilerSupport(RunControl *runControl)
|
QnxQmlProfilerSupport::QnxQmlProfilerSupport(RunControl *runControl)
|
||||||
: RunWorker(runControl)
|
: SimpleTargetRunner(runControl)
|
||||||
{
|
{
|
||||||
runControl->createWorker(runControl->runMode());
|
setDisplayName("QnxQmlProfilerSupport");
|
||||||
|
|
||||||
setDisplayName("QnxAnalyzeSupport");
|
|
||||||
appendMessage(tr("Preparing remote side..."), Utils::LogMessageFormat);
|
appendMessage(tr("Preparing remote side..."), Utils::LogMessageFormat);
|
||||||
|
|
||||||
auto portsGatherer = new PortsGatherer(runControl);
|
m_portsGatherer = new PortsGatherer(runControl);
|
||||||
|
addStartDependency(m_portsGatherer);
|
||||||
auto debuggeeRunner = new QnxAnalyzeeRunner(runControl, portsGatherer);
|
|
||||||
debuggeeRunner->addStartDependency(portsGatherer);
|
|
||||||
|
|
||||||
auto slog2InfoRunner = new Slog2InfoRunner(runControl);
|
auto slog2InfoRunner = new Slog2InfoRunner(runControl);
|
||||||
slog2InfoRunner->addStartDependency(debuggeeRunner);
|
|
||||||
|
|
||||||
addStartDependency(slog2InfoRunner);
|
addStartDependency(slog2InfoRunner);
|
||||||
|
|
||||||
// QmlDebug::QmlOutputParser m_outputParser;
|
m_profiler = runControl->createWorker(runControl->runMode());
|
||||||
// FIXME: m_outputParser needs to be fed with application output
|
m_profiler->addStartDependency(this);
|
||||||
// connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
addStopDependency(m_profiler);
|
||||||
// this, &QnxAnalyzeSupport::remoteIsRunning);
|
|
||||||
|
|
||||||
// m_outputParser.processOutput(msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxQmlProfilerSupport::start()
|
void QnxQmlProfilerSupport::start()
|
||||||
{
|
{
|
||||||
// runControl()->notifyRemoteSetupDone(m_qmlPort);
|
Port qmlPort = m_portsGatherer->findPort();
|
||||||
reportStarted();
|
|
||||||
|
QUrl serverUrl;
|
||||||
|
serverUrl.setHost(device()->sshParameters().host);
|
||||||
|
serverUrl.setPort(qmlPort.number());
|
||||||
|
serverUrl.setScheme("tcp");
|
||||||
|
m_profiler->recordData("QmlServerUrl", serverUrl);
|
||||||
|
|
||||||
|
QString args = QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, qmlPort);
|
||||||
|
auto r = runnable().as<StandardRunnable>();
|
||||||
|
if (!r.commandLineArguments.isEmpty())
|
||||||
|
r.commandLineArguments.append(' ');
|
||||||
|
r.commandLineArguments += args;
|
||||||
|
|
||||||
|
setRunnable(r);
|
||||||
|
|
||||||
|
SimpleTargetRunner::start();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -25,12 +25,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
|
|
||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QnxQmlProfilerSupport : public ProjectExplorer::RunWorker
|
class QnxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -39,6 +40,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void start() override;
|
void start() override;
|
||||||
|
|
||||||
|
ProjectExplorer::PortsGatherer *m_portsGatherer;
|
||||||
|
ProjectExplorer::RunWorker *m_profiler;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
Reference in New Issue
Block a user