diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-25 16:27:35 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-25 17:38:30 +0100 |
commit | 0816b8e476d20e00cbcffd1e71162adf93e85658 (patch) | |
tree | 537711cbc6285e6108fb745fb98665114e27b806 /src/lib/corelib/tools | |
parent | e455dcff532c6cc1482c844d3f1ffb7130f082ee (diff) |
Do not put the plugins where the resources are.
That's not where they belong.
Also make less assumptions about the file path leading to them.
Ideally, we should also do the latter for the stuff in share/,
but then someone would have to touch the horrific qmake code in static.pro.
Task-number: QTCREATORBUG-10074
Change-Id: Ide9c4b83dcf0cd7a62b57643b79caf05662358cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/corelib/tools')
-rw-r--r-- | src/lib/corelib/tools/preferences.cpp | 12 | ||||
-rw-r--r-- | src/lib/corelib/tools/preferences.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/corelib/tools/preferences.cpp b/src/lib/corelib/tools/preferences.cpp index bdff7c67b..174944dbf 100644 --- a/src/lib/corelib/tools/preferences.cpp +++ b/src/lib/corelib/tools/preferences.cpp @@ -84,12 +84,12 @@ QString Preferences::defaultBuildDirectory() const /*! * \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. + * If there is no such setting, they will be looked up at \c{baseDir}/share/qbs. */ -QStringList Preferences::searchPaths(const QString &qbsRootPath) const +QStringList Preferences::searchPaths(const QString &baseDir) const { const QStringList searchPaths = pathList(QLatin1String("qbsSearchPaths"), - qbsRootPath + QLatin1String("/share/qbs")); + baseDir + QLatin1String("/share/qbs")); // TODO: Remove in 1.2. const QStringList deprecatedSearchPaths = getPreference(QLatin1String("qbsPath")).toString() @@ -103,11 +103,11 @@ QStringList Preferences::searchPaths(const QString &qbsRootPath) const /*! * \brief Returns the list of paths where qbs looks for plugins. - * If there is no such setting, \c qbsRootPath will be used to look up a fallback location. + * If there is no such setting, they will be looked up at \c{baseDir}/qbs/plugins. */ -QStringList Preferences::pluginPaths(const QString &qbsRootPath) const +QStringList Preferences::pluginPaths(const QString &baseDir) const { - return pathList(QLatin1String("pluginsPath"), qbsRootPath + QLatin1String("/lib/qbs/plugins")); + return pathList(QLatin1String("pluginsPath"), baseDir + QLatin1String("/qbs/plugins")); } QVariant Preferences::getPreference(const QString &key, const QVariant &defaultValue) const diff --git a/src/lib/corelib/tools/preferences.h b/src/lib/corelib/tools/preferences.h index e5e6c9bb6..e6600947c 100644 --- a/src/lib/corelib/tools/preferences.h +++ b/src/lib/corelib/tools/preferences.h @@ -46,8 +46,8 @@ public: int jobs() const; QString shell() const; QString defaultBuildDirectory() const; - QStringList searchPaths(const QString &qbsRootPath = QString()) const; - QStringList pluginPaths(const QString &qbsRootPath = QString()) const; + QStringList searchPaths(const QString &baseDir = QString()) const; + QStringList pluginPaths(const QString &baseDir = QString()) const; private: QVariant getPreference(const QString &key, const QVariant &defaultValue = QVariant()) const; |