Commit 7ecd0763 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: assert that connections are AnalyzerConnections



... before accessing them as AnalyzerConnection

Change-Id: I6f6111ca3b0dede93ac85fbcb5ffbfcf3c7b19aa
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 7d5d0262
......@@ -251,8 +251,10 @@ void QmlProfilerRunControl::processIsRunning(Utils::Port port)
{
d->m_noDebugOutputTimer.stop();
if (!port.isValid())
if (!port.isValid()) {
QTC_ASSERT(connection().is<AnalyzerConnection>(), return);
port = connection().as<AnalyzerConnection>().analyzerPort;
}
if (port.isValid())
emit processRunning(port);
}
......
......@@ -349,6 +349,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunControl *runControl)
{
runControl->registerProfilerStateManager(d->m_profilerState);
QTC_ASSERT(runControl->connection().is<AnalyzerConnection>(), return);
// FIXME: Check that there's something sensible in sp.connParams
auto connection = runControl->connection().as<AnalyzerConnection>();
if (!connection.analyzerSocket.isEmpty())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment