summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-01-10 17:29:27 +0100
committerEike Ziller <eike.ziller@qt.io>2018-01-11 10:42:09 +0000
commitf42ea09b74878edc215b317cba08c1f7c7b48a47 (patch)
tree850ec1c3a7430b1c62caa51df69c008e2fe075fa /src/plugins/coreplugin
parentf3d7208aa9b65af06da79bbdf95bb7e6d099a776 (diff)
downloadqt-creator-f42ea09b74878edc215b317cba08c1f7c7b48a47.tar.gz
Do not construct settings/resource paths from QSettings object
These paths are controlled by ICore. Add ICore::installerResourcePath() to replace constructions with settings(SystemScope) Replace constructions with settings()->fileName() by usage of ICore::userResourcePath(). Change-Id: I5a9fa9d09f2563c39dc5d11a4586da825c62f9ac Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/coreplugin')
-rw-r--r--src/plugins/coreplugin/icore.cpp6
-rw-r--r--src/plugins/coreplugin/icore.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp
index e62843b8a4..1f9d400985 100644
--- a/src/plugins/coreplugin/icore.cpp
+++ b/src/plugins/coreplugin/icore.cpp
@@ -421,6 +421,12 @@ QString ICore::userResourcePath()
return urp;
}
+QString ICore::installerResourcePath()
+{
+ return QFileInfo(settings(QSettings::SystemScope)->fileName()).path() + '/'
+ + Constants::IDE_ID;
+}
+
QString ICore::documentationPath()
{
return QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DOC_PATH);
diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h
index b466a7f0db..925b84d010 100644
--- a/src/plugins/coreplugin/icore.h
+++ b/src/plugins/coreplugin/icore.h
@@ -94,6 +94,7 @@ public:
static QString resourcePath();
static QString userResourcePath();
+ static QString installerResourcePath();
static QString documentationPath();
static QString libexecPath();