forked from qt-creator/qt-creator
Qbs: Read QBS_BUILD_DIR also at runtime.
This is necessary for people using the binary release. Change-Id: I3e8821175c00812bdb8c65f0aedb8208894d08b2 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -332,8 +332,9 @@ void QbsProject::parse(const QVariantMap &config, const QString &dir)
|
||||
params.projectFilePath = m_fileName;
|
||||
params.ignoreDifferentProjectFilePath = false;
|
||||
qbs::Preferences *prefs = QbsManager::preferences();
|
||||
params.searchPaths = prefs->searchPaths(QLatin1String(QBS_BUILD_DIR));
|
||||
params.pluginPaths = prefs->pluginPaths(QLatin1String(QBS_BUILD_DIR));
|
||||
const QString buildDir = qbsBuildDir();
|
||||
params.searchPaths = prefs->searchPaths(buildDir);
|
||||
params.pluginPaths = prefs->pluginPaths(buildDir);
|
||||
|
||||
m_qbsSetupProjectJob
|
||||
= qbs::Project::setupProject(params, m_manager->settings(), m_manager->logSink(), 0);
|
||||
@@ -563,5 +564,14 @@ void QbsProject::updateQmlJsCodeModel(const qbs::ProjectData *prj)
|
||||
modelManager->updateProjectInfo(projectInfo);
|
||||
}
|
||||
|
||||
QString QbsProject::qbsBuildDir() const
|
||||
{
|
||||
QString buildDir = Utils::Environment::systemEnvironment()
|
||||
.value(QLatin1String("QBS_BUILD_DIR"));
|
||||
if (buildDir.isEmpty())
|
||||
buildDir = QLatin1String(QBS_BUILD_DIR);
|
||||
return buildDir;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
|
||||
Reference in New Issue
Block a user