forked from qt-creator/qt-creator
CMakeProjectManager: Add some soft asserts
The actual problem is fixed by 1f540c6c9
, this is to make sure we
don't crash if this regresses again.
Change-Id: Id081ce9a9c3602c3a90216f53d63535097fabd2d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -631,6 +631,7 @@ void ServerModeReader::addProjects(CMakeListsNode *root,
|
|||||||
for (const Project *p : projects) {
|
for (const Project *p : projects) {
|
||||||
CMakeProjectNode *pNode = findOrCreateProjectNode(root, p->sourceDirectory, p->name);
|
CMakeProjectNode *pNode = findOrCreateProjectNode(root, p->sourceDirectory, p->name);
|
||||||
QTC_ASSERT(pNode, continue);
|
QTC_ASSERT(pNode, continue);
|
||||||
|
QTC_ASSERT(root, continue);
|
||||||
addTargets(root, p->targets, includeFiles);
|
addTargets(root, p->targets, includeFiles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -659,6 +660,7 @@ void ServerModeReader::addTargets(CMakeListsNode *root,
|
|||||||
{
|
{
|
||||||
for (const Target *t : targets) {
|
for (const Target *t : targets) {
|
||||||
CMakeTargetNode *tNode = findOrCreateTargetNode(root, t->sourceDirectory, t->name);
|
CMakeTargetNode *tNode = findOrCreateTargetNode(root, t->sourceDirectory, t->name);
|
||||||
|
QTC_ASSERT(tNode, qDebug() << "No target node for" << t->sourceDirectory << t->name; return);
|
||||||
tNode->setTargetInformation(t->artifacts, t->type);
|
tNode->setTargetInformation(t->artifacts, t->type);
|
||||||
addFileGroups(tNode, t->sourceDirectory, t->buildDirectory, t->fileGroups, headers);
|
addFileGroups(tNode, t->sourceDirectory, t->buildDirectory, t->fileGroups, headers);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user