forked from qt-creator/qt-creator
QmlProfiler: Avoid a direct use of runControl->runConfiguration()
Change-Id: Ib9caba243c3a41b11ff983b9ce764f69faeb8829 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -300,16 +300,12 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
|
|||||||
{
|
{
|
||||||
d->m_toolBusy = true;
|
d->m_toolBusy = true;
|
||||||
auto runControl = runWorker->runControl();
|
auto runControl = runWorker->runControl();
|
||||||
auto runConfiguration = runControl->runConfiguration();
|
if (auto aspect = static_cast<QmlProfilerRunConfigurationAspect *>(
|
||||||
if (runConfiguration) {
|
runControl->aspect(Constants::SETTINGS))) {
|
||||||
auto aspect = static_cast<QmlProfilerRunConfigurationAspect *>(
|
if (auto settings = static_cast<const QmlProfilerSettings *>(aspect->currentSettings())) {
|
||||||
runControl->aspect(Constants::SETTINGS));
|
d->m_profilerConnections->setFlushInterval(settings->flushEnabled() ?
|
||||||
if (aspect) {
|
settings->flushInterval() : 0);
|
||||||
if (auto settings = static_cast<const QmlProfilerSettings *>(aspect->currentSettings())) {
|
d->m_profilerModelManager->setAggregateTraces(settings->aggregateTraces());
|
||||||
d->m_profilerConnections->setFlushInterval(settings->flushEnabled() ?
|
|
||||||
settings->flushInterval() : 0);
|
|
||||||
d->m_profilerModelManager->setAggregateTraces(settings->aggregateTraces());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,8 +337,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
|
|||||||
// Initialize m_projectFinder
|
// Initialize m_projectFinder
|
||||||
//
|
//
|
||||||
|
|
||||||
d->m_profilerModelManager->populateFileFinder(runConfiguration ? runConfiguration->target()
|
d->m_profilerModelManager->populateFileFinder(runControl->target());
|
||||||
: nullptr);
|
|
||||||
|
|
||||||
connect(d->m_profilerConnections, &QmlProfilerClientManager::connectionFailed,
|
connect(d->m_profilerConnections, &QmlProfilerClientManager::connectionFailed,
|
||||||
runWorker, [this, runWorker]() {
|
runWorker, [this, runWorker]() {
|
||||||
|
Reference in New Issue
Block a user