forked from qt-creator/qt-creator
TextEditor: FilePathify Repository *highlightRepository()
Change-Id: I66ed44e199fa26b28e23497c2650224e6331baa7 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -62,9 +62,9 @@ KSyntaxHighlighting::Repository *highlightRepository()
|
||||
if (!repository) {
|
||||
repository = new KSyntaxHighlighting::Repository();
|
||||
repository->addCustomSearchPath(TextEditorSettings::highlighterSettings().definitionFilesPath());
|
||||
QDir dir(Core::ICore::resourcePath("generic-highlighter/syntax").toDir());
|
||||
if (dir.exists() && dir.cdUp())
|
||||
repository->addCustomSearchPath(dir.path());
|
||||
const Utils::FilePath dir = Core::ICore::resourcePath("generic-highlighter/syntax");
|
||||
if (dir.exists())
|
||||
repository->addCustomSearchPath(dir.parentDir().path());
|
||||
}
|
||||
return repository;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user