QmlDesigner: Fix <=>

Change-Id: Iafbb85f80cc3cd023487359bb56c9f3738d3358c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2025-04-03 22:42:52 +02:00
parent bb7da1720e
commit 260d602d77
5 changed files with 9 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ public:
|| second.m_version.isEmpty()); || 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); return std::tie(first.m_url, first.m_type) <=> std::tie(second.m_url, second.m_type);
} }

View File

@@ -263,7 +263,7 @@ public:
return firstNode.m_internalNode == secondNode.m_internalNode; 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; return firstNode.m_internalNode <=> secondNode.m_internalNode;
} }

View File

@@ -25,7 +25,7 @@ public:
&& first.lastModified == second.lastModified; && 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; return first.sourceId <=> second.sourceId;
} }

View File

@@ -364,7 +364,7 @@ private:
, sourceId{sourceId} , sourceId{sourceId}
{} {}
friend auto operator<=>(const AliasPropertyDeclaration &first, friend std::weak_ordering operator<=>(const AliasPropertyDeclaration &first,
const AliasPropertyDeclaration &second) const AliasPropertyDeclaration &second)
{ {
return std::tie(first.typeId, first.propertyDeclarationId) return std::tie(first.typeId, first.propertyDeclarationId)
@@ -434,7 +434,8 @@ private:
== std::tie(second.typeId, second.propertyDeclarationId); == 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) return std::tie(first.typeId, first.propertyDeclarationId)
<=> std::tie(second.typeId, second.propertyDeclarationId); <=> std::tie(second.typeId, second.propertyDeclarationId);
@@ -470,7 +471,7 @@ private:
, prototypeNameId{std::move(prototypeNameId)} , 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; return first.typeId <=> second.typeId;
} }

View File

@@ -111,7 +111,7 @@ public:
&& first.sourceId == second.sourceId; && 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) return std::tie(first.sourceContextId, first.sourceId, first.id)
<=> std::tie(second.sourceContextId, second.sourceId, second.id); <=> std::tie(second.sourceContextId, second.sourceId, second.id);