TextEditor: Use FilePath in HighlighterSettings

Change-Id: I1002d3a0b16e403e1650475ec316adf797251a1f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-09-27 19:05:08 +02:00
parent 81acd0c62a
commit 8b7f9bacb2
5 changed files with 99 additions and 108 deletions

View File

@@ -62,7 +62,7 @@ static KSyntaxHighlighting::Repository *highlightRepository()
static KSyntaxHighlighting::Repository *repository = nullptr;
if (!repository) {
repository = new KSyntaxHighlighting::Repository();
repository->addCustomSearchPath(TextEditorSettings::highlighterSettings().definitionFilesPath());
repository->addCustomSearchPath(TextEditorSettings::highlighterSettings().definitionFilesPath().toString());
const FilePath dir = Core::ICore::resourcePath("generic-highlighter/syntax");
if (dir.exists())
repository->addCustomSearchPath(dir.parentDir().path());