Fail project loading when no targets could get set up

* Not good, but better than ASSERTing/crashing later on.
 * Use a qWarning to provide some hint on what is going on.
This commit is contained in:
Tobias Hunger
2010-02-19 11:07:15 +01:00
parent bddf21c553
commit a22af06223

View File

@@ -287,6 +287,11 @@ bool Qt4Project::fromMap(const QVariantMap &map)
if (targets().isEmpty())
addDefaultBuild();
if (targets().isEmpty()) {
qWarning() << "Unable to create targets!";
return false;
}
Q_ASSERT(activeTarget());
Q_ASSERT(activeTarget()->activeBuildConfiguration());