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:
@@ -68,6 +68,7 @@ public:
|
||||
QString toCMakeSetLine(const Utils::MacroExpander *expander = nullptr) const;
|
||||
|
||||
bool operator==(const CMakeConfigItem &o) const;
|
||||
friend Utils::QHashValueType qHash(const CMakeConfigItem &it); // needed for MSVC
|
||||
|
||||
QByteArray key;
|
||||
Type type = STRING;
|
||||
@@ -79,8 +80,6 @@ public:
|
||||
QStringList values;
|
||||
};
|
||||
|
||||
Utils::QHashValueType qHash(const CMakeConfigItem &it); // needed for MSVC
|
||||
|
||||
class CMAKE_EXPORT CMakeConfig : public QList<CMakeConfigItem>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -48,6 +48,7 @@ class CMakeFileInfo
|
||||
{
|
||||
public:
|
||||
bool operator==(const CMakeFileInfo& other) const { return path == other.path; }
|
||||
friend auto qHash(const CMakeFileInfo &info, uint seed = 0) { return info.path.hash(seed); }
|
||||
|
||||
Utils::FilePath path;
|
||||
bool isCMake = false;
|
||||
@@ -56,8 +57,6 @@ public:
|
||||
bool isGenerated = false;
|
||||
};
|
||||
|
||||
inline auto qHash(const CMakeFileInfo &info, uint seed = 0) { return info.path.hash(seed); }
|
||||
|
||||
class FileApiQtcData
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user