QmlProject: Update code model when target changes

Change-Id: Ia8008748fb4d35507729c6ae684913e8bf72c985
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Kai Koehne
2013-05-02 15:29:33 +02:00
parent 3497f037cc
commit 32a0acb1cf
2 changed files with 10 additions and 0 deletions

View File

@@ -148,6 +148,12 @@ void QmlProject::addedTarget(ProjectExplorer::Target *target)
addedRunConfiguration(rc);
}
void QmlProject::onActiveTargetChanged(ProjectExplorer::Target * /*target*/)
{
// make sure e.g. the default qml imports are adapted
refresh(Configuration);
}
void QmlProject::addedRunConfiguration(ProjectExplorer::RunConfiguration *rc)
{
// The enabled state of qml runconfigurations can only be decided after
@@ -408,6 +414,9 @@ bool QmlProject::fromMap(const QVariantMap &map)
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(addedTarget(ProjectExplorer::Target*)));
connect(this, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(onActiveTargetChanged(ProjectExplorer::Target*)));
return true;
}