summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-10-30 17:37:50 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-10-31 11:50:32 +0100
commit4cdb21ade421b4635d49a0f0d7b72118532b6ef6 (patch)
tree64c5c2afb3edf8a699a4c03f46ec887745a6fae0
parentbc96c68b71e29aa824f9f967cda68e8b29f0214d (diff)
downloadqbs-4cdb21ade421b4635d49a0f0d7b72118532b6ef6.tar.gz
Rename "qbsPath" preference setting to "qbsSearchPaths".
The old name is grammatically incorrect and also not descriptive enough. The new one is also consistent with the project and product properties that amend the respective setting. Change-Id: I7be6b3d986fdb1f232623bf9b471ab21e04ed9f2 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--doc/reference/items/project.qdoc2
-rw-r--r--src/lib/tools/preferences.cpp12
2 files changed, 12 insertions, 2 deletions
diff --git a/doc/reference/items/project.qdoc b/doc/reference/items/project.qdoc
index 5d8ca35cc..76482e585 100644
--- a/doc/reference/items/project.qdoc
+++ b/doc/reference/items/project.qdoc
@@ -77,7 +77,7 @@
\li stringList
\li empty
\li These paths are searched for imports and modules in addition to the ones listed
- in \c{preferences.qbsPath}.
+ in \c{preferences.qbsSearchPaths}.
All products in the project inherit this value by default.
\row
\li references
diff --git a/src/lib/tools/preferences.cpp b/src/lib/tools/preferences.cpp
index 69366eb4d..f8ed01740 100644
--- a/src/lib/tools/preferences.cpp
+++ b/src/lib/tools/preferences.cpp
@@ -77,7 +77,17 @@ QString Preferences::shell() const
*/
QStringList Preferences::searchPaths(const QString &qbsRootPath) const
{
- return pathList(QLatin1String("qbsPath"), qbsRootPath + QLatin1String("/share/qbs"));
+ const QStringList searchPaths = pathList(QLatin1String("qbsSearchPaths"),
+ qbsRootPath + QLatin1String("/share/qbs"));
+
+ // TODO: Remove in 1.2.
+ const QStringList deprecatedSearchPaths = getPreference(QLatin1String("qbsPath")).toString()
+ .split(Internal::HostOsInfo::pathListSeparator(), QString::SkipEmptyParts);
+ if (!deprecatedSearchPaths.isEmpty()) {
+ qDebug("Warning: preferences.qbsPath is deprecated, "
+ "use preferences.qbsSearchPaths instead.");
+ }
+ return deprecatedSearchPaths + searchPaths;
}
/*!