summaryrefslogtreecommitdiff
path: root/src/plugins/classview/classviewsymbollocation.h
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2010-07-19 09:37:09 +0200
committerck <qt-info@nokia.com>2010-07-19 09:37:09 +0200
commit5871f2bb8181b39357cffa5677a75424151ca494 (patch)
tree435ddf63f3bfb7c009fb26a88ee68f406a880c1b /src/plugins/classview/classviewsymbollocation.h
parent2e12b0f07934bdc845a25d9c899998a466e0731c (diff)
downloadqt-creator-5871f2bb8181b39357cffa5677a75424151ca494.tar.gz
Fix compilation (workaround for probable gcc bug).
Original version looks fine to me, but fails to compile with e.g. gcc versions Ubuntu 4.4.3-4ubuntu5 and Debian 4.4.4-6. Reviewed-by: Kai Koehne Reviewed-by: kh1
Diffstat (limited to 'src/plugins/classview/classviewsymbollocation.h')
-rw-r--r--src/plugins/classview/classviewsymbollocation.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/plugins/classview/classviewsymbollocation.h b/src/plugins/classview/classviewsymbollocation.h
index b886a2470f..cc028bb002 100644
--- a/src/plugins/classview/classviewsymbollocation.h
+++ b/src/plugins/classview/classviewsymbollocation.h
@@ -54,6 +54,11 @@ public:
inline int line() const { return m_line; }
inline int column() const { return m_column; }
inline int hash() const { return m_hash; }
+ inline bool operator==(const SymbolLocation &other) const
+ {
+ return line() == other.line() && column() == other.column()
+ && fileName() == other.fileName();
+ }
private:
QString m_fileName; //!< file name
@@ -62,21 +67,15 @@ private:
int m_hash; //!< precalculated hash value for the object, to speed up qHash
};
-} // namespace Internal
-} // namespace ClassView
-
-inline bool operator==(const ClassView::Internal::SymbolLocation &a,
- const ClassView::Internal::SymbolLocation &b)
-{
- return a.line() == b.line() && a.column() == b.column() && a.fileName() == b.fileName();
-}
-
//! qHash overload for QHash/QSet
-inline uint qHash(const ClassView::Internal::SymbolLocation &location)
+inline uint qHash(const SymbolLocation &location)
{
return location.hash();
}
+} // namespace Internal
+} // namespace ClassView
+
Q_DECLARE_METATYPE(ClassView::Internal::SymbolLocation)
#endif // CLASSVIEWSYMBOLLOCATION_H