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:
@@ -55,23 +55,21 @@ public:
|
||||
|
||||
bool isExecutable() const;
|
||||
|
||||
friend bool operator==(const DeployableFile &d1, const DeployableFile &d2)
|
||||
{
|
||||
return d1.localFilePath() == d2.localFilePath() && d1.remoteDirectory() == d2.remoteDirectory();
|
||||
}
|
||||
|
||||
friend bool operator!=(const DeployableFile &d1, const DeployableFile &d2)
|
||||
{
|
||||
return !(d1 == d2);
|
||||
}
|
||||
friend PROJECTEXPLORER_EXPORT Utils::QHashValueType qHash(const DeployableFile &d);
|
||||
|
||||
private:
|
||||
Utils::FilePath m_localFilePath;
|
||||
QString m_remoteDir;
|
||||
Type m_type = TypeNormal;
|
||||
};
|
||||
|
||||
|
||||
inline bool operator==(const DeployableFile &d1, const DeployableFile &d2)
|
||||
{
|
||||
return d1.localFilePath() == d2.localFilePath() && d1.remoteDirectory() == d2.remoteDirectory();
|
||||
}
|
||||
|
||||
inline bool operator!=(const DeployableFile &d1, const DeployableFile &d2)
|
||||
{
|
||||
return !(d1 == d2);
|
||||
}
|
||||
|
||||
PROJECTEXPLORER_EXPORT Utils::QHashValueType qHash(const DeployableFile &d);
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user