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>
This commit is contained in:
hjk
2021-12-06 05:11:04 +01:00
parent 8cb5c3cfdd
commit 104ea4accc
75 changed files with 461 additions and 518 deletions

View File

@@ -106,6 +106,11 @@ public:
friend VCSBASE_EXPORT QDebug operator<<(QDebug in, const VcsBasePluginState &state);
friend bool operator==(const VcsBasePluginState &s1, const VcsBasePluginState &s2)
{ return s1.equals(s2); }
friend bool operator!=(const VcsBasePluginState &s1, const VcsBasePluginState &s2)
{ return !s1.equals(s2); }
private:
friend class VcsBasePluginPrivate;
bool equals(const Internal::State &s) const;
@@ -114,13 +119,6 @@ private:
QSharedDataPointer<VcsBasePluginStateData> data;
};
VCSBASE_EXPORT QDebug operator<<(QDebug in, const VcsBasePluginState &state);
inline bool operator==(const VcsBasePluginState &s1, const VcsBasePluginState &s2)
{ return s1.equals(s2); }
inline bool operator!=(const VcsBasePluginState &s1, const VcsBasePluginState &s2)
{ return !s1.equals(s2); }
// Convenience that searches for the repository specifically for version control
// systems that do not have directories like "CVS" in each managed subdirectory
// but have a directory at the top of the repository like ".git" containing