Commit 4e932d6b authored by Christian Kandeler's avatar Christian Kandeler Committed by Tobias Hunger
Browse files

QbsPM: Do on-demand profile setup when profile name is requested.



This is necessary because the profile setup also entails putting the
profile name into the configuration we pass to the parsing step. If a
Kit has never been used to set up a qbs project, "qbs.profile" will not
exist in that configuration and the project cannot be parsed.

Task-number: QTCREATORBUG-13400
Change-Id: I32d767c36bd0ff33521137604a7826d9242a8712
Reviewed-by: default avatarRobert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent c4fb13a6
......@@ -116,10 +116,11 @@ ProjectExplorer::Project *QbsManager::openProject(const QString &fileName, QStri
return new Internal::QbsProject(this, fileName);
}
QString QbsManager::profileForKit(const ProjectExplorer::Kit *k) const
QString QbsManager::profileForKit(ProjectExplorer::Kit *k)
{
if (!k)
return QString();
updateProfileIfNecessary(k);
return m_settings->value(qtcProfilePrefix() + k->id().toString()).toString();
}
......
......@@ -72,7 +72,7 @@ public:
ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString);
// QBS profiles management:
QString profileForKit(const ProjectExplorer::Kit *k) const;
QString profileForKit(ProjectExplorer::Kit *k);
void setProfileForKit(const QString &name, const ProjectExplorer::Kit *k);
void updateProfileIfNecessary(ProjectExplorer::Kit *kit);
......
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