diff options
author | hjk <hjk@qt.io> | 2021-12-06 05:11:04 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-12-06 17:10:49 +0000 |
commit | 104ea4accc8bf7d2e317c10638a299c3af267ede (patch) | |
tree | 8ab53d49a45cb72372a5294d272a7e43c815d661 /src/plugins/languageclient | |
parent | 8cb5c3cfdd07f98449d3df0a676c5026c33f6b7a (diff) |
Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits.
Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/languageclient')
-rw-r--r-- | src/plugins/languageclient/semantichighlightsupport.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/languageclient/semantichighlightsupport.h b/src/plugins/languageclient/semantichighlightsupport.h index 724e85f837..d6a9fc314d 100644 --- a/src/plugins/languageclient/semantichighlightsupport.h +++ b/src/plugins/languageclient/semantichighlightsupport.h @@ -44,17 +44,19 @@ class Client; class LANGUAGECLIENT_EXPORT ExpandedSemanticToken { public: + friend bool operator==(const ExpandedSemanticToken &t1, const ExpandedSemanticToken &t2) + { + return t1.line == t2.line && t1.column == t2.column && t1.length == t2.length + && t1.type == t2.type && t1.modifiers == t2.modifiers; + } + int line = -1; int column = -1; int length = -1; QString type; QStringList modifiers; }; -inline bool operator==(const ExpandedSemanticToken &t1, const ExpandedSemanticToken &t2) -{ - return t1.line == t2.line && t1.column == t2.column && t1.length == t2.length - && t1.type == t2.type && t1.modifiers == t2.modifiers; -} + using SemanticTokensHandler = std::function<void(TextEditor::TextDocument *, const QList<ExpandedSemanticToken> &, int, bool)>; |