ProjectExplorer: Remove direct runconfig dependency from ISettingsAspect

Change-Id: I5d8a6a31f6bf97c34163b64b8d37f9ea070717ba
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
hjk
2018-09-10 15:39:27 +02:00
parent 02d8dde4c9
commit 69753cf9b6
12 changed files with 29 additions and 53 deletions

View File

@@ -81,6 +81,10 @@ template <typename T> void setIfPresent(const QVariantMap &map, const QString &k
*val = map.value(key).template value<T>();
}
ValgrindBaseSettings::ValgrindBaseSettings(const ConfigWidgetCreator &creator)
: ISettingsAspect(creator)
{}
void ValgrindBaseSettings::fromMap(const QVariantMap &map)
{
// General
@@ -113,10 +117,6 @@ void ValgrindBaseSettings::fromMap(const QVariantMap &map)
emit changed();
}
ValgrindBaseSettings::ValgrindBaseSettings(ProjectExplorer::RunConfiguration *runConfiguration) :
ProjectExplorer::ISettingsAspect(runConfiguration)
{}
void ValgrindBaseSettings::toMap(QVariantMap &map) const
{
// General
@@ -289,15 +289,11 @@ void ValgrindBaseSettings::setVisualisationMinimumInclusiveCostRatio(
//////////////////////////////////////////////////////////////////
ValgrindGlobalSettings::ValgrindGlobalSettings()
: ValgrindBaseSettings([this] { return new ValgrindConfigWidget(this, true); })
{
readSettings();
}
QWidget *ValgrindGlobalSettings::createConfigWidget(QWidget *parent)
{
return new ValgrindConfigWidget(this, parent, true);
}
void ValgrindGlobalSettings::fromMap(const QVariantMap &map)
{
ValgrindBaseSettings::fromMap(map);
@@ -475,16 +471,10 @@ void ValgrindGlobalSettings::setShortenTemplates(bool on)
//
//////////////////////////////////////////////////////////////////
ValgrindProjectSettings::ValgrindProjectSettings(
ProjectExplorer::RunConfiguration *runConfiguration) :
ValgrindBaseSettings(runConfiguration)
ValgrindProjectSettings::ValgrindProjectSettings()
: ValgrindBaseSettings([this] { return new ValgrindConfigWidget(this, false); })
{}
QWidget *ValgrindProjectSettings::createConfigWidget(QWidget *parent)
{
return new ValgrindConfigWidget(this, parent, false);
}
void ValgrindProjectSettings::fromMap(const QVariantMap &map)
{
ValgrindBaseSettings::fromMap(map);