diff options
-rw-r--r-- | src/lib/buildgraph/buildgraph.cpp | 3 | ||||
-rw-r--r-- | src/lib/qbs.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/buildgraph/buildgraph.cpp b/src/lib/buildgraph/buildgraph.cpp index dd3b90be5..336e4411a 100644 --- a/src/lib/buildgraph/buildgraph.cpp +++ b/src/lib/buildgraph/buildgraph.cpp @@ -238,6 +238,9 @@ bool findPath(Artifact *u, Artifact *v, QList<Artifact*> &path) void connect(Artifact *p, Artifact *c) { QBS_CHECK(p != c); + foreach (const Artifact * const child, p->children) + if (child != c && child->filePath() == c->filePath()) + throw ErrorInfo(QString::fromLocal8Bit("Artifact %1 already has a child artifact %2 as different object.").arg(p->filePath(), c->filePath()), CodeLocation(), true); p->children.insert(c); c->parents.insert(p); p->product->topLevelProject()->buildData->isDirty = true; diff --git a/src/lib/qbs.h b/src/lib/qbs.h index 56ae00990..591fe557d 100644 --- a/src/lib/qbs.h +++ b/src/lib/qbs.h @@ -38,6 +38,7 @@ #include "tools/error.h" #include "tools/installoptions.h" #include "tools/preferences.h" +#include "tools/profile.h" #include "tools/processresult.h" #include "tools/settings.h" #include "tools/setupprojectparameters.h" |