diff --git a/src/plugins/projectexplorer/buildsystem.cpp b/src/plugins/projectexplorer/buildsystem.cpp index 8c06f928c1f..7b6f4bbf5ad 100644 --- a/src/plugins/projectexplorer/buildsystem.cpp +++ b/src/plugins/projectexplorer/buildsystem.cpp @@ -341,6 +341,20 @@ void BuildSystem::emitBuildSystemUpdated() target()->buildSystemUpdated(this); } +void BuildSystem::setExtraData(const QString &buildKey, Core::Id dataKey, const QVariant &data) +{ + const ProjectNode *node = d->m_target->project()->findNodeForBuildKey(buildKey); + QTC_ASSERT(node, return); + node->setData(dataKey, data); +} + +QVariant BuildSystem::extraData(const QString &buildKey, Core::Id dataKey) const +{ + const ProjectNode *node = d->m_target->project()->findNodeForBuildKey(buildKey); + QTC_ASSERT(node, return {}); + return node->data(dataKey); +} + QString BuildSystem::disabledReason(const QString &buildKey) const { if (!hasParsingData()) { diff --git a/src/plugins/projectexplorer/buildsystem.h b/src/plugins/projectexplorer/buildsystem.h index a96150bfc0c..af69ca29e48 100644 --- a/src/plugins/projectexplorer/buildsystem.h +++ b/src/plugins/projectexplorer/buildsystem.h @@ -121,6 +121,9 @@ public: void emitBuildSystemUpdated(); + void setExtraData(const QString &buildKey, Core::Id dataKey, const QVariant &data); + QVariant extraData(const QString &buildKey, Core::Id dataKey) const; + public: // FIXME: Make this private and the BuildSystem a friend ParseGuard guardParsingRun() { return ParseGuard(this); }