QmlProfiler: Support local connections on Qt >= 5.6

This removes the need to receive messages from the application via
stderr. The "Connecting to socket" is still parsed, but only for
diagnostic purposes. If it doesn't arrive, the profiling will still
work.

Change-Id: I022691293da2a1e671ba1263bc76e4044bf1a5b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-11-17 16:42:21 +01:00
parent 2217eef3a3
commit 7b4e253a1e
11 changed files with 94 additions and 27 deletions

View File

@@ -214,10 +214,10 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet
engine->registerProfilerStateManager(d->m_profilerState);
bool isTcpConnection = true;
// FIXME: Check that there's something sensible in sp.connParams
if (isTcpConnection)
if (!sp.analyzerSocket.isEmpty())
d->m_profilerConnections->setLocalSocket(sp.analyzerSocket);
else
d->m_profilerConnections->setTcpConnection(sp.analyzerHost, sp.analyzerPort);
//
@@ -232,8 +232,9 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet
populateFileFinder(projectDirectory, sp.sysroot);
connect(engine, &QmlProfilerRunControl::processRunning,
d->m_profilerConnections, &QmlProfilerClientManager::connectClient);
if (sp.analyzerSocket.isEmpty())
connect(engine, &QmlProfilerRunControl::processRunning,
d->m_profilerConnections, &QmlProfilerClientManager::connectTcpClient);
connect(d->m_profilerConnections, &QmlProfilerClientManager::connectionFailed,
engine, &QmlProfilerRunControl::cancelProcess);