From bce19b73c55563323505b94e4bd00065b876f1b2 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 29 Jun 2021 17:57:49 +0200 Subject: [PATCH] TextEditor: FilePathify Repository *highlightRepository() Change-Id: I66ed44e199fa26b28e23497c2650224e6331baa7 Reviewed-by: David Schulz --- src/plugins/texteditor/highlighter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp index 84243a516d1..6d51eee5922 100644 --- a/src/plugins/texteditor/highlighter.cpp +++ b/src/plugins/texteditor/highlighter.cpp @@ -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; }