Commit 32a0acb1 authored by Kai Koehne's avatar Kai Koehne

QmlProject: Update code model when target changes

Change-Id: Ia8008748fb4d35507729c6ae684913e8bf72c985
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent 3497f037
......@@ -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;
}
......
......@@ -98,6 +98,7 @@ public:
private slots:
void refreshFiles(const QSet<QString> &added, const QSet<QString> &removed);
void addedTarget(ProjectExplorer::Target *target);
void onActiveTargetChanged(ProjectExplorer::Target *target);
void addedRunConfiguration(ProjectExplorer::RunConfiguration *);
protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment