forked from qt-creator/qt-creator
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:
@@ -40,6 +40,8 @@ class CommonVcsSettings : public Utils::AspectContainer
|
||||
public:
|
||||
CommonVcsSettings();
|
||||
|
||||
friend QDebug operator<<(QDebug, const CommonVcsSettings &);
|
||||
|
||||
Utils::StringAspect nickNameMailMap;
|
||||
Utils::StringAspect nickNameFieldListFile;
|
||||
|
||||
@@ -52,9 +54,6 @@ public:
|
||||
Utils::IntegerAspect lineWrapWidth;
|
||||
};
|
||||
|
||||
|
||||
QDebug operator<<(QDebug, const CommonVcsSettings &);
|
||||
|
||||
class CommonOptionsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user