Commit 4f741fc7 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Analyzer[callgrind]: Fix a crash when remote profiling.

Task-number: QTCREATORBUG-5402

Change-Id: Ifd42befddccd28abdc5ee0a701321e1a6cf58f7f
Reviewed-on: http://codereview.qt.nokia.com/1774

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 22c0f6ae
......@@ -121,7 +121,7 @@ public:
void updateEventCombo();
IAnalyzerEngine *createEngine(const AnalyzerStartParameters &sp,
ProjectExplorer::RunConfiguration *runConfiguration);
ProjectExplorer::RunConfiguration *runConfiguration = 0);
signals:
void cycleDetectionEnabled(bool enabled);
......@@ -596,16 +596,18 @@ IAnalyzerEngine *CallgrindToolPrivate::createEngine(const AnalyzerStartParameter
AnalyzerManager::showStatusMessage(AnalyzerManager::msgToolStarted(q->displayName()));
// apply project settings
AnalyzerProjectSettings *analyzerSettings = runConfiguration->extraAspect<AnalyzerProjectSettings>();
ValgrindProjectSettings *settings = analyzerSettings->subConfig<ValgrindProjectSettings>();
QTC_ASSERT(settings, return engine)
QTC_ASSERT(m_visualisation, return engine);
m_visualisation->setMinimumInclusiveCostRatio(settings->visualisationMinimumInclusiveCostRatio() / 100.0);
m_proxyModel->setMinimumInclusiveCostRatio(settings->minimumInclusiveCostRatio() / 100.0);
m_dataModel->setVerboseToolTipsEnabled(settings->enableEventToolTips());
// apply project settings
if (runConfiguration) {
if (const AnalyzerProjectSettings *analyzerSettings = runConfiguration->extraAspect<AnalyzerProjectSettings>()) {
if (const ValgrindProjectSettings *settings = analyzerSettings->subConfig<ValgrindProjectSettings>()) {
m_visualisation->setMinimumInclusiveCostRatio(settings->visualisationMinimumInclusiveCostRatio() / 100.0);
m_proxyModel->setMinimumInclusiveCostRatio(settings->minimumInclusiveCostRatio() / 100.0);
m_dataModel->setVerboseToolTipsEnabled(settings->enableEventToolTips());
}
}
}
return engine;
}
......
Supports Markdown
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