forked from qt-creator/qt-creator
Analyzer: Rename AbstractAnalyzerSubConfig to ISettingsAspect
More in line with IRunConfigurationAspect Change-Id: I50a038de004733b6b19d345b30a63cc2db02875a Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -548,7 +548,7 @@ AnalyzerRunControl *CallgrindToolPrivate::createRunControl(const AnalyzerStartPa
|
||||
if (runConfiguration) {
|
||||
if (AnalyzerRunConfigurationAspect *analyzerAspect
|
||||
= runConfiguration->extraAspect<AnalyzerRunConfigurationAspect>(ANALYZER_VALGRIND_SETTINGS)) {
|
||||
if (const ValgrindBaseSettings *settings = qobject_cast<ValgrindBaseSettings *>(analyzerAspect->currentConfig())) {
|
||||
if (const ValgrindBaseSettings *settings = qobject_cast<ValgrindBaseSettings *>(analyzerAspect->currentSettings())) {
|
||||
m_visualisation->setMinimumInclusiveCostRatio(settings->visualisationMinimumInclusiveCostRatio() / 100.0);
|
||||
m_proxyModel->setMinimumInclusiveCostRatio(settings->minimumInclusiveCostRatio() / 100.0);
|
||||
m_dataModel->setVerboseToolTipsEnabled(settings->enableEventToolTips());
|
||||
|
||||
@@ -232,7 +232,7 @@ void MemcheckTool::maybeActiveRunConfigurationChanged()
|
||||
if (Target *target = project->activeTarget())
|
||||
if (RunConfiguration *rc = target->activeRunConfiguration())
|
||||
if (AnalyzerRunConfigurationAspect *aspect = rc->extraAspect<AnalyzerRunConfigurationAspect>(ANALYZER_VALGRIND_SETTINGS))
|
||||
settings = qobject_cast<ValgrindBaseSettings *>(aspect->customSubConfig());
|
||||
settings = qobject_cast<ValgrindBaseSettings *>(aspect->projectSettings());
|
||||
|
||||
if (!settings) // fallback to global settings
|
||||
settings = ValgrindPlugin::globalSettings();
|
||||
|
||||
@@ -65,7 +65,7 @@ ValgrindRunControl::ValgrindRunControl(const AnalyzerStartParameters &sp,
|
||||
{
|
||||
if (runConfiguration)
|
||||
if (AnalyzerRunConfigurationAspect *aspect = runConfiguration->extraAspect<AnalyzerRunConfigurationAspect>(ANALYZER_VALGRIND_SETTINGS))
|
||||
m_settings = qobject_cast<ValgrindBaseSettings *>(aspect->customSubConfig());
|
||||
m_settings = qobject_cast<ValgrindBaseSettings *>(aspect->projectSettings());
|
||||
|
||||
if (!m_settings)
|
||||
m_settings = ValgrindPlugin::globalSettings();
|
||||
|
||||
@@ -282,7 +282,7 @@ void ValgrindGlobalSettings::fromMap(const QVariantMap &map)
|
||||
setIfPresent(map, QLatin1String(callgrindShortenTemplates), &m_shortenTemplates);
|
||||
}
|
||||
|
||||
AbstractAnalyzerSubConfig *ValgrindGlobalSettings::clone()
|
||||
ISettingsAspect *ValgrindGlobalSettings::clone()
|
||||
{
|
||||
ValgrindGlobalSettings *other = new ValgrindGlobalSettings;
|
||||
QVariantMap data;
|
||||
@@ -461,7 +461,7 @@ void ValgrindProjectSettings::fromMap(const QVariantMap &map)
|
||||
setIfPresent(map, QLatin1String(removedSuppressionFilesC), &m_disabledGlobalSuppressionFiles);
|
||||
}
|
||||
|
||||
AbstractAnalyzerSubConfig *ValgrindProjectSettings::clone()
|
||||
ISettingsAspect *ValgrindProjectSettings::clone()
|
||||
{
|
||||
ValgrindProjectSettings *other = new ValgrindProjectSettings;
|
||||
QVariantMap data;
|
||||
|
||||
@@ -46,7 +46,7 @@ const char ANALYZER_VALGRIND_SETTINGS[] = "Analyzer.Valgrind.Settings";
|
||||
/**
|
||||
* Valgrind settings shared for global and per-project.
|
||||
*/
|
||||
class ValgrindBaseSettings : public Analyzer::AbstractAnalyzerSubConfig
|
||||
class ValgrindBaseSettings : public Analyzer::ISettingsAspect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
QWidget *createConfigWidget(QWidget *parent);
|
||||
void toMap(QVariantMap &map) const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
virtual AbstractAnalyzerSubConfig *clone();
|
||||
virtual ISettingsAspect *clone();
|
||||
|
||||
/*
|
||||
* Global memcheck settings
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
QWidget *createConfigWidget(QWidget *parent);
|
||||
void toMap(QVariantMap &map) const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
virtual AbstractAnalyzerSubConfig *clone();
|
||||
virtual ISettingsAspect *clone();
|
||||
|
||||
/**
|
||||
* Per-project memcheck settings, saves a diff to the global suppression files list
|
||||
|
||||
Reference in New Issue
Block a user