forked from qt-creator/qt-creator
Utils: Pass MacroExpander to ArgumentsAspect constructor
In the past we wanted to keep the aspect constructor simple but it turned out that exceptions were needed and accumulating, so those are likely here to stay. By passing also the MacroExpander to the ArgumentsAspect constructor allows other single-purpose warts like the ProjectConfiguration::doPostInit() machinery can be removed. Change-Id: I148b0ca1ab0740270eecd0d3134620de65a86d4f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -135,17 +135,11 @@ bool ProjectConfiguration::fromMap(const QVariantMap &map)
|
||||
return true;
|
||||
}
|
||||
|
||||
Utils::BaseAspect *ProjectConfiguration::aspect(Utils::Id id) const
|
||||
BaseAspect *ProjectConfiguration::aspect(Id id) const
|
||||
{
|
||||
return m_aspects.aspect(id);
|
||||
}
|
||||
|
||||
void ProjectConfiguration::doPostInit()
|
||||
{
|
||||
for (const std::function<void()> &postInit : qAsConst(m_postInit))
|
||||
postInit();
|
||||
}
|
||||
|
||||
FilePath ProjectConfiguration::mapFromBuildDeviceToGlobalPath(const FilePath &path) const
|
||||
{
|
||||
IDevice::ConstPtr dev = BuildDeviceKitAspect::device(kit());
|
||||
@@ -153,9 +147,9 @@ FilePath ProjectConfiguration::mapFromBuildDeviceToGlobalPath(const FilePath &pa
|
||||
return dev->mapToGlobalPath(path);
|
||||
}
|
||||
|
||||
Utils::Id ProjectExplorer::idFromMap(const QVariantMap &map)
|
||||
Id ProjectExplorer::idFromMap(const QVariantMap &map)
|
||||
{
|
||||
return Utils::Id::fromSetting(map.value(QLatin1String(CONFIGURATION_ID_KEY)));
|
||||
return Id::fromSetting(map.value(QLatin1String(CONFIGURATION_ID_KEY)));
|
||||
}
|
||||
|
||||
QString ProjectConfiguration::expandedDisplayName() const
|
||||
|
||||
Reference in New Issue
Block a user