ProjectExplorer: Keep RunConfiguration in ISettingsAspect

Any SettingsAspect that doesn't refer to the global settings has a
specific RunConfiguration it is about. This can be very handy to know
when constructing the actual settings. Right now there is no way to find
out about it.

Drop the clone() and create() methods. They weren't used anywhere and a
proper implementation should take care of the runConfiguration member.

Change-Id: Ie505a9b19707f8a1b6bf9cae73513cd3c30d0bca
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2018-04-26 11:04:03 +02:00
parent 9678ea5755
commit f0baf01a2e
8 changed files with 29 additions and 26 deletions

View File

@@ -113,6 +113,10 @@ void ValgrindBaseSettings::fromMap(const QVariantMap &map)
emit changed();
}
ValgrindBaseSettings::ValgrindBaseSettings(ProjectExplorer::RunConfiguration *runConfiguration) :
ProjectExplorer::ISettingsAspect(runConfiguration)
{}
void ValgrindBaseSettings::toMap(QVariantMap &map) const
{
// General
@@ -471,6 +475,11 @@ void ValgrindGlobalSettings::setShortenTemplates(bool on)
//
//////////////////////////////////////////////////////////////////
ValgrindProjectSettings::ValgrindProjectSettings(
ProjectExplorer::RunConfiguration *runConfiguration) :
ValgrindBaseSettings(runConfiguration)
{}
QWidget *ValgrindProjectSettings::createConfigWidget(QWidget *parent)
{
return new ValgrindConfigWidget(this, parent, false);