Merge remote-tracking branch 'origin/4.0'

Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
This commit is contained in:
Eike Ziller
2016-04-20 14:58:48 +02:00
112 changed files with 794 additions and 881 deletions

View File

@@ -112,13 +112,18 @@ void QmlProfilerClientManager::setTcpConnection(QString host, Utils::Port port)
{
d->tcpHost = host;
d->tcpPort = port;
d->localSocket.clear();
disconnectClient();
// Wait for the application to announce the port before connecting.
}
void QmlProfilerClientManager::setLocalSocket(QString file)
{
d->localSocket = file;
d->tcpHost.clear();
d->tcpPort = Utils::Port();
disconnectClient();
// We open the server and the application connects to it, so let's do that right away.
connectLocalClient(file);
}

View File

@@ -101,7 +101,7 @@ QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration,
QmlProfilerRunControl::~QmlProfilerRunControl()
{
if (d->m_profilerState)
if (d->m_running && d->m_profilerState)
stop();
delete d;
}

View File

@@ -333,12 +333,13 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(RunConfiguration *runConfi
}
auto runControl = new QmlProfilerRunControl(runConfiguration, this);
connect(runControl, &RunControl::finished, [this, runControl] {
connect(runControl, &RunControl::finished, this, [this, runControl] {
d->m_toolBusy = false;
updateRunActions();
disconnect(d->m_stopAction, &QAction::triggered, runControl, &QmlProfilerRunControl::stop);
});
connect(d->m_stopAction, &QAction::triggered, runControl, [runControl] { runControl->stop(); });
connect(d->m_stopAction, &QAction::triggered, runControl, &QmlProfilerRunControl::stop);
updateRunActions();
return runControl;