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:
@@ -38,7 +38,6 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <projectexplorer/buildtargetinfo.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/localenvironmentaspect.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
@@ -726,9 +725,8 @@ Project::RestoreResult PythonProject::fromMap(const QVariantMap &map, QString *e
|
||||
if (res == RestoreResult::Ok) {
|
||||
refresh();
|
||||
|
||||
Kit *defaultKit = KitManager::defaultKit();
|
||||
if (!activeTarget() && defaultKit)
|
||||
addTarget(createTarget(defaultKit));
|
||||
if (!activeTarget())
|
||||
addTargetForDefaultKit();
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user