forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user