forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -41,6 +41,7 @@ const char *nameForStyle(TextStyle style)
|
||||
case C_SEARCH_RESULT: return "SearchResult";
|
||||
case C_SEARCH_RESULT_ALT1: return "SearchResultAlt1";
|
||||
case C_SEARCH_RESULT_ALT2: return "SearchResultAlt2";
|
||||
case C_SEARCH_RESULT_CONTAINING_FUNCTION: return "SearchResultContainingFunction";
|
||||
case C_SEARCH_SCOPE: return "SearchScope";
|
||||
case C_PARENTHESES: return "Parentheses";
|
||||
case C_PARENTHESES_MISMATCH:return "ParenthesesMismatch";
|
||||
|
||||
Reference in New Issue
Block a user