forked from qt-creator/qt-creator
ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kit
Less noise on the user side. Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
#include <projectexplorer/deploymentdata.h>
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
#include <projectexplorer/target.h>
|
||||
@@ -562,9 +561,8 @@ Project::RestoreResult GenericProject::fromMap(const QVariantMap &map, QString *
|
||||
if (result != RestoreResult::Ok)
|
||||
return result;
|
||||
|
||||
Kit *defaultKit = KitManager::defaultKit();
|
||||
if (!activeTarget() && defaultKit)
|
||||
addTarget(createTarget(defaultKit));
|
||||
if (!activeTarget())
|
||||
addTargetForDefaultKit();
|
||||
|
||||
// Sanity check: We need both a buildconfiguration and a runconfiguration!
|
||||
const QList<Target *> targetList = targets();
|
||||
|
||||
Reference in New Issue
Block a user