forked from qt-creator/qt-creator
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:
@@ -18,6 +18,7 @@ SearchResultItem searchResult(const FilePath &fileName, const QString &matchingL
|
|||||||
result.setFilePath(fileName);
|
result.setFilePath(fileName);
|
||||||
result.setLineText(matchingLine);
|
result.setLineText(matchingLine);
|
||||||
result.setMainRange(lineNumber, matchStart, matchLength);
|
result.setMainRange(lineNumber, matchStart, matchLength);
|
||||||
|
result.setUseTextEditorFont(true);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ SearchResultItems parse(const QString &output, const std::optional<QRegularExpre
|
|||||||
SearchResultItem item;
|
SearchResultItem item;
|
||||||
item.setFilePath(filePath);
|
item.setFilePath(filePath);
|
||||||
item.setDisplayText(hitLine.toString());
|
item.setDisplayText(hitLine.toString());
|
||||||
|
item.setUseTextEditorFont(true);
|
||||||
for (const QPair<int, int> &hit : hits) {
|
for (const QPair<int, int> &hit : hits) {
|
||||||
item.setMainRange(lineNumber, hit.first, hit.second);
|
item.setMainRange(lineNumber, hit.first, hit.second);
|
||||||
item.setUserData(
|
item.setUserData(
|
||||||
|
|||||||
Reference in New Issue
Block a user