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) {
|
if (!repository) {
|
||||||
repository = new KSyntaxHighlighting::Repository();
|
repository = new KSyntaxHighlighting::Repository();
|
||||||
repository->addCustomSearchPath(TextEditorSettings::highlighterSettings().definitionFilesPath());
|
repository->addCustomSearchPath(TextEditorSettings::highlighterSettings().definitionFilesPath());
|
||||||
QDir dir(Core::ICore::resourcePath("generic-highlighter/syntax").toDir());
|
const Utils::FilePath dir = Core::ICore::resourcePath("generic-highlighter/syntax");
|
||||||
if (dir.exists() && dir.cdUp())
|
if (dir.exists())
|
||||||
repository->addCustomSearchPath(dir.path());
|
repository->addCustomSearchPath(dir.parentDir().path());
|
||||||
}
|
}
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user