summaryrefslogtreecommitdiff
path: root/src/plugins/analyzerbase
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-02-23 14:41:28 +0100
committerhjk <qthjk@ovi.com>2012-02-23 18:16:46 +0100
commit43f69abea1a048cb372a68734a8b36f0a3e38142 (patch)
tree33eecb2931138844e02922d3a08422e077d19bc1 /src/plugins/analyzerbase
parent2153c2281280055512944a242ade827c3f3332a4 (diff)
downloadqt-creator-43f69abea1a048cb372a68734a8b36f0a3e38142.tar.gz
Rename {Analyzer,Debugger}ProjectSettings to *RunConfigurationAspect
Change-Id: I5913ddaaab1a80b1557f0bcf7ebcc15e0e4b74eb Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/analyzerbase')
-rw-r--r--src/plugins/analyzerbase/analyzerrunconfigwidget.cpp22
-rw-r--r--src/plugins/analyzerbase/analyzerrunconfigwidget.h2
-rw-r--r--src/plugins/analyzerbase/analyzerruncontrolfactory.cpp6
-rw-r--r--src/plugins/analyzerbase/analyzersettings.cpp14
-rw-r--r--src/plugins/analyzerbase/analyzersettings.h6
5 files changed, 23 insertions, 27 deletions
diff --git a/src/plugins/analyzerbase/analyzerrunconfigwidget.cpp b/src/plugins/analyzerbase/analyzerrunconfigwidget.cpp
index 16b5721056..d4afaf47d4 100644
--- a/src/plugins/analyzerbase/analyzerrunconfigwidget.cpp
+++ b/src/plugins/analyzerbase/analyzerrunconfigwidget.cpp
@@ -98,17 +98,17 @@ void AnalyzerRunConfigWidget::setRunConfiguration(ProjectExplorer::RunConfigurat
{
QTC_ASSERT(rc, return);
- m_settings = rc->extraAspect<AnalyzerProjectSettings>();
- QTC_ASSERT(m_settings, return);
+ m_aspect = rc->extraAspect<AnalyzerRunConfigurationAspect>();
+ QTC_ASSERT(m_aspect, return);
// add config widget for each sub config
- foreach (AbstractAnalyzerSubConfig *config, m_settings->customSubConfigs()) {
+ foreach (AbstractAnalyzerSubConfig *config, m_aspect->customSubConfigs()) {
QWidget *widget = new AnalyzerToolDetailWidget(config);
m_subConfigWidget->layout()->addWidget(widget);
}
- setDetailEnabled(!m_settings->isUsingGlobalSettings());
- m_settingsCombo->setCurrentIndex(m_settings->isUsingGlobalSettings() ? 0 : 1);
- m_restoreButton->setEnabled(!m_settings->isUsingGlobalSettings());
+ setDetailEnabled(!m_aspect->isUsingGlobalSettings());
+ m_settingsCombo->setCurrentIndex(m_aspect->isUsingGlobalSettings() ? 0 : 1);
+ m_restoreButton->setEnabled(!m_aspect->isUsingGlobalSettings());
}
void AnalyzerRunConfigWidget::setDetailEnabled(bool value)
@@ -120,16 +120,16 @@ void AnalyzerRunConfigWidget::setDetailEnabled(bool value)
void AnalyzerRunConfigWidget::chooseSettings(int setting)
{
- QTC_ASSERT(m_settings, return);
+ QTC_ASSERT(m_aspect, return);
setDetailEnabled(setting != 0);
- m_settings->setUsingGlobalSettings(setting == 0);
- m_restoreButton->setEnabled(!m_settings->isUsingGlobalSettings());
+ m_aspect->setUsingGlobalSettings(setting == 0);
+ m_restoreButton->setEnabled(!m_aspect->isUsingGlobalSettings());
}
void AnalyzerRunConfigWidget::restoreGlobal()
{
- QTC_ASSERT(m_settings, return);
- m_settings->resetCustomToGlobalSettings();
+ QTC_ASSERT(m_aspect, return);
+ m_aspect->resetCustomToGlobalSettings();
}
} // namespace Internal
diff --git a/src/plugins/analyzerbase/analyzerrunconfigwidget.h b/src/plugins/analyzerbase/analyzerrunconfigwidget.h
index da7c9129e2..87f20e49bb 100644
--- a/src/plugins/analyzerbase/analyzerrunconfigwidget.h
+++ b/src/plugins/analyzerbase/analyzerrunconfigwidget.h
@@ -85,7 +85,7 @@ private slots:
private:
QWidget *m_subConfigWidget;
- AnalyzerProjectSettings *m_settings;
+ AnalyzerRunConfigurationAspect *m_aspect;
QComboBox *m_settingsCombo;
QPushButton *m_restoreButton;
};
diff --git a/src/plugins/analyzerbase/analyzerruncontrolfactory.cpp b/src/plugins/analyzerbase/analyzerruncontrolfactory.cpp
index e887f4008e..87392ae802 100644
--- a/src/plugins/analyzerbase/analyzerruncontrolfactory.cpp
+++ b/src/plugins/analyzerbase/analyzerruncontrolfactory.cpp
@@ -86,15 +86,11 @@ RunControl *AnalyzerRunControlFactory::create(RunConfiguration *runConfiguration
IRunConfigurationAspect *AnalyzerRunControlFactory::createRunConfigurationAspect()
{
- return new AnalyzerProjectSettings;
+ return new AnalyzerRunConfigurationAspect;
}
RunConfigWidget *AnalyzerRunControlFactory::createConfigurationWidget(RunConfiguration *runConfiguration)
{
- AnalyzerProjectSettings *settings = runConfiguration->extraAspect<AnalyzerProjectSettings>();
- if (!settings)
- return 0;
-
AnalyzerRunConfigWidget *ret = new AnalyzerRunConfigWidget;
ret->setRunConfiguration(runConfiguration);
return ret;
diff --git a/src/plugins/analyzerbase/analyzersettings.cpp b/src/plugins/analyzerbase/analyzersettings.cpp
index 325c0d4f65..f3e955e670 100644
--- a/src/plugins/analyzerbase/analyzersettings.cpp
+++ b/src/plugins/analyzerbase/analyzersettings.cpp
@@ -152,7 +152,7 @@ void AnalyzerGlobalSettings::registerTool(IAnalyzerTool *tool)
}
-AnalyzerProjectSettings::AnalyzerProjectSettings(QObject *parent)
+AnalyzerRunConfigurationAspect::AnalyzerRunConfigurationAspect(QObject *parent)
: AnalyzerSettings(parent), m_useGlobalSettings(true)
{
QList<IAnalyzerTool*> tools = AnalyzerManager::tools();
@@ -167,30 +167,30 @@ AnalyzerProjectSettings::AnalyzerProjectSettings(QObject *parent)
resetCustomToGlobalSettings();
}
-AnalyzerProjectSettings::~AnalyzerProjectSettings()
+AnalyzerRunConfigurationAspect::~AnalyzerRunConfigurationAspect()
{
qDeleteAll(m_customConfigurations);
}
-QString AnalyzerProjectSettings::displayName() const
+QString AnalyzerRunConfigurationAspect::displayName() const
{
return tr("Analyzer Settings");
}
-void AnalyzerProjectSettings::fromMap(const QVariantMap &map)
+void AnalyzerRunConfigurationAspect::fromMap(const QVariantMap &map)
{
AnalyzerSettings::fromMap(map, &m_customConfigurations);
m_useGlobalSettings = map.value(QLatin1String(useGlobalC), true).toBool();
}
-QVariantMap AnalyzerProjectSettings::toMap() const
+QVariantMap AnalyzerRunConfigurationAspect::toMap() const
{
QVariantMap map = AnalyzerSettings::toMap(m_customConfigurations);
map.insert(QLatin1String(useGlobalC), m_useGlobalSettings);
return map;
}
-void AnalyzerProjectSettings::setUsingGlobalSettings(bool value)
+void AnalyzerRunConfigurationAspect::setUsingGlobalSettings(bool value)
{
if (value == m_useGlobalSettings)
return;
@@ -202,7 +202,7 @@ void AnalyzerProjectSettings::setUsingGlobalSettings(bool value)
}
}
-void AnalyzerProjectSettings::resetCustomToGlobalSettings()
+void AnalyzerRunConfigurationAspect::resetCustomToGlobalSettings()
{
AnalyzerGlobalSettings *gs = AnalyzerGlobalSettings::instance();
AnalyzerSettings::fromMap(gs->toMap(), &m_customConfigurations);
diff --git a/src/plugins/analyzerbase/analyzersettings.h b/src/plugins/analyzerbase/analyzersettings.h
index 3a3788946d..5b581cddce 100644
--- a/src/plugins/analyzerbase/analyzersettings.h
+++ b/src/plugins/analyzerbase/analyzersettings.h
@@ -160,14 +160,14 @@ private:
* rc->extraAspect<AnalyzerProjectSettings>()->subConfig<YourProjectConfig>()->...
* @endcode
*/
-class ANALYZER_EXPORT AnalyzerProjectSettings
+class ANALYZER_EXPORT AnalyzerRunConfigurationAspect
: public AnalyzerSettings, public ProjectExplorer::IRunConfigurationAspect
{
Q_OBJECT
public:
- AnalyzerProjectSettings(QObject *parent = 0);
- ~AnalyzerProjectSettings();
+ AnalyzerRunConfigurationAspect(QObject *parent = 0);
+ ~AnalyzerRunConfigurationAspect();
QString displayName() const;
virtual QVariantMap toMap() const;