forked from qt-creator/qt-creator
ProjectExplorer: Introduce a central mechanism to update RC aspects
Using the usual pattern of setting a std::function, and calling it.
In the initial steps, update() is meant to be manually called in the
derived RunConfigurations, mid-term the idea is to at least cover
well-known ("Kit changed", ...) cases centrally.
Change-Id: Ic00572bb57fb45ef109bd0ddb8a9c3132d4f0f13
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -311,6 +311,11 @@ BuildSystem *RunConfiguration::activeBuildSystem() const
|
||||
return target()->buildSystem();
|
||||
}
|
||||
|
||||
void RunConfiguration::setUpdater(const Updater &updater)
|
||||
{
|
||||
m_updater = updater;
|
||||
}
|
||||
|
||||
QVariantMap RunConfiguration::toMap() const
|
||||
{
|
||||
QVariantMap map = ProjectConfiguration::toMap();
|
||||
@@ -336,6 +341,12 @@ CommandLine RunConfiguration::commandLine() const
|
||||
return m_commandLineGetter();
|
||||
}
|
||||
|
||||
void RunConfiguration::update()
|
||||
{
|
||||
QTC_ASSERT(m_updater, return);
|
||||
m_updater();
|
||||
}
|
||||
|
||||
BuildTargetInfo RunConfiguration::buildTargetInfo() const
|
||||
{
|
||||
BuildSystem *bs = target()->buildSystem();
|
||||
|
||||
Reference in New Issue
Block a user