aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/android/androidconfigurations.cpp6
-rw-r--r--src/plugins/baremetal/debugserverprovidermanager.cpp2
-rw-r--r--src/plugins/beautifier/abstractsettings.cpp3
-rw-r--r--src/plugins/beautifier/artisticstyle/artisticstylesettings.cpp2
-rw-r--r--src/plugins/clangcodemodel/clangbackendcommunicator.cpp2
-rw-r--r--src/plugins/clangformat/clangformatconfigwidget.cpp2
-rw-r--r--src/plugins/clangpchmanager/pchmanagerconnectionclient.cpp2
-rw-r--r--src/plugins/clangrefactoring/refactoringconnectionclient.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakekitinformation.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp4
-rw-r--r--src/plugins/coreplugin/dialogs/externaltoolconfig.cpp2
-rw-r--r--src/plugins/coreplugin/dialogs/shortcutsettings.cpp8
-rw-r--r--src/plugins/coreplugin/externaltoolmanager.cpp4
-rw-r--r--src/plugins/coreplugin/generalsettings.cpp2
-rw-r--r--src/plugins/coreplugin/icore.cpp38
-rw-r--r--src/plugins/coreplugin/icore.h10
-rw-r--r--src/plugins/coreplugin/mimetypesettings.cpp5
-rw-r--r--src/plugins/coreplugin/themechooser.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp2
-rw-r--r--src/plugins/debugger/debuggeritemmanager.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp2
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp3
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp2
-rw-r--r--src/plugins/designer/formeditorplugin.cpp2
-rw-r--r--src/plugins/glsleditor/glsleditorplugin.cpp2
-rw-r--r--src/plugins/help/helpmanager.cpp2
-rw-r--r--src/plugins/help/helpplugin.cpp2
-rw-r--r--src/plugins/ios/iostoolhandler.cpp2
-rw-r--r--src/plugins/macros/macromanager.cpp2
-rw-r--r--src/plugins/mcusupport/mcusupportoptions.cpp2
-rw-r--r--src/plugins/mesonprojectmanager/machinefiles/machinefilemanager.cpp2
-rw-r--r--src/plugins/mesonprojectmanager/settings/tools/toolssettingsaccessor.cpp2
-rw-r--r--src/plugins/modeleditor/modelsmanager.cpp2
-rw-r--r--src/plugins/perfprofiler/perfdatareader.cpp6
-rw-r--r--src/plugins/projectexplorer/customwizard/customwizard.cpp6
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicemanager.cpp16
-rw-r--r--src/plugins/projectexplorer/extraabi.cpp2
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp4
-rw-r--r--src/plugins/projectexplorer/kitmanager.cpp4
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp2
-rw-r--r--src/plugins/projectexplorer/session.cpp2
-rw-r--r--src/plugins/projectexplorer/toolchainsettingsaccessor.cpp4
-rw-r--r--src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp2
-rw-r--r--src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp4
-rw-r--r--src/plugins/qmldesigner/components/componentcore/theme.cpp3
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp2
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp9
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/gradientpresetcustomlistmodel.cpp4
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp7
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp12
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp4
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp6
-rw-r--r--src/plugins/qmldesigner/designermcumanager.cpp2
-rw-r--r--src/plugins/qmldesigner/designmodewidget.cpp2
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.cpp4
-rw-r--r--src/plugins/qmljseditor/qmljseditorplugin.cpp4
-rw-r--r--src/plugins/qmljseditor/qmloutlinemodel.cpp3
-rw-r--r--src/plugins/qmljstools/qmljsbundleprovider.cpp2
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.cpp2
-rw-r--r--src/plugins/qmljstools/qmljstools_test.cpp3
-rw-r--r--src/plugins/qnx/qnxconfigurationmanager.cpp2
-rw-r--r--src/plugins/qtsupport/qtversionmanager.cpp4
-rw-r--r--src/plugins/studiowelcome/examplecheckout.cpp4
-rw-r--r--src/plugins/studiowelcome/studiowelcomeplugin.cpp9
-rw-r--r--src/plugins/texteditor/codestylepool.cpp2
-rw-r--r--src/plugins/texteditor/fontsettings.cpp2
-rw-r--r--src/plugins/texteditor/fontsettingspage.cpp4
-rw-r--r--src/plugins/texteditor/highlighter.cpp2
-rw-r--r--src/plugins/texteditor/highlightersettings.cpp5
-rw-r--r--src/plugins/texteditor/snippets/snippetscollection.cpp2
70 files changed, 142 insertions, 150 deletions
diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp
index 3125a4c1162..260e63dee62 100644
--- a/src/plugins/android/androidconfigurations.cpp
+++ b/src/plugins/android/androidconfigurations.cpp
@@ -142,7 +142,7 @@ namespace {
static QString sdkSettingsFileName()
{
- return Core::ICore::installerResourcePath().pathAppended("android.xml").toString();
+ return Core::ICore::installerResourcePath("android.xml").toString();
}
static bool is32BitUserSpace()
@@ -270,8 +270,8 @@ void AndroidConfig::save(QSettings &settings) const
void AndroidConfig::parseDependenciesJson()
{
- FilePath sdkConfigUserFile(Core::ICore::userResourcePath() / JsonFilePath);
- FilePath sdkConfigFile(Core::ICore::resourcePath() / JsonFilePath);
+ const FilePath sdkConfigUserFile = Core::ICore::userResourcePath(JsonFilePath);
+ const FilePath sdkConfigFile = Core::ICore::resourcePath(JsonFilePath);
if (!sdkConfigUserFile.exists()) {
QDir(sdkConfigUserFile.toFileInfo().absolutePath()).mkpath(".");
diff --git a/src/plugins/baremetal/debugserverprovidermanager.cpp b/src/plugins/baremetal/debugserverprovidermanager.cpp
index 0808ddffd97..55f4551eef6 100644
--- a/src/plugins/baremetal/debugserverprovidermanager.cpp
+++ b/src/plugins/baremetal/debugserverprovidermanager.cpp
@@ -61,7 +61,7 @@ static DebugServerProviderManager *m_instance = nullptr;
// DebugServerProviderManager
DebugServerProviderManager::DebugServerProviderManager()
- : m_configFile(Core::ICore::userResourcePath() / fileNameKeyC)
+ : m_configFile(Core::ICore::userResourcePath(fileNameKeyC))
, m_factories({new GenericGdbServerProviderFactory,
new JLinkGdbServerProviderFactory,
new OpenOcdGdbServerProviderFactory,
diff --git a/src/plugins/beautifier/abstractsettings.cpp b/src/plugins/beautifier/abstractsettings.cpp
index 11157cbe6a0..5a948edd2b3 100644
--- a/src/plugins/beautifier/abstractsettings.cpp
+++ b/src/plugins/beautifier/abstractsettings.cpp
@@ -49,8 +49,7 @@ const char SUPPORTED_MIME[] = "supportedMime";
AbstractSettings::AbstractSettings(const QString &name, const QString &ending)
: m_ending(ending)
- , m_styleDir(Core::ICore::userResourcePath()
- .pathAppended(Beautifier::Constants::SETTINGS_DIRNAME)
+ , m_styleDir(Core::ICore::userResourcePath(Beautifier::Constants::SETTINGS_DIRNAME)
.pathAppended(name)
.toString())
, m_name(name)
diff --git a/src/plugins/beautifier/artisticstyle/artisticstylesettings.cpp b/src/plugins/beautifier/artisticstyle/artisticstylesettings.cpp
index f6e6def8bc7..bc4079d1e5e 100644
--- a/src/plugins/beautifier/artisticstyle/artisticstylesettings.cpp
+++ b/src/plugins/beautifier/artisticstyle/artisticstylesettings.cpp
@@ -171,7 +171,7 @@ void ArtisticStyleSettings::setCustomStyle(const QString &customStyle)
QString ArtisticStyleSettings::documentationFilePath() const
{
- return (Core::ICore::userResourcePath() / Beautifier::Constants::SETTINGS_DIRNAME
+ return (Core::ICore::userResourcePath(Beautifier::Constants::SETTINGS_DIRNAME)
/ Beautifier::Constants::DOCUMENTATION_DIRNAME / SETTINGS_NAME
+ ".xml")
.toString();
diff --git a/src/plugins/clangcodemodel/clangbackendcommunicator.cpp b/src/plugins/clangcodemodel/clangbackendcommunicator.cpp
index d0d2355136a..510d1d8d41f 100644
--- a/src/plugins/clangcodemodel/clangbackendcommunicator.cpp
+++ b/src/plugins/clangcodemodel/clangbackendcommunicator.cpp
@@ -64,7 +64,7 @@ enum { backEndStartTimeOutInMs = 10000 };
static QString backendProcessPath()
{
- return (Core::ICore::libexecPath() / "clangbackend" + QTC_HOST_EXE_SUFFIX).toString();
+ return Core::ICore::libexecPath("clangbackend" QTC_HOST_EXE_SUFFIX).toString();
}
namespace ClangCodeModel {
diff --git a/src/plugins/clangformat/clangformatconfigwidget.cpp b/src/plugins/clangformat/clangformatconfigwidget.cpp
index 956dac10e4d..d50e9b6e325 100644
--- a/src/plugins/clangformat/clangformatconfigwidget.cpp
+++ b/src/plugins/clangformat/clangformatconfigwidget.cpp
@@ -173,7 +173,7 @@ void ClangFormatConfigWidget::initChecksAndPreview()
connect(m_ui->applyButton, &QPushButton::clicked, this, &ClangFormatConfigWidget::apply);
fileName = m_project->projectFilePath().pathAppended("snippet.cpp");
} else {
- fileName = Core::ICore::userResourcePath() / "snippet.cpp";
+ fileName = Core::ICore::userResourcePath("snippet.cpp");
}
m_preview->textDocument()->indenter()->setFileName(fileName);
}
diff --git a/src/plugins/clangpchmanager/pchmanagerconnectionclient.cpp b/src/plugins/clangpchmanager/pchmanagerconnectionclient.cpp
index 536d80bfb3e..b5d4bd14e5c 100644
--- a/src/plugins/clangpchmanager/pchmanagerconnectionclient.cpp
+++ b/src/plugins/clangpchmanager/pchmanagerconnectionclient.cpp
@@ -55,7 +55,7 @@ ClangPchManager::PchManagerConnectionClient::PchManagerConnectionClient(
pchsDirectory.mkdir("pchs");
pchsDirectory.cd("pchs");
m_processCreator.setArguments({connectionName(),
- Core::ICore::cacheResourcePath() + "/symbol-experimental-v1.db",
+ Core::ICore::cacheResourcePath("symbol-experimental-v1.db"),
pchsDirectory.absolutePath(),
Core::ICore::resourcePath()});
diff --git a/src/plugins/clangrefactoring/refactoringconnectionclient.cpp b/src/plugins/clangrefactoring/refactoringconnectionclient.cpp
index e94e8a311ff..d26d20df3f6 100644
--- a/src/plugins/clangrefactoring/refactoringconnectionclient.cpp
+++ b/src/plugins/clangrefactoring/refactoringconnectionclient.cpp
@@ -49,8 +49,8 @@ RefactoringConnectionClient::RefactoringConnectionClient(RefactoringClientInterf
{
m_processCreator.setTemporaryDirectoryPattern("clangrefactoringbackend-XXXXXX");
m_processCreator.setArguments({connectionName(),
- Core::ICore::cacheResourcePath() + "/symbol-experimental-v1.db",
- Core::ICore::resourcePath()});
+ Core::ICore::cacheResourcePath("symbol-experimental-v1.db").toString(),
+ Core::ICore::resourcePath().toString()});
stdErrPrefixer().setPrefix("RefactoringConnectionClient.stderr: ");
stdOutPrefixer().setPrefix("RefactoringConnectionClient.stdout: ");
diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
index d196511a04e..3f18c084486 100644
--- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
@@ -836,7 +836,7 @@ void CMakeGeneratorKitAspect::addToEnvironment(const Kit *k, Utils::Environment
if (env.searchInPath("jom.exe").exists())
return;
env.appendOrSetPath(Core::ICore::libexecPath().toUserOutput());
- env.appendOrSetPath(Core::ICore::libexecPath().pathAppended("jom").toUserOutput());
+ env.appendOrSetPath(Core::ICore::libexecPath("jom").toUserOutput());
}
}
diff --git a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp
index 5782527fa4e..66ad4b964b5 100644
--- a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp
+++ b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp
@@ -164,7 +164,7 @@ CMakeToolSettingsAccessor::CMakeToolSettingsAccessor() :
QCoreApplication::translate("CMakeProjectManager::CMakeToolManager", "CMake"),
Core::Constants::IDE_DISPLAY_NAME)
{
- setBaseFilePath(Core::ICore::userResourcePath() / CMAKE_TOOL_FILENAME);
+ setBaseFilePath(Core::ICore::userResourcePath(CMAKE_TOOL_FILENAME));
addVersionUpgrader(std::make_unique<CMakeToolSettingsUpgraderV0>());
}
@@ -173,7 +173,7 @@ CMakeToolSettingsAccessor::CMakeTools CMakeToolSettingsAccessor::restoreCMakeToo
{
CMakeTools result;
- const FilePath sdkSettingsFile = Core::ICore::installerResourcePath() / CMAKE_TOOL_FILENAME;
+ const FilePath sdkSettingsFile = Core::ICore::installerResourcePath(CMAKE_TOOL_FILENAME);
CMakeTools sdkTools = cmakeTools(restoreSettings(sdkSettingsFile, parent), true);
diff --git a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp
index 01a59309125..2288edfc14d 100644
--- a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp
+++ b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp
@@ -637,7 +637,7 @@ static QString getUserFilePath(const QString &proposalFileName)
resourceDir.mkpath(QLatin1String("externaltools"));
const QFileInfo fi(proposalFileName);
const QString &suffix = QLatin1Char('.') + fi.completeSuffix();
- const FilePath newFilePath = ICore::userResourcePath() / "externaltools" / fi.baseName();
+ const FilePath newFilePath = ICore::userResourcePath("externaltools") / fi.baseName();
int count = 0;
FilePath tryPath = newFilePath + suffix;
while (tryPath.exists()) {
diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
index 3016e8b4b7a..5dec4bb4f9f 100644
--- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
@@ -52,6 +52,9 @@ using namespace Utils;
Q_DECLARE_METATYPE(Core::Internal::ShortcutItem*)
+namespace Core {
+namespace Internal {
+
const char kSeparator[] = " | ";
static int translateModifiers(Qt::KeyboardModifiers state,
@@ -147,12 +150,9 @@ static bool isTextKeySequence(const QKeySequence &sequence)
static FilePath schemesPath()
{
- return Core::ICore::resourcePath() / "schemes";
+ return Core::ICore::resourcePath("schemes");
}
-namespace Core {
-namespace Internal {
-
ShortcutButton::ShortcutButton(QWidget *parent)
: QPushButton(parent)
, m_key({{0, 0, 0, 0}})
diff --git a/src/plugins/coreplugin/externaltoolmanager.cpp b/src/plugins/coreplugin/externaltoolmanager.cpp
index 8088446c485..72b4a3fa5c6 100644
--- a/src/plugins/coreplugin/externaltoolmanager.cpp
+++ b/src/plugins/coreplugin/externaltoolmanager.cpp
@@ -90,10 +90,10 @@ ExternalToolManager::ExternalToolManager()
QMap<QString, QMultiMap<int, ExternalTool*> > categoryPriorityMap;
QMap<QString, ExternalTool *> tools;
- parseDirectory(ICore::userResourcePath().pathAppended("externaltools").toString(),
+ parseDirectory(ICore::userResourcePath("externaltools").toString(),
&categoryPriorityMap,
&tools);
- parseDirectory(ICore::resourcePath().pathAppended("externaltools").toString(),
+ parseDirectory(ICore::resourcePath("externaltools").toString(),
&categoryPriorityMap,
&tools,
true);
diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp
index 28ef8279e36..81d83df3220 100644
--- a/src/plugins/coreplugin/generalsettings.cpp
+++ b/src/plugins/coreplugin/generalsettings.cpp
@@ -132,7 +132,7 @@ void GeneralSettingsWidget::fillLanguageBox() const
if (currentLocale == QLatin1String("C"))
m_ui.languageBox->setCurrentIndex(m_ui.languageBox->count() - 1);
- const FilePath creatorTrPath = ICore::resourcePath() / "translations";
+ const FilePath creatorTrPath = ICore::resourcePath("translations");
const QStringList languageFiles = creatorTrPath.toDir().entryList(
QStringList(QLatin1String("qtcreator*.qm")));
diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp
index 7e2396226dc..bd2715ca5df 100644
--- a/src/plugins/coreplugin/icore.cpp
+++ b/src/plugins/coreplugin/icore.cpp
@@ -386,6 +386,14 @@ QString ICore::userInterfaceLanguage()
return qApp->property("qtc_locale").toString();
}
+static QString pathHelper(const QString &rel)
+{
+ if (rel.isEmpty())
+ return rel;
+ if (rel.startsWith('/'))
+ return rel;
+ return '/' + rel;
+}
/*!
Returns the absolute path that is used for resources like
project templates and the debugger macros.
@@ -396,10 +404,11 @@ QString ICore::userInterfaceLanguage()
\sa userResourcePath()
*/
-FilePath ICore::resourcePath()
+FilePath ICore::resourcePath(const QString &rel)
{
return FilePath::fromString(
- QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DATA_PATH));
+ QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DATA_PATH +
+ pathHelper(rel)));
}
/*!
@@ -412,7 +421,7 @@ FilePath ICore::resourcePath()
\sa resourcePath()
*/
-FilePath ICore::userResourcePath()
+FilePath ICore::userResourcePath(const QString &rel)
{
// Create qtcreator dir if it doesn't yet exist
const QString configDir = QFileInfo(settings(QSettings::UserScope)->fileName()).path();
@@ -424,25 +433,26 @@ FilePath ICore::userResourcePath()
qWarning() << "could not create" << urp;
}
- return FilePath::fromString(urp);
+ return FilePath::fromString(urp + pathHelper(rel));
}
/*!
Returns a writable path that can be used for persistent cache files.
*/
-FilePath ICore::cacheResourcePath()
+FilePath ICore::cacheResourcePath(const QString &rel)
{
- return FilePath::fromString(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
+ return FilePath::fromString(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ + pathHelper(rel));
}
/*!
Returns the path to resources written by the installer, for example
pre-defined kits and toolchains.
*/
-FilePath ICore::installerResourcePath()
+FilePath ICore::installerResourcePath(const QString &rel)
{
return FilePath::fromString(settings(QSettings::SystemScope)->fileName()).parentDir()
- / Constants::IDE_ID;
+ / Constants::IDE_ID / rel;
}
/*!
@@ -478,18 +488,18 @@ QString ICore::userPluginPath()
Returns the path to the command line tools that are included in the \QC
installation.
*/
-FilePath ICore::libexecPath()
+FilePath ICore::libexecPath(const QString &rel)
{
return FilePath::fromString(
- QDir::cleanPath(QApplication::applicationDirPath() + RELATIVE_LIBEXEC_PATH));
+ QDir::cleanPath(QApplication::applicationDirPath() + RELATIVE_LIBEXEC_PATH + pathHelper(rel)));
}
FilePath ICore::crashReportsPath()
{
if (Utils::HostOsInfo::isMacHost())
- return libexecPath() / "crashpad_reports/completed";
+ return libexecPath("crashpad_reports/completed");
else
- return libexecPath() / "crashpad_reports/reports";
+ return libexecPath("crashpad_reports/reports");
}
QString ICore::ideDisplayName()
@@ -508,7 +518,7 @@ static QString clangIncludePath(const QString &clangVersion)
QString ICore::clangIncludeDirectory(const QString &clangVersion,
const QString &clangFallbackIncludeDir)
{
- FilePath dir = libexecPath() / "clang" + clangIncludePath(clangVersion);
+ FilePath dir = libexecPath("clang" + clangIncludePath(clangVersion));
if (!dir.exists() || !dir.pathAppended("stdint.h").exists())
dir = FilePath::fromString(clangFallbackIncludeDir);
return dir.canonicalPath().toUserOutput();
@@ -520,7 +530,7 @@ QString ICore::clangIncludeDirectory(const QString &clangVersion,
static QString clangBinary(const QString &binaryBaseName, const QString &clangBinDirectory)
{
const QString hostExeSuffix(QTC_HOST_EXE_SUFFIX);
- FilePath executable = ICore::libexecPath() / "clang/bin" / binaryBaseName + hostExeSuffix;
+ FilePath executable = ICore::libexecPath("clang/bin") / binaryBaseName + hostExeSuffix;
if (!executable.exists())
executable = FilePath::fromString(clangBinDirectory) / binaryBaseName + hostExeSuffix;
return executable.canonicalPath().toUserOutput();
diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h
index 64729d9f388..2e02fb43f83 100644
--- a/src/plugins/coreplugin/icore.h
+++ b/src/plugins/coreplugin/icore.h
@@ -95,11 +95,11 @@ public:
static QPrinter *printer();
static QString userInterfaceLanguage();
- static Utils::FilePath resourcePath();
- static Utils::FilePath userResourcePath();
- static Utils::FilePath cacheResourcePath();
- static Utils::FilePath installerResourcePath();
- static Utils::FilePath libexecPath();
+ static Utils::FilePath resourcePath(const QString &rel = {});
+ static Utils::FilePath userResourcePath(const QString &rel = {});
+ static Utils::FilePath cacheResourcePath(const QString &rel = {});
+ static Utils::FilePath installerResourcePath(const QString &rel = {});
+ static Utils::FilePath libexecPath(const QString &rel = {});
static Utils::FilePath crashReportsPath();
static QString ideDisplayName();
diff --git a/src/plugins/coreplugin/mimetypesettings.cpp b/src/plugins/coreplugin/mimetypesettings.cpp
index 24586d688c4..232de2334d6 100644
--- a/src/plugins/coreplugin/mimetypesettings.cpp
+++ b/src/plugins/coreplugin/mimetypesettings.cpp
@@ -53,7 +53,7 @@
#include <QStyledItemDelegate>
#include <QSortFilterProxyModel>
-static const char kModifiedMimeTypesFile[] = "/mimetypes/modifiedmimetypes.xml";
+static const char kModifiedMimeTypesFile[] = "mimetypes/modifiedmimetypes.xml";
static const char mimeInfoTagC[] = "mime-info";
static const char mimeTypeTagC[] = "mime-type";
@@ -564,8 +564,7 @@ static QPair<int, int> rangeFromString(const QString &offset)
MimeTypeSettingsPrivate::UserMimeTypeHash MimeTypeSettingsPrivate::readUserModifiedMimeTypes()
{
- static Utils::FilePath modifiedMimeTypesPath = ICore::userResourcePath()
- + kModifiedMimeTypesFile;
+ static Utils::FilePath modifiedMimeTypesPath = ICore::userResourcePath(kModifiedMimeTypesFile);
UserMimeTypeHash userMimeTypes;
QFile file(modifiedMimeTypesPath.toString());
if (file.open(QFile::ReadOnly)) {
diff --git a/src/plugins/coreplugin/themechooser.cpp b/src/plugins/coreplugin/themechooser.cpp
index 8fb3ece1e37..f3d828d4b4b 100644
--- a/src/plugins/coreplugin/themechooser.cpp
+++ b/src/plugins/coreplugin/themechooser.cpp
@@ -211,8 +211,8 @@ QList<ThemeEntry> ThemeEntry::availableThemes()
{
QList<ThemeEntry> themes;
- static const FilePath installThemeDir = ICore::resourcePath() + QLatin1String("/themes");
- static const FilePath userThemeDir = ICore::userResourcePath() + QLatin1String("/themes");
+ static const FilePath installThemeDir = ICore::resourcePath("themes");
+ static const FilePath userThemeDir = ICore::userResourcePath("themes");
addThemesFromPath(installThemeDir.toString(), &themes);
if (themes.isEmpty())
qWarning() << "Warning: No themes found in installation: "
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 42d6f479a1f..a563d7c95cf 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -2755,7 +2755,7 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
return;
}
- QString dumperPath = Core::ICore::resourcePath().pathAppended("debugger").toUserOutput();
+ QString dumperPath = Core::ICore::resourcePath("debugger").toUserOutput();
dumperPath.replace('\\', "\\\\");
runCommand({"sys.path.insert(1, '" + dumperPath + "')", ScriptCommand});
runCommand({"from cdbbridge import Dumper", ScriptCommand});
diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp
index d9aa9ce07d9..350393affe5 100644
--- a/src/plugins/debugger/debuggeritemmanager.cpp
+++ b/src/plugins/debugger/debuggeritemmanager.cpp
@@ -835,7 +835,7 @@ void DebuggerItemManagerPrivate::autoDetectUvscDebuggers()
static FilePath userSettingsFileName()
{
- return ICore::userResourcePath() / DEBUGGER_FILENAME;
+ return ICore::userResourcePath(DEBUGGER_FILENAME);
}
DebuggerItemManagerPrivate::DebuggerItemManagerPrivate()
@@ -931,7 +931,7 @@ void DebuggerItemManagerPrivate::readDebuggers(const FilePath &fileName, bool is
void DebuggerItemManagerPrivate::restoreDebuggers()
{
// Read debuggers from SDK
- readDebuggers(ICore::installerResourcePath() / DEBUGGER_FILENAME, true);
+ readDebuggers(ICore::installerResourcePath(DEBUGGER_FILENAME), true);
// Read all debuggers from user file.
readDebuggers(userSettingsFileName(), false);
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index e100c6ff06e..98c6cf3f2d8 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -3970,7 +3970,7 @@ void GdbEngine::setupEngine()
// We need to guarantee a roundtrip before the adapter proceeds.
// Make sure this stays the last command in startGdb().
// Don't use ConsoleCommand, otherwise Mac won't markup the output.
- const QString dumperSourcePath = ICore::resourcePath().pathAppended("debugger/").toString();
+ const QString dumperSourcePath = ICore::resourcePath("debugger/").toString();
//if (terminal()->isUsable())
// runCommand({"set inferior-tty " + QString::fromUtf8(terminal()->slaveDevice())});
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index a7878a4b0d4..a934c150bf9 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -232,8 +232,7 @@ void LldbEngine::setupEngine()
showStatusMessage(tr("Setting up inferior..."));
- const QByteArray dumperSourcePath = ICore::resourcePath().toString().toLocal8Bit()
- + "/debugger/";
+ const QByteArray dumperSourcePath = ICore::resourcePath("debugger/").toString().toLocal8Bit();
executeCommand("script sys.path.insert(1, '" + dumperSourcePath + "')");
// This triggers reportState("enginesetupok") or "enginesetupfailed":
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index 94838f458fa..ce42c468e63 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -115,7 +115,7 @@ void PdbEngine::setupEngine()
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
m_interpreter = runParameters().interpreter;
- QString bridge = ICore::resourcePath().pathAppended("debugger/pdbbridge.py").toString();
+ QString bridge = ICore::resourcePath("debugger/pdbbridge.py").toString();
connect(&m_proc, &QProcess::errorOccurred, this, &PdbEngine::handlePdbError);
connect(&m_proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp
index 5b376945521..05e46e23a47 100644
--- a/src/plugins/designer/formeditorplugin.cpp
+++ b/src/plugins/designer/formeditorplugin.cpp
@@ -106,7 +106,7 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
const QString locale = ICore::userInterfaceLanguage();
if (!locale.isEmpty()) {
auto qtr = new QTranslator(this);
- const QString creatorTrPath = ICore::resourcePath().pathAppended("translations").toString();
+ const QString creatorTrPath = ICore::resourcePath("translations").toString();
const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString trFile = "designer_" + locale;
if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath))
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp
index d96c1ef0821..44785ba36ec 100644
--- a/src/plugins/glsleditor/glsleditorplugin.cpp
+++ b/src/plugins/glsleditor/glsleditorplugin.cpp
@@ -84,7 +84,7 @@ void GlslEditorPlugin::InitFile::initialize() const
const int variant = GLSL::Lexer::Variant_All;
QByteArray code;
- QFile file(ICore::resourcePath().pathAppended("glsl").pathAppended(m_fileName).toString());
+ QFile file(ICore::resourcePath("glsl").pathAppended(m_fileName).toString());
if (file.open(QFile::ReadOnly))
code = file.readAll();
diff --git a/src/plugins/help/helpmanager.cpp b/src/plugins/help/helpmanager.cpp
index 77c7bf2815a..b0755b703f6 100644
--- a/src/plugins/help/helpmanager.cpp
+++ b/src/plugins/help/helpmanager.cpp
@@ -125,7 +125,7 @@ HelpManager *HelpManager::instance()
QString HelpManager::collectionFilePath()
{
- return ICore::userResourcePath().pathAppended("helpcollection.qhc").toString();
+ return ICore::userResourcePath("helpcollection.qhc").toString();
}
void HelpManager::registerDocumentation(const QStringList &files)
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 8dbccfa88d0..1857098aa9e 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -193,7 +193,7 @@ HelpPluginPrivate::HelpPluginPrivate()
if (!locale.isEmpty()) {
auto qtr = new QTranslator(this);
auto qhelptr = new QTranslator(this);
- const QString creatorTrPath = ICore::resourcePath().pathAppended("translations").toString();
+ const QString creatorTrPath = ICore::resourcePath("translations").toString();
const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString trFile = QLatin1String("assistant_") + locale;
const QString helpTrFile = QLatin1String("qt_help_") + locale;
diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp
index 855a8a0444d..a63fdb9dfa1 100644
--- a/src/plugins/ios/iostoolhandler.cpp
+++ b/src/plugins/ios/iostoolhandler.cpp
@@ -1015,7 +1015,7 @@ bool IosSimulatorToolHandlerPrivate::isResponseValid(const SimulatorControl::Res
QString IosToolHandler::iosDeviceToolPath()
{
- return Core::ICore::libexecPath().pathAppended("ios/iostool").toString();
+ return Core::ICore::libexecPath("ios/iostool").toString();
}
IosToolHandler::IosToolHandler(const Internal::IosDeviceType &devType, QObject *parent) :
diff --git a/src/plugins/macros/macromanager.cpp b/src/plugins/macros/macromanager.cpp
index 6d70e48bb5a..1db0b30d275 100644
--- a/src/plugins/macros/macromanager.cpp
+++ b/src/plugins/macros/macromanager.cpp
@@ -386,7 +386,7 @@ void MacroManager::saveLastMacro()
QString MacroManager::macrosDirectory()
{
- const QString path = Core::ICore::userResourcePath().pathAppended("macros").toString();
+ const QString path = Core::ICore::userResourcePath("macros").toString();
if (QFile::exists(path) || QDir().mkpath(path))
return path;
return QString();
diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp
index 9803541c8a2..5a38fab978e 100644
--- a/src/plugins/mcusupport/mcusupportoptions.cpp
+++ b/src/plugins/mcusupport/mcusupportoptions.cpp
@@ -762,7 +762,7 @@ static void setKitEnvironment(Kit *k, const McuTarget *mcuTarget,
if (mcuTarget->qulVersion() < QVersionNumber{1,7}) {
const QString path = QLatin1String(HostOsInfo::isWindowsHost() ? "Path" : "PATH");
pathAdditions.append("${" + path + "}");
- pathAdditions.append(Core::ICore::libexecPath().pathAppended("clang/bin").toUserOutput());
+ pathAdditions.append(Core::ICore::libexecPath("clang/bin").toUserOutput());
changes.append({path, pathAdditions.join(HostOsInfo::pathListSeparator())});
}
diff --git a/src/plugins/mesonprojectmanager/machinefiles/machinefilemanager.cpp b/src/plugins/mesonprojectmanager/machinefiles/machinefilemanager.cpp
index 740dfa900e9..255a979f155 100644
--- a/src/plugins/mesonprojectmanager/machinefiles/machinefilemanager.cpp
+++ b/src/plugins/mesonprojectmanager/machinefiles/machinefilemanager.cpp
@@ -57,7 +57,7 @@ bool withFile(const Utils::FilePath &path, const F &f)
Utils::FilePath MachineFilesDir()
{
- return Core::ICore::userResourcePath() / "Meson-machine-files";
+ return Core::ICore::userResourcePath("Meson-machine-files");
}
MachineFileManager::MachineFileManager()
diff --git a/src/plugins/mesonprojectmanager/settings/tools/toolssettingsaccessor.cpp b/src/plugins/mesonprojectmanager/settings/tools/toolssettingsaccessor.cpp
index 531f27caa09..7e4727dcb76 100644
--- a/src/plugins/mesonprojectmanager/settings/tools/toolssettingsaccessor.cpp
+++ b/src/plugins/mesonprojectmanager/settings/tools/toolssettingsaccessor.cpp
@@ -54,7 +54,7 @@ ToolsSettingsAccessor::ToolsSettingsAccessor()
"Meson"),
Core::Constants::IDE_DISPLAY_NAME)
{
- setBaseFilePath(Core::ICore::userResourcePath() / Constants::ToolsSettings::FILENAME);
+ setBaseFilePath(Core::ICore::userResourcePath(Constants::ToolsSettings::FILENAME));
}
void ToolsSettingsAccessor::saveMesonTools(const std::vector<MesonTools::Tool_t> &tools,
diff --git a/src/plugins/modeleditor/modelsmanager.cpp b/src/plugins/modeleditor/modelsmanager.cpp
index a2a5b8f0652..8b2285ba546 100644
--- a/src/plugins/modeleditor/modelsmanager.cpp
+++ b/src/plugins/modeleditor/modelsmanager.cpp
@@ -142,7 +142,7 @@ ExtDocumentController *ModelsManager::createModel(ModelDocument *modelDocument)
auto documentController = new ExtDocumentController(this);
// TODO error output on reading definition files
documentController->configController()->readStereotypeDefinitions(
- Core::ICore::resourcePath().pathAppended("modeleditor").toString());
+ Core::ICore::resourcePath("modeleditor").toString());
d->managedModels.append(ManagedModel(documentController, modelDocument));
return documentController;
diff --git a/src/plugins/perfprofiler/perfdatareader.cpp b/src/plugins/perfprofiler/perfdatareader.cpp
index 783037cd078..80d4734f6df 100644
--- a/src/plugins/perfprofiler/perfdatareader.cpp
+++ b/src/plugins/perfprofiler/perfdatareader.cpp
@@ -405,10 +405,8 @@ QStringList PerfDataReader::findTargetArguments(const ProjectExplorer::RunContro
QString PerfDataReader::findPerfParser()
{
QString filePath = QString::fromLocal8Bit(qgetenv("PERFPROFILER_PARSER_FILEPATH"));
- if (filePath.isEmpty()) {
- filePath = QString::fromLatin1("%1/perfparser%2")
- .arg(Core::ICore::libexecPath().toString(), QString(QTC_HOST_EXE_SUFFIX));
- }
+ if (filePath.isEmpty())
+ filePath = Core::ICore::libexecPath("perfparser" QTC_HOST_EXE_SUFFIX).toString();
return QDir::toNativeSeparators(QDir::cleanPath(filePath));
}
diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp
index 2f261faa22b..f7376513ca6 100644
--- a/src/plugins/projectexplorer/customwizard/customwizard.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp
@@ -383,11 +383,9 @@ QList<Core::IWizardFactory *> CustomWizard::createWizards()
{
QString errorMessage;
QString verboseLog;
- const QString templateDirName
- = Core::ICore::resourcePath().pathAppended(templatePathC).toString();
- const QString userTemplateDirName
- = Core::ICore::userResourcePath().pathAppended(templatePathC).toString();
+ const QString templateDirName = Core::ICore::resourcePath(templatePathC).toString();
+ const QString userTemplateDirName = Core::ICore::userResourcePath(templatePathC).toString();
const QDir templateDir(templateDirName);
if (CustomWizardPrivate::verbose)
diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
index 61ec7378870..5dc15ac4059 100644
--- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
+++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
@@ -141,19 +141,17 @@ void DeviceManager::load()
QTC_ASSERT(!d->writer, return);
// Only create writer now: We do not want to save before the settings were read!
- d->writer = new Utils::PersistentSettingsWriter(
- settingsFilePath(QLatin1String("/devices.xml")),
- QLatin1String("QtCreatorDevices"));
+ d->writer = new PersistentSettingsWriter(settingsFilePath("devices.xml"), "QtCreatorDevices");
Utils::PersistentSettingsReader reader;
// read devices file from global settings path
QHash<Utils::Id, Utils::Id> defaultDevices;
QList<IDevice::Ptr> sdkDevices;
- if (reader.load(systemSettingsFilePath(QLatin1String("/devices.xml"))))
+ if (reader.load(systemSettingsFilePath("devices.xml")))
sdkDevices = fromMap(reader.restoreValues().value(DeviceManagerKey).toMap(), &defaultDevices);
// read devices file from user settings path
QList<IDevice::Ptr> userDevices;
- if (reader.load(settingsFilePath(QLatin1String("/devices.xml"))))
+ if (reader.load(settingsFilePath("devices.xml")))
userDevices = fromMap(reader.restoreValues().value(DeviceManagerKey).toMap(), &defaultDevices);
// Insert devices into the model. Prefer the higher device version when there are multiple
// devices with the same id.
@@ -223,14 +221,14 @@ QVariantMap DeviceManager::toMap() const
return map;
}
-Utils::FilePath DeviceManager::settingsFilePath(const QString &extension)
+FilePath DeviceManager::settingsFilePath(const QString &extension)
{
- return Core::ICore::userResourcePath() + extension;
+ return Core::ICore::userResourcePath(extension);
}
-Utils::FilePath DeviceManager::systemSettingsFilePath(const QString &deviceFileRelativePath)
+FilePath DeviceManager::systemSettingsFilePath(const QString &deviceFileRelativePath)
{
- return Core::ICore::installerResourcePath() + deviceFileRelativePath;
+ return Core::ICore::installerResourcePath(deviceFileRelativePath);
}
void DeviceManager::addDevice(const IDevice::ConstPtr &_device)
diff --git a/src/plugins/projectexplorer/extraabi.cpp b/src/plugins/projectexplorer/extraabi.cpp
index cab1ebd29a6..17c16b9efe9 100644
--- a/src/plugins/projectexplorer/extraabi.cpp
+++ b/src/plugins/projectexplorer/extraabi.cpp
@@ -65,7 +65,7 @@ AbiFlavorAccessor::AbiFlavorAccessor() :
QCoreApplication::translate("ProjectExplorer::ToolChainManager", "ABI"),
Core::Constants::IDE_DISPLAY_NAME)
{
- setBaseFilePath(Core::ICore::installerResourcePath() / "abi.xml");
+ setBaseFilePath(Core::ICore::installerResourcePath("abi.xml"));
addVersionUpgrader(std::make_unique<AbiFlavorUpgraderV0>());
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
index c22aab9e964..7a48be343b3 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
@@ -336,8 +336,8 @@ static QStringList environmentTemplatesPaths()
Utils::FilePaths &JsonWizardFactory::searchPaths()
{
- static Utils::FilePaths m_searchPaths = {Core::ICore::userResourcePath() / WIZARD_PATH,
- Core::ICore::resourcePath() / WIZARD_PATH};
+ static Utils::FilePaths m_searchPaths = {Core::ICore::userResourcePath(WIZARD_PATH),
+ Core::ICore::resourcePath(WIZARD_PATH)};
for (const QString &environmentTemplateDirName : environmentTemplatesPaths())
m_searchPaths << Utils::FilePath::fromString(environmentTemplateDirName);
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
index 197b179a92b..3df453e0819 100644
--- a/src/plugins/projectexplorer/kitmanager.cpp
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -83,7 +83,7 @@ const char KIT_FILENAME[] = "profiles.xml";
static FilePath settingsFileName()
{
- return ICore::userResourcePath() / KIT_FILENAME;
+ return ICore::userResourcePath(KIT_FILENAME);
}
// --------------------------------------------------------------------------
@@ -197,7 +197,7 @@ void KitManager::restoreKits()
// read all kits from SDK
{
- KitList system = restoreKitsHelper(ICore::installerResourcePath() / KIT_FILENAME);
+ KitList system = restoreKitsHelper(ICore::installerResourcePath(KIT_FILENAME));
// SDK kits need to get updated with the user-provided extra settings:
for (auto &current : system.kits) {
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 95ed5842c99..4125146c83b 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -1139,7 +1139,7 @@ FilePath MsvcToolChain::makeCommand(const Environment &environment) const
if (useJom) {
tmp = environment.searchInPath(jom,
{Core::ICore::libexecPath(),
- Core::ICore::libexecPath().pathAppended("jom")});
+ Core::ICore::libexecPath("jom")});
if (!tmp.isEmpty())
command = tmp;
}
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 3520cd5fc1c..19b2e8bbe50 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -788,7 +788,7 @@ QDateTime SessionManager::sessionDateTime(const QString &session)
FilePath SessionManager::sessionNameToFileName(const QString &session)
{
- return ICore::userResourcePath() / session + ".qws";
+ return ICore::userResourcePath(session + ".qws");
}
/*!
diff --git a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
index 3ba808307bf..0c7e9c633ef 100644
--- a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
+++ b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
@@ -184,7 +184,7 @@ ToolChainSettingsAccessor::ToolChainSettingsAccessor() :
QCoreApplication::translate("ProjectExplorer::ToolChainManager", "Tool Chains"),
Core::Constants::IDE_DISPLAY_NAME)
{
- setBaseFilePath(Core::ICore::userResourcePath() / TOOLCHAIN_FILENAME);
+ setBaseFilePath(Core::ICore::userResourcePath(TOOLCHAIN_FILENAME));
addVersionUpgrader(std::make_unique<ToolChainSettingsUpgraderV0>());
}
@@ -193,7 +193,7 @@ QList<ToolChain *> ToolChainSettingsAccessor::restoreToolChains(QWidget *parent)
{
// read all tool chains from SDK
const QList<ToolChain *> systemFileTcs = toolChains(
- restoreSettings(Core::ICore::installerResourcePath() / TOOLCHAIN_FILENAME, parent));
+ restoreSettings(Core::ICore::installerResourcePath(TOOLCHAIN_FILENAME), parent));
for (ToolChain * const systemTc : systemFileTcs)
systemTc->setDetection(ToolChain::AutoDetectionFromSdk);
diff --git a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp
index 9c8368e98b6..c4d2a1373c2 100644
--- a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp
+++ b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp
@@ -102,7 +102,7 @@ bool QtWizard::qt4ProjectPostGenerateFiles(const QWizard *w,
QString QtWizard::templateDir()
{
- return Core::ICore::resourcePath().pathAppended("templates/qt4project").toString();
+ return Core::ICore::resourcePath("templates/qt4project").toString();
}
bool QtWizard::lowerCaseFiles()
diff --git a/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp b/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp
index 9cf335c0b1e..f3ec2d44536 100644
--- a/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp
@@ -44,8 +44,8 @@ QmlDesignerIconProvider::QmlDesignerIconProvider()
static QString iconPath()
{
- return Core::ICore::resourcePath()
- .pathAppended("qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/")
+ return Core::ICore::resourcePath(
+ "qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/")
.toString();
}
diff --git a/src/plugins/qmldesigner/components/componentcore/theme.cpp b/src/plugins/qmldesigner/components/componentcore/theme.cpp
index a48a70ac7fa..cb5cdb218e8 100644
--- a/src/plugins/qmldesigner/components/componentcore/theme.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/theme.cpp
@@ -50,8 +50,7 @@ Theme::Theme(Utils::Theme *originTheme, QObject *parent)
, m_constants(nullptr)
{
QString constantsPath
- = Core::ICore::resourcePath()
- .pathAppended(
+ = Core::ICore::resourcePath(
"qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml")
.toString();
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
index b67eb8cf155..b7f89ec96e9 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
@@ -66,7 +66,7 @@ class ImageCacheData
{
public:
Sqlite::Database database{Utils::PathString{
- Core::ICore::cacheResourcePath().pathAppended("imagecache-v2.db").toString()}};
+ Core::ICore::cacheResourcePath("imagecache-v2.db").toString()}};
ImageCacheStorage<Sqlite::Database> storage{database};
ImageCacheConnectionManager connectionManager;
ImageCacheCollector collector{connectionManager};
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
index df847796a77..577afc18cfe 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
@@ -75,10 +75,9 @@
namespace QmlDesigner {
-static QString propertyEditorResourcesPath() {
- return Core::ICore::resourcePath()
- .pathAppended("qmldesigner/propertyEditorQmlSources")
- .toString();
+static QString propertyEditorResourcesPath()
+{
+ return Core::ICore::resourcePath("qmldesigner/propertyEditorQmlSources").toString();
}
bool ItemLibraryWidget::eventFilter(QObject *obj, QEvent *event)
@@ -326,7 +325,7 @@ void ItemLibraryWidget::handleTabChanged(int index)
QString ItemLibraryWidget::qmlSourcesPath()
{
- return Core::ICore::resourcePath().pathAppended("qmldesigner/itemLibraryQmlSources").toString();
+ return Core::ICore::resourcePath("qmldesigner/itemLibraryQmlSources").toString();
}
void ItemLibraryWidget::clearSearchFilter()
diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetcustomlistmodel.cpp b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetcustomlistmodel.cpp
index bf1bcd28ddf..7396b32b411 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetcustomlistmodel.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetcustomlistmodel.cpp
@@ -44,9 +44,9 @@ static const char settingsFileName[] = "GradientPresets.ini";
QString settingsFullFilePath(const QSettings::Scope &scope)
{
if (scope == QSettings::SystemScope)
- return Core::ICore::installerResourcePath().pathAppended(settingsFileName).toString();
+ return Core::ICore::installerResourcePath(settingsFileName).toString();
- return Core::ICore::userResourcePath().pathAppended(settingsFileName).toString();
+ return Core::ICore::userResourcePath(settingsFileName).toString();
}
} // namespace Internal
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
index 9a75b2515e6..ebaf1da7b64 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
@@ -530,10 +530,9 @@ void PropertyEditorQmlBackend::initialSetup(const TypeName &typeName, const QUrl
contextObject()->setGlobalBaseUrl(QUrl());
}
-QString PropertyEditorQmlBackend::propertyEditorResourcesPath() {
- return Core::ICore::resourcePath()
- .pathAppended("qmldesigner/propertyEditorQmlSources")
- .toString();
+QString PropertyEditorQmlBackend::propertyEditorResourcesPath()
+{
+ return Core::ICore::resourcePath("qmldesigner/propertyEditorQmlSources").toString();
}
inline bool dotPropertyHeuristic(const QmlObjectNode &node, const NodeMetaInfo &type, const PropertyName &name)
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
index 5c8e52e9be1..6b13b890d46 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
@@ -56,10 +56,9 @@ enum {
namespace QmlDesigner {
-static QString propertyEditorResourcesPath() {
- return Core::ICore::resourcePath()
- .pathAppended("qmldesigner/propertyEditorQmlSources")
- .toString();
+static QString propertyEditorResourcesPath()
+{
+ return Core::ICore::resourcePath("qmldesigner/propertyEditorQmlSources").toString();
}
int StatesEditorWidget::currentStateInternalId() const
@@ -121,8 +120,9 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State
StatesEditorWidget::~StatesEditorWidget() = default;
-QString StatesEditorWidget::qmlSourcesPath() {
- return Core::ICore::resourcePath().pathAppended("qmldesigner/statesEditorQmlSources").toString();
+QString StatesEditorWidget::qmlSourcesPath()
+{
+ return Core::ICore::resourcePath("qmldesigner/statesEditorQmlSources").toString();
}
void StatesEditorWidget::toggleStatesViewExpanded()
diff --git a/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp b/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp
index a99f8a7c0a1..d57caf0e1a4 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/preseteditor.cpp
@@ -146,9 +146,9 @@ static const char settingsFileName[] = "EasingCurves.ini";
QString settingsFullFilePath(const QSettings::Scope &scope)
{
if (scope == QSettings::SystemScope)
- return Core::ICore::installerResourcePath().pathAppended(settingsFileName).toString();
+ return Core::ICore::installerResourcePath(settingsFileName).toString();
- return Core::ICore::userResourcePath().pathAppended(settingsFileName).toString();
+ return Core::ICore::userResourcePath(settingsFileName).toString();
}
} // namespace Internal
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
index 29499185412..87fd2359f7e 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
@@ -392,7 +392,7 @@ void PuppetCreator::createQml2PuppetExecutableIfMissing()
QString PuppetCreator::defaultPuppetToplevelBuildDirectory()
{
- return Core::ICore::userResourcePath().pathAppended("qmlpuppet/").toString();
+ return Core::ICore::userResourcePath("qmlpuppet/").toString();
}
QString PuppetCreator::qmlPuppetToplevelBuildDirectory() const
@@ -424,7 +424,7 @@ QString PuppetCreator::qmlPuppetDirectory(PuppetType puppetType) const
QString PuppetCreator::defaultPuppetFallbackDirectory()
{
if (Utils::HostOsInfo::isMacHost())
- return Core::ICore::libexecPath().pathAppended("qmldesigner").toString();
+ return Core::ICore::libexecPath("qmldesigner").toString();
else
return Core::ICore::libexecPath().toString();
}
@@ -639,7 +639,7 @@ bool PuppetCreator::startBuildProcess(const QString &buildDirectoryPath,
QString PuppetCreator::puppetSourceDirectoryPath()
{
- return Core::ICore::resourcePath().pathAppended("qml/qmlpuppet").toString();
+ return Core::ICore::resourcePath("qml/qmlpuppet").toString();
}
QString PuppetCreator::qml2PuppetProjectFile()
diff --git a/src/plugins/qmldesigner/designermcumanager.cpp b/src/plugins/qmldesigner/designermcumanager.cpp
index 63efcb305d0..b7b9ef2fadf 100644
--- a/src/plugins/qmldesigner/designermcumanager.cpp
+++ b/src/plugins/qmldesigner/designermcumanager.cpp
@@ -64,7 +64,7 @@ DesignerMcuManager &DesignerMcuManager::instance()
QString DesignerMcuManager::mcuResourcesPath()
{
- return Core::ICore::resourcePath().pathAppended("qmldesigner/qt4mcu").toString();
+ return Core::ICore::resourcePath("qmldesigner/qt4mcu").toString();
}
bool DesignerMcuManager::isMCUProject() const
diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp
index 37b1d9fefb5..19baf68f8ed 100644
--- a/src/plugins/qmldesigner/designmodewidget.cpp
+++ b/src/plugins/qmldesigner/designmodewidget.cpp
@@ -235,7 +235,7 @@ void DesignModeWidget::setup()
m_dockManager = new ADS::DockManager(this);
m_dockManager->setSettings(settings);
m_dockManager->setWorkspacePresetsPath(
- Core::ICore::resourcePath().pathAppended("qmldesigner/workspacePresets/").toString());
+ Core::ICore::resourcePath("qmldesigner/workspacePresets/").toString());
QString sheet = QString::fromUtf8(Utils::FileReader::fetchQrc(":/qmldesigner/dockwidgets.css"));
m_dockManager->setStyleSheet(Theme::replaceCssColors(sheet));
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index 908debcdb78..91d760339be 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -220,8 +220,8 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e
GenerateResource::generateMenuEntry();
const QString fontPath
- = Core::ICore::resourcePath()
- .pathAppended("qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf")
+ = Core::ICore::resourcePath(
+ "qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf")
.toString();
if (QFontDatabase::addApplicationFont(fontPath) < 0)
qCWarning(qmldesignerLog) << "Could not add font " << fontPath << "to font database";
diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp
index da4a1376459..e0d57031020 100644
--- a/src/plugins/qmljseditor/qmljseditorplugin.cpp
+++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp
@@ -93,8 +93,8 @@ public:
QPointer<QmlJSEditorDocument> m_currentDocument;
Utils::JsonSchemaManager m_jsonManager{
- {ICore::userResourcePath().pathAppended("json/").toString(),
- ICore::resourcePath().pathAppended("json/").toString()}};
+ {ICore::userResourcePath("json/").toString(),
+ ICore::resourcePath("json/").toString()}};
QmlJSEditorFactory m_qmlJSEditorFactory;
QmlJSOutlineWidgetFactory m_qmlJSOutlineWidgetFactory;
QuickToolBar m_quickToolBar;
diff --git a/src/plugins/qmljseditor/qmloutlinemodel.cpp b/src/plugins/qmljseditor/qmloutlinemodel.cpp
index ed5b0d14992..80ca3c08040 100644
--- a/src/plugins/qmljseditor/qmloutlinemodel.cpp
+++ b/src/plugins/qmljseditor/qmloutlinemodel.cpp
@@ -328,8 +328,7 @@ QmlOutlineModel::QmlOutlineModel(QmlJSEditorDocument *document) :
m_editorDocument(document)
{
m_icons = Icons::instance();
- Icons::instance()->setIconFilesPath(
- Core::ICore::resourcePath().pathAppended("qmlicons").toString());
+ Icons::instance()->setIconFilesPath(Core::ICore::resourcePath("qmlicons").toString());
setItemPrototype(new QmlOutlineItem(this));
}
diff --git a/src/plugins/qmljstools/qmljsbundleprovider.cpp b/src/plugins/qmljstools/qmljsbundleprovider.cpp
index 61ff8eddda6..2f4e5d1e793 100644
--- a/src/plugins/qmljstools/qmljsbundleprovider.cpp
+++ b/src/plugins/qmljstools/qmljsbundleprovider.cpp
@@ -51,7 +51,7 @@ QmlBundle BasicBundleProvider::defaultBundle(const QString &bundleInfoName)
{
static bool wroteErrors = false;
QmlBundle res;
- const Utils::FilePath defaultBundlePath = Core::ICore::resourcePath() / "qml-type-descriptions"
+ const Utils::FilePath defaultBundlePath = Core::ICore::resourcePath("qml-type-descriptions")
/ bundleInfoName;
if (!defaultBundlePath.exists()) {
qWarning() << "BasicBundleProvider: ERROR " << defaultBundlePath
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp
index 32db0688ca2..3a958522543 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.cpp
+++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp
@@ -220,7 +220,7 @@ void ModelManager::delayedInitialization()
ViewerContext qbsVContext;
qbsVContext.language = Dialect::QmlQbs;
- qbsVContext.paths.append(ICore::resourcePath().pathAppended("qbs").toString());
+ qbsVContext.paths.append(ICore::resourcePath("qbs").toString());
setDefaultVContext(qbsVContext);
}
diff --git a/src/plugins/qmljstools/qmljstools_test.cpp b/src/plugins/qmljstools/qmljstools_test.cpp
index 51dd3dc8efc..1daf28f7b6e 100644
--- a/src/plugins/qmljstools/qmljstools_test.cpp
+++ b/src/plugins/qmljstools/qmljstools_test.cpp
@@ -43,8 +43,7 @@ void QmlJSToolsPlugin::test_basic()
{
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
- const QString qmlFilePath = Core::ICore::resourcePath()
- .pathAppended(
+ const QString qmlFilePath = Core::ICore::resourcePath(
"qmldesigner/itemLibraryQmlSources/ItemDelegate.qml")
.toString();
modelManager->updateSourceFiles(QStringList(qmlFilePath), false);
diff --git a/src/plugins/qnx/qnxconfigurationmanager.cpp b/src/plugins/qnx/qnxconfigurationmanager.cpp
index 04501be01c9..bfb9f901104 100644
--- a/src/plugins/qnx/qnxconfigurationmanager.cpp
+++ b/src/plugins/qnx/qnxconfigurationmanager.cpp
@@ -40,7 +40,7 @@ const QLatin1String QNXConfigsFileVersionKey("Version");
static FilePath qnxConfigSettingsFileName()
{
- return Core::ICore::userResourcePath() / "qnx/qnxconfigurations.xml";
+ return Core::ICore::userResourcePath("qnx/qnxconfigurations.xml");
}
static QnxConfigurationManager *m_instance = nullptr;
diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp
index 3c95dde01ac..149a30a1879 100644
--- a/src/plugins/qtsupport/qtversionmanager.cpp
+++ b/src/plugins/qtsupport/qtversionmanager.cpp
@@ -84,12 +84,12 @@ static Q_LOGGING_CATEGORY(log, "qtc.qt.versions", QtWarningMsg);
static FilePath globalSettingsFileName()
{
- return Core::ICore::installerResourcePath() / QTVERSION_FILENAME;
+ return Core::ICore::installerResourcePath(QTVERSION_FILENAME);
}
static FilePath settingsFileName(const QString &path)
{
- return Core::ICore::userResourcePath() / path;
+ return Core::ICore::userResourcePath(path);
}
diff --git a/src/plugins/studiowelcome/examplecheckout.cpp b/src/plugins/studiowelcome/examplecheckout.cpp
index 7d31cfc40fc..17cc306b36a 100644
--- a/src/plugins/studiowelcome/examplecheckout.cpp
+++ b/src/plugins/studiowelcome/examplecheckout.cpp
@@ -66,9 +66,7 @@ void ExampleCheckout::checkoutExample(const QUrl &url)
widget->engine()->addImportPath("qrc:/studiofonts");
widget->engine()->addImportPath(
- Core::ICore::resourcePath()
- .pathAppended("/qmldesigner/propertyEditorQmlSources/imports")
- .toString());
+ Core::ICore::resourcePath("/qmldesigner/propertyEditorQmlSources/imports").toString());
widget->setSource(QUrl("qrc:/qml/downloaddialog/main.qml"));
diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp
index 2f337bf25f4..8934483647b 100644
--- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp
+++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp
@@ -207,12 +207,11 @@ public:
return;
}
- const Utils::FilePath projectFile = Core::ICore::resourcePath() / "examples" / example
- / example
- + ".qmlproject";
+ const Utils::FilePath projectFile = Core::ICore::resourcePath("examples")
+ / example / example + ".qmlproject";
ProjectExplorer::ProjectExplorerPlugin::openProjectWelcomePage(projectFile.toString());
- const Utils::FilePath qmlFile = Core::ICore::resourcePath() / "examples" / example
- / formFile;
+ const Utils::FilePath qmlFile = Core::ICore::resourcePath("examples")
+ / example / formFile;
Core::EditorManager::openEditor(qmlFile.toString());
}
diff --git a/src/plugins/texteditor/codestylepool.cpp b/src/plugins/texteditor/codestylepool.cpp
index 272f6772c6f..e92592b348f 100644
--- a/src/plugins/texteditor/codestylepool.cpp
+++ b/src/plugins/texteditor/codestylepool.cpp
@@ -94,7 +94,7 @@ QByteArray CodeStylePoolPrivate::generateUniqueId(const QByteArray &id) const
static QString customCodeStylesPath()
{
- return Core::ICore::userResourcePath().pathAppended("codestyles").toString();
+ return Core::ICore::userResourcePath("codestyles").toString();
}
CodeStylePool::CodeStylePool(ICodeStylePreferencesFactory *factory, QObject *parent)
diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp
index 4e61f89ebc5..e35ed5c3b21 100644
--- a/src/plugins/texteditor/fontsettings.cpp
+++ b/src/plugins/texteditor/fontsettings.cpp
@@ -504,7 +504,7 @@ int FontSettings::defaultFontSize()
*/
QString FontSettings::defaultSchemeFileName(const QString &fileName)
{
- Utils::FilePath defaultScheme = Core::ICore::resourcePath() / "styles";
+ Utils::FilePath defaultScheme = Core::ICore::resourcePath("styles");
if (!fileName.isEmpty() && (defaultScheme / fileName).exists()) {
defaultScheme = defaultScheme / fileName;
diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp
index 19759d22087..2487e31fff9 100644
--- a/src/plugins/texteditor/fontsettingspage.cpp
+++ b/src/plugins/texteditor/fontsettingspage.cpp
@@ -191,7 +191,7 @@ public:
static QString customStylesPath()
{
- return Core::ICore::userResourcePath().pathAppended("styles").toString();
+ return Core::ICore::userResourcePath("styles").toString();
}
static QString createColorSchemeFileName(const QString &pattern)
@@ -556,7 +556,7 @@ void FontSettingsPageWidget::refreshColorSchemeList()
{
QList<ColorSchemeEntry> colorSchemes;
- QDir styleDir(Core::ICore::resourcePath().pathAppended("styles").toDir());
+ QDir styleDir(Core::ICore::resourcePath("styles").toDir());
styleDir.setNameFilters(QStringList() << QLatin1String("*.xml"));
styleDir.setFilter(QDir::Files);
diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp
index 5e770078b2f..2a940b3f73d 100644
--- a/src/plugins/texteditor/highlighter.cpp
+++ b/src/plugins/texteditor/highlighter.cpp
@@ -59,7 +59,7 @@ KSyntaxHighlighting::Repository *highlightRepository()
if (!repository) {
repository = new KSyntaxHighlighting::Repository();
repository->addCustomSearchPath(TextEditorSettings::highlighterSettings().definitionFilesPath());
- QDir dir(Core::ICore::resourcePath().pathAppended("generic-highlighter/syntax").toDir());
+ QDir dir(Core::ICore::resourcePath("generic-highlighter/syntax").toDir());
if (dir.exists() && dir.cdUp())
repository->addCustomSearchPath(dir.path());
}
diff --git a/src/plugins/texteditor/highlightersettings.cpp b/src/plugins/texteditor/highlightersettings.cpp
index 9edb522a57f..97d31ba999d 100644
--- a/src/plugins/texteditor/highlightersettings.cpp
+++ b/src/plugins/texteditor/highlightersettings.cpp
@@ -88,7 +88,7 @@ QString findFallbackDefinitionsLocation()
}
}
- dir.setPath(Core::ICore::resourcePath().pathAppended("generic-highlighter").toString());
+ dir.setPath(Core::ICore::resourcePath("generic-highlighter").toString());
if (dir.exists() && !dir.entryInfoList().isEmpty())
return dir.path();
@@ -165,8 +165,7 @@ void HighlighterSettings::assignDefaultIgnoredPatterns()
void HighlighterSettings::assignDefaultDefinitionsPath()
{
- const QString path
- = Core::ICore::userResourcePath().pathAppended("generic-highlighter").toString();
+ const QString path = Core::ICore::userResourcePath("generic-highlighter").toString();
if (QFile::exists(path) || QDir().mkpath(path))
m_definitionFilesPath = path;
}
diff --git a/src/plugins/texteditor/snippets/snippetscollection.cpp b/src/plugins/texteditor/snippets/snippetscollection.cpp
index bdde6f4c2c7..2ebf9f71bd2 100644
--- a/src/plugins/texteditor/snippets/snippetscollection.cpp
+++ b/src/plugins/texteditor/snippets/snippetscollection.cpp
@@ -98,7 +98,7 @@ SnippetsCollection::SnippetsCollection()
: m_userSnippetsPath(Core::ICore::userResourcePath().pathAppended("snippets/").toString())
, m_userSnippetsFile(QLatin1String("snippets.xml"))
{
- QDir dir = Core::ICore::resourcePath().pathAppended("snippets").toDir();
+ QDir dir = Core::ICore::resourcePath("snippets").toDir();
dir.setNameFilters(QStringList(QLatin1String("*.xml")));
foreach (const QFileInfo &fi, dir.entryInfoList())
m_builtInSnippetsFiles.append(fi.absoluteFilePath());