Fix CMake projects

* Fix initial setup of .user-files in CMake projects

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2010-02-22 11:34:47 +01:00
parent 4cd5cb0eab
commit 5e5192ad57

View File

@@ -471,14 +471,11 @@ bool CMakeProject::fromMap(const QVariantMap &map)
if (!Project::fromMap(map)) if (!Project::fromMap(map))
return false; return false;
bool hasUserFile = activeTarget() && bool hasUserFile = activeTarget();
activeTarget()->activeBuildConfiguration();
if (!hasUserFile) { if (!hasUserFile) {
CMakeTarget *t(0); CMakeTarget *t = targetFactory()->create(this, QLatin1String(DEFAULT_CMAKE_TARGET_ID));
if (!activeTarget()) Q_ASSERT(t);
t = new CMakeTarget(this); Q_ASSERT(t->activeBuildConfiguration());
else
t = activeTarget();
// Ask the user for where he wants to build it // Ask the user for where he wants to build it
// and the cmake command line // and the cmake command line