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/classview/classviewsymbolinformation.h | |
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/classview/classviewsymbolinformation.h')
-rw-r--r-- | src/plugins/classview/classviewsymbolinformation.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/classview/classviewsymbolinformation.h b/src/plugins/classview/classviewsymbolinformation.h index c6189c0b39..3e719bf89b 100644 --- a/src/plugins/classview/classviewsymbolinformation.h +++ b/src/plugins/classview/classviewsymbolinformation.h @@ -55,21 +55,15 @@ public: int iconTypeSortOrder() const; + friend auto qHash(const SymbolInformation &information) { return information.hash(); } + private: const int m_iconType; const Utils::QHashValueType m_hash; // precalculated hash value - to speed up qHash const QString m_name; // symbol name (e.g. SymbolInformation) const QString m_type; // symbol type (e.g. (int char)) - }; -//! qHash overload for QHash/QSet -inline auto qHash(const SymbolInformation &information) -{ - return information.hash(); -} - - } // namespace Internal } // namespace ClassView |