summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2013-11-20 17:09:41 -0500
committerJake Petroules <jake.petroules@petroules.com>2013-11-26 16:13:35 +0100
commitdbb39fc1fce3686a5161d68e89e96086fc664556 (patch)
tree7651a5a1e885805eaec99105abcaf61bd865667f /src/lib
parentd7656eef2decad018759cae7f18c4e66c3a688bf (diff)
downloadqbs-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.cpp8
-rw-r--r--src/lib/tools/preferences.h1
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;