CppEditor: Render forward decls less prominently in outline

Fixes: QTCREATORBUG-312
Change-Id: I9bb77add24737881eeee008620941b55118ee0e5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-02-03 15:29:12 +01:00
parent dbe411ca4c
commit a811afaeab
4 changed files with 31 additions and 1 deletions

View File

@@ -404,6 +404,7 @@ LanguageClientOutlineItem::LanguageClientOutlineItem(Client *client, const Docum
, m_name(info.name())
, m_detail(info.detail().value_or(QString()))
, m_range(info.range())
, m_selectionRange(info.selectionRange())
, m_type(info.kind())
{
const QList<LanguageServerProtocol::DocumentSymbol> children = sortedSymbols(

View File

@@ -27,6 +27,7 @@ public:
LanguageClientOutlineItem(Client *client, const LanguageServerProtocol::DocumentSymbol &info);
LanguageServerProtocol::Range range() const { return m_range; }
LanguageServerProtocol::Range selectionRange() const { return m_selectionRange; }
LanguageServerProtocol::Position pos() const { return m_range.start(); }
bool contains(const LanguageServerProtocol::Position &pos) const {
return m_range.contains(pos);
@@ -46,6 +47,7 @@ private:
QString m_name;
QString m_detail;
LanguageServerProtocol::Range m_range;
LanguageServerProtocol::Range m_selectionRange;
int m_type = -1;
};