Merge remote-tracking branch 'origin/4.5'

Conflicts:
	src/plugins/cpptools/clangcompileroptionsbuilder.cpp
	src/plugins/cpptools/clangcompileroptionsbuilder.h
	src/plugins/cpptools/compileroptionsbuilder.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.h
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.h
	src/shared/qbs

Change-Id: I364ababc5d41046d17e999096c4a7187c4e4e010
This commit is contained in:
Eike Ziller
2018-01-09 13:07:57 +01:00
19 changed files with 85 additions and 110 deletions

View File

@@ -44,6 +44,7 @@
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
#include <utils/qtcassert.h>
#include <utils/url.h>
#include <utils/utilsicons.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/projectexplorer.h>
@@ -406,7 +407,7 @@ void QmlProfilerTool::recordingButtonChanged(bool recording)
if (checkForUnsavedNotes()) {
if (!d->m_profilerModelManager->aggregateTraces() ||
d->m_profilerModelManager->state() == QmlProfilerModelManager::Done)
clearData(); // clear before the recording starts, unless we aggregate recordings
clearEvents(); // clear before the recording starts, unless we aggregate recordings
if (d->m_profilerState->clientRecording())
d->m_profilerState->setClientRecording(false);
d->m_profilerState->setClientRecording(true);
@@ -471,6 +472,13 @@ void QmlProfilerTool::showTimeLineSearch()
Core::Find::openFindToolBar(Core::Find::FindForwardDirection);
}
void QmlProfilerTool::clearEvents()
{
d->m_profilerModelManager->clearEvents();
d->m_profilerConnections->clearEvents();
setRecordedFeatures(0);
}
void QmlProfilerTool::clearData()
{
d->m_profilerModelManager->clear();
@@ -555,6 +563,7 @@ void QmlProfilerTool::attachToWaitingApplication()
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
QTC_ASSERT(device, return);
QUrl toolControl = device->toolControlChannel(IDevice::QmlControlChannel);
serverUrl.setScheme(Utils::urlTcpScheme());
serverUrl.setHost(toolControl.host());
serverUrl.setPort(port);
@@ -565,6 +574,8 @@ void QmlProfilerTool::attachToWaitingApplication()
auto profiler = new QmlProfilerRunner(runControl);
profiler->setServerUrl(serverUrl);
connect(d->m_profilerConnections, &QmlProfilerClientManager::connectionClosed,
runControl, &RunControl::initiateStop);
ProjectExplorerPlugin::startRunControl(runControl);
}
@@ -858,7 +869,7 @@ void QmlProfilerTool::serverRecordingChanged()
d->m_recordingElapsedTime.start();
if (!d->m_profilerModelManager->aggregateTraces() ||
d->m_profilerModelManager->state() == QmlProfilerModelManager::Done)
clearData();
clearEvents();
d->m_profilerModelManager->startAcquiring();
} else {
d->m_recordingTimer.stop();