diff options
| author | Jake Petroules <jake.petroules@petroules.com> | 2013-11-20 17:09:41 -0500 |
|---|---|---|
| committer | Jake Petroules <jake.petroules@petroules.com> | 2013-11-26 16:13:35 +0100 |
| commit | dbb39fc1fce3686a5161d68e89e96086fc664556 (patch) | |
| tree | 7651a5a1e885805eaec99105abcaf61bd865667f /src/lib | |
| parent | d7656eef2decad018759cae7f18c4e66c3a688bf (diff) | |
| download | qbs-dbb39fc1fce3686a5161d68e89e96086fc664556.tar.gz | |
Support specifying the Qbs build directory as a command line option.
Also supports changing the default build directory ('.') using the
'preferences.defaultBuildDirectory' property.
Task-number: QBS-462
Change-Id: Id3d05d2f5b14197bd3af2e7f9d55bdd263809716
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/tools/preferences.cpp | 8 | ||||
| -rw-r--r-- | src/lib/tools/preferences.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/tools/preferences.cpp b/src/lib/tools/preferences.cpp index f8ed01740..18552807f 100644 --- a/src/lib/tools/preferences.cpp +++ b/src/lib/tools/preferences.cpp @@ -72,6 +72,14 @@ QString Preferences::shell() const } /*! + * \brief Returns the default build directory used by Qbs if none is specified. + */ +QString Preferences::defaultBuildDirectory() const +{ + return getPreference(QLatin1String("defaultBuildDirectory")).toString(); +} + +/*! * \brief Returns the list of paths where qbs looks for module definitions and such. * If there is no such setting, \c qbsRootPath will be used to look up a fallback location. */ diff --git a/src/lib/tools/preferences.h b/src/lib/tools/preferences.h index d79ee8aa5..1d6f9dbad 100644 --- a/src/lib/tools/preferences.h +++ b/src/lib/tools/preferences.h @@ -45,6 +45,7 @@ public: bool useColoredOutput() const; int jobs() const; QString shell() const; + QString defaultBuildDirectory() const; QStringList searchPaths(const QString &qbsRootPath = QString()) const; QStringList pluginPaths(const QString &qbsRootPath = QString()) const; |
