forked from qt-creator/qt-creator
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:
@@ -78,13 +78,14 @@ namespace ProjectExplorer {
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISettingsAspect *ISettingsAspect::clone() const
|
||||
ISettingsAspect::ISettingsAspect(RunConfiguration *runConfiguration) :
|
||||
m_runConfiguration(runConfiguration)
|
||||
{
|
||||
ISettingsAspect *other = create();
|
||||
QVariantMap data;
|
||||
toMap(data);
|
||||
other->fromMap(data);
|
||||
return other;
|
||||
}
|
||||
|
||||
RunConfiguration *ISettingsAspect::runConfiguration() const
|
||||
{
|
||||
return m_runConfiguration;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user