QbsProjectManager: Allow to use default qbs settings dir.

By default, we use a dedicated qbs settings dir located in Creator's
settings path, so that different instances of Qt Creator won't
overwrite each other's profiles. Users for whom this is not a concern
can now choose to use the normal qbs settings dir.

Change-Id: I0119228a48cfee430686ab51f69864866f4ba270
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Christian Kandeler
2016-02-22 17:49:02 +01:00
parent c165f2f0cc
commit 6274875ab9
11 changed files with 208 additions and 16 deletions

View File

@@ -31,6 +31,7 @@
#include "qbsinstallstep.h"
#include "qbsproject.h"
#include "qbsprojectmanagerconstants.h"
#include "qbsprojectmanagersettings.h"
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
@@ -285,8 +286,10 @@ QString QbsBuildConfiguration::equivalentCommandLine(const BuildStep *buildStep)
}
Utils::QtcProcess::addArgs(&commandLine, QStringList() << QLatin1String("-f")
<< buildStep->project()->projectFilePath().toUserOutput());
Utils::QtcProcess::addArgs(&commandLine, QStringList() << QLatin1String("--settings-dir")
<< QDir::toNativeSeparators(Core::ICore::userResourcePath()));
if (QbsProjectManagerSettings::useCreatorSettingsDirForQbs()) {
Utils::QtcProcess::addArgs(&commandLine, QStringList() << QLatin1String("--settings-dir")
<< QDir::toNativeSeparators(QbsProjectManagerSettings::qbsSettingsBaseDir()));
}
if (stepProxy.dryRun())
Utils::QtcProcess::addArg(&commandLine, QLatin1String("--dry-run"));
if (stepProxy.keepGoing())