forked from qt-creator/qt-creator
Analyzer: Remove AnalyzerRunControl::runnable() and .connection()
These re-implementations are conceptually "too specific". Rather let the indiviual tools handle there expectations themselves. Change-Id: I0bbea407b2241816a40d19eb1dbb0a7589cbda7b Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "qmlprofilertool.h"
|
||||
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
#include <analyzerbase/analyzerstartparameters.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
@@ -109,9 +111,12 @@ bool QmlProfilerRunControl::startEngine()
|
||||
d->m_tool->finalizeRunControl(this);
|
||||
QTC_ASSERT(d->m_profilerState, return false);
|
||||
|
||||
if (connection().analyzerPort != 0)
|
||||
emit processRunning(connection().analyzerPort);
|
||||
else if (connection().analyzerSocket.isEmpty())
|
||||
QTC_ASSERT(connection().is<AnalyzerConnection>(), return false);
|
||||
auto conn = connection().as<AnalyzerConnection>();
|
||||
|
||||
if (conn.analyzerPort != 0)
|
||||
emit processRunning(conn.analyzerPort);
|
||||
else if (conn.analyzerSocket.isEmpty())
|
||||
d->m_noDebugOutputTimer.start();
|
||||
|
||||
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppRunning);
|
||||
@@ -233,7 +238,7 @@ void QmlProfilerRunControl::processIsRunning(quint16 port)
|
||||
d->m_noDebugOutputTimer.stop();
|
||||
|
||||
if (port == 0)
|
||||
port = connection().analyzerPort;
|
||||
port = connection().as<AnalyzerConnection>().analyzerPort;
|
||||
if (port != 0)
|
||||
emit processRunning(port);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <analyzerbase/ianalyzertool.h>
|
||||
#include <analyzerbase/analyzerruncontrol.h>
|
||||
#include <analyzerbase/analyzerstartparameters.h>
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
#include <analyzerbase/analyzerruncontrol.h>
|
||||
#include <analyzerbase/analyzerstartparameters.h>
|
||||
|
||||
#include <utils/fancymainwindow.h>
|
||||
#include <utils/fileinprojectfinder.h>
|
||||
@@ -222,7 +223,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunControl *runControl)
|
||||
runControl->registerProfilerStateManager(d->m_profilerState);
|
||||
|
||||
// FIXME: Check that there's something sensible in sp.connParams
|
||||
auto &connection = runControl->connection();
|
||||
auto connection = runControl->connection().as<AnalyzerConnection>();
|
||||
if (!connection.analyzerSocket.isEmpty())
|
||||
d->m_profilerConnections->setLocalSocket(connection.analyzerSocket);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user