From bbf2dab8cb7c05e3946ef5c0f205566bec1e94be Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 22 Jul 2021 07:30:51 +0200 Subject: [PATCH] CMakePM: Fix build on Windows Amends 3aa324ef1f9ff. Change-Id: Ieef98239ec4fa029da1541b15229a17beeb513f6 Reviewed-by: hjk --- src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp | 5 +++++ src/plugins/cmakeprojectmanager/cmakeconfigitem.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp index 04d4df6e692..93e6e6232af 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp @@ -472,6 +472,11 @@ bool CMakeConfigItem::operator==(const CMakeConfigItem &o) const return o.key == key && o.value == value && o.isUnset == isUnset; } +uint qHash(const CMakeConfigItem &it) +{ + return ::qHash(it.key) ^ ::qHash(it.value) ^ ::qHash(it.isUnset); +} + #if WITH_TESTS } // namespace CMakeProjectManager diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h index dc43b91cbcc..dae93455d72 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.h +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.h @@ -43,8 +43,6 @@ class Kit; namespace CMakeProjectManager { -class CMakeConfig; - class CMAKE_EXPORT CMakeConfigItem { public: @@ -80,6 +78,8 @@ public: QStringList values; }; +uint qHash(const CMakeConfigItem &it); // needed for MSVC + class CMAKE_EXPORT CMakeConfig : public QList { public: