From 260d602d77958c804733caf60369cf5e52888084 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 3 Apr 2025 22:42:52 +0200 Subject: [PATCH] QmlDesigner: Fix <=> Change-Id: Iafbb85f80cc3cd023487359bb56c9f3738d3358c Reviewed-by: Thomas Hartmann --- .../qmldesigner/libs/designercore/include/import.h | 2 +- .../qmldesigner/libs/designercore/include/modelnode.h | 2 +- .../libs/designercore/projectstorage/filestatus.h | 2 +- .../libs/designercore/projectstorage/projectstorage.h | 9 +++++---- .../projectstorage/projectstoragepathwatchertypes.h | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plugins/qmldesigner/libs/designercore/include/import.h b/src/plugins/qmldesigner/libs/designercore/include/import.h index ca9bd010192..ae415e51923 100644 --- a/src/plugins/qmldesigner/libs/designercore/include/import.h +++ b/src/plugins/qmldesigner/libs/designercore/include/import.h @@ -59,7 +59,7 @@ public: || second.m_version.isEmpty()); } - friend auto operator<=>(const Import &first, const Import &second) + friend std::weak_ordering operator<=>(const Import &first, const Import &second) { return std::tie(first.m_url, first.m_type) <=> std::tie(second.m_url, second.m_type); } diff --git a/src/plugins/qmldesigner/libs/designercore/include/modelnode.h b/src/plugins/qmldesigner/libs/designercore/include/modelnode.h index 91f05a4d5ca..e9e060117ea 100644 --- a/src/plugins/qmldesigner/libs/designercore/include/modelnode.h +++ b/src/plugins/qmldesigner/libs/designercore/include/modelnode.h @@ -263,7 +263,7 @@ public: return firstNode.m_internalNode == secondNode.m_internalNode; } - friend auto operator<=>(const ModelNode &firstNode, const ModelNode &secondNode) + friend std::weak_ordering operator<=>(const ModelNode &firstNode, const ModelNode &secondNode) { return firstNode.m_internalNode <=> secondNode.m_internalNode; } diff --git a/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h b/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h index f02299fc8ac..1a29f957f6a 100644 --- a/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h +++ b/src/plugins/qmldesigner/libs/designercore/projectstorage/filestatus.h @@ -25,7 +25,7 @@ public: && first.lastModified == second.lastModified; } - friend auto operator<=>(const FileStatus &first, const FileStatus &second) + friend std::weak_ordering operator<=>(const FileStatus &first, const FileStatus &second) { return first.sourceId <=> second.sourceId; } diff --git a/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h index 7751338403e..a6206e111c2 100644 --- a/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstorage.h @@ -364,8 +364,8 @@ private: , sourceId{sourceId} {} - friend auto operator<=>(const AliasPropertyDeclaration &first, - const AliasPropertyDeclaration &second) + friend std::weak_ordering operator<=>(const AliasPropertyDeclaration &first, + const AliasPropertyDeclaration &second) { return std::tie(first.typeId, first.propertyDeclarationId) <=> std::tie(second.typeId, second.propertyDeclarationId); @@ -434,7 +434,8 @@ private: == std::tie(second.typeId, second.propertyDeclarationId); } - friend auto operator<=>(const PropertyDeclaration &first, const PropertyDeclaration &second) + friend std::weak_ordering operator<=>(const PropertyDeclaration &first, + const PropertyDeclaration &second) { return std::tie(first.typeId, first.propertyDeclarationId) <=> std::tie(second.typeId, second.propertyDeclarationId); @@ -470,7 +471,7 @@ private: , prototypeNameId{std::move(prototypeNameId)} {} - friend auto operator<=>(Prototype first, Prototype second) + friend std::weak_ordering operator<=>(Prototype first, Prototype second) { return first.typeId <=> second.typeId; } diff --git a/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragepathwatchertypes.h b/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragepathwatchertypes.h index 3490fdd391d..e7870e6bfda 100644 --- a/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragepathwatchertypes.h +++ b/src/plugins/qmldesigner/libs/designercore/projectstorage/projectstoragepathwatchertypes.h @@ -111,7 +111,7 @@ public: && first.sourceId == second.sourceId; } - friend auto operator<=>(const WatcherEntry &first, const WatcherEntry &second) + friend std::weak_ordering operator<=>(const WatcherEntry &first, const WatcherEntry &second) { return std::tie(first.sourceContextId, first.sourceId, first.id) <=> std::tie(second.sourceContextId, second.sourceId, second.id);