forked from qt-creator/qt-creator
QbsProjectManager: More fine-grained profile setup.
Setting up a qbs profile, particularly for Qt, can take a measurable
amount of time, so we should not do bulk changes via the kitsChanged()
signal. Instead:
- For the initial kit loading, delay the profile setup until
the kit is needed for the first time, i.e. the user attaches it
to a project.
- Handle adding, removing and updating a kit separately; in
particular, do not do anything to other kits.
Change-Id: If09d3c40b21e9a1356dc96089b92a60186a9bcdb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "qbsbuildconfiguration.h"
|
||||
#include "qbslogsink.h"
|
||||
#include "qbsprojectfile.h"
|
||||
#include "qbsprojectmanager.h"
|
||||
#include "qbsprojectparser.h"
|
||||
#include "qbsprojectmanagerconstants.h"
|
||||
#include "qbsnodes.h"
|
||||
@@ -47,6 +48,7 @@
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/buildenvironmentwidget.h>
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/buildtargetinfo.h>
|
||||
@@ -625,6 +627,9 @@ void QbsProject::parse(const QVariantMap &config, const Environment &env, const
|
||||
|
||||
registerQbsProjectParser(new QbsProjectParser(this, m_qbsUpdateFutureInterface));
|
||||
|
||||
QbsManager * const qbsManager = ExtensionSystem::PluginManager::getObject<QbsManager>();
|
||||
QTC_ASSERT(qbsManager, return);
|
||||
qbsManager->updateProfileIfNecessary(activeTarget()->kit());
|
||||
m_qbsProjectParser->parse(config, env, dir);
|
||||
emit projectParsingStarted();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user