SilverSearcher: Use the text editor font for the results

This looks more consistent with the results reported by the internal engine.

Change-Id: I1f5a405bcfd7b32c01ef6d4db0324985e657f6a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2023-05-31 23:49:11 +02:00
parent 1e09ac087a
commit 2fcaba567b
2 changed files with 2 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ SearchResultItem searchResult(const FilePath &fileName, const QString &matchingL
result.setFilePath(fileName);
result.setLineText(matchingLine);
result.setMainRange(lineNumber, matchStart, matchLength);
result.setUseTextEditorFont(true);
return result;
}

View File

@@ -128,6 +128,7 @@ SearchResultItems parse(const QString &output, const std::optional<QRegularExpre
SearchResultItem item;
item.setFilePath(filePath);
item.setDisplayText(hitLine.toString());
item.setUseTextEditorFont(true);
for (const QPair<int, int> &hit : hits) {
item.setMainRange(lineNumber, hit.first, hit.second);
item.setUserData(