forked from qt-creator/qt-creator
QbsProjectManager: Fix project node operations.
The qbsProjectData() member function always returned the top-level project data, which messed up a couple of things, for instance "build sub-projects" and the node tree updates. Instead, return the project data corresponding to the node. Change-Id: If40c441c62334f0069a5fe3cb4873cf973baf135 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -243,6 +243,7 @@ bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &
|
||||
if (notAdded->count() != filePaths.count()) {
|
||||
m_projectData = m_qbsProject.projectData();
|
||||
QbsGroupNode::setupFiles(node, allPaths, QFileInfo(productFilePath).absolutePath(), true);
|
||||
m_rootProjectNode->update();
|
||||
}
|
||||
return notAdded->isEmpty();
|
||||
}
|
||||
@@ -268,6 +269,7 @@ bool QbsProject::removeFilesFromProduct(QbsBaseProjectNode *node, const QStringL
|
||||
if (notRemoved->count() != filePaths.count()) {
|
||||
m_projectData = m_qbsProject.projectData();
|
||||
QbsGroupNode::setupFiles(node, allPaths, QFileInfo(productFilePath).absolutePath(), true);
|
||||
m_rootProjectNode->update();
|
||||
}
|
||||
return notRemoved->isEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user