Commit a22af062 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

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.
parent bddf21c5
...@@ -287,6 +287,11 @@ bool Qt4Project::fromMap(const QVariantMap &map) ...@@ -287,6 +287,11 @@ bool Qt4Project::fromMap(const QVariantMap &map)
if (targets().isEmpty()) if (targets().isEmpty())
addDefaultBuild(); addDefaultBuild();
if (targets().isEmpty()) {
qWarning() << "Unable to create targets!";
return false;
Q_ASSERT(activeTarget()); Q_ASSERT(activeTarget());
Q_ASSERT(activeTarget()->activeBuildConfiguration()); Q_ASSERT(activeTarget()->activeBuildConfiguration());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment