diff options
author | Ihor Ivlev <ivlev.igor@gmail.com> | 2022-05-07 00:44:03 +0300 |
---|---|---|
committer | Ihor Ivlev <ivlev.igor@gmail.com> | 2022-05-25 15:05:25 +0000 |
commit | 6f7e7980d2b604c79507f9165098f783db8ab2e3 (patch) | |
tree | 35a1c59758149649bea3d54824900af59c47e7ee /src/plugins/texteditor/texteditorsettings.cpp | |
parent | 5da36104abecf64f660ce6058430f8d611841851 (diff) |
Display parent functions in the Find Usages menu
To display the parent function, first we find it in displayResults and
store the information to SearchResultItem, then
SearchResultTreeItemDelegate gets the information and renders it.
Similar approach is applied to ClangdClient, in addSearchResultsForFile.
This change also adds default style for containing function highlight in
the search.
Default foreground and background colors are same as usual text colors.
Task-number: QTCREATORBUG-27550
Change-Id: Id1251afa192f8d1232524742b7c211770bcb83fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditorsettings.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditorsettings.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index d1cd42836e..5a0df2d1de 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -112,6 +112,11 @@ FormatDescriptions TextEditorSettingsPrivate::initialFormats() tr("Highlighted search results inside the editor.\n" "Used to mark write accesses to C++ symbols."), FormatDescription::ShowBackgroundControl); + formatDescr.emplace_back(C_SEARCH_RESULT_CONTAINING_FUNCTION, + tr("Search Result Containing function"), + tr("Highlighted search results inside the editor.\n" + "Used to mark containing function of the symbol usage."), + FormatDescription::ShowForeAndBackgroundControl); formatDescr.emplace_back(C_SEARCH_SCOPE, tr("Search Scope"), tr("Section where the pattern is searched in."), FormatDescription::ShowBackgroundControl); |