forked from qt-creator/qt-creator
Core: Add a default parameter to various ICore::*path functions
Saves some code on the user side. Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user