From 1ac1095d4d4c0a0d08c87b870d3a29243c183a43 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 5 Mar 2024 14:44:46 -0800 Subject: [PATCH] QmlDesigner: fix build with Qt 6.8 w/ the spaceship operator changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are new operator== overloads that are causing this to now be ambiguous. qlist.h: In instantiation of ‘qsizetype QtPrivate::indexOf(const QList&, const U&, qsizetype) [with V = QByteArray; U = Utils::SmallStringView; qsizetype = long long int]’: qlist.h:935:20: error: ambiguous overload for ‘operator==’ (operand types are ‘const QByteArray’ and ‘const Utils::SmallStringView’) qbytearray.h:520:5: note: candidate: ‘bool operator==(const QByteArray&, const QByteArrayView&)’ smallstringview.h:117:16: note: candidate: ‘constexpr bool Utils::operator==(SmallStringView, SmallStringView)’ Change-Id: I6818d78a57394e37857bfffd17b9ffb5101cdc5c Reviewed-by: Tim Jenssen Reviewed-by: Marco Bubke Reviewed-by: Ivan Solovev Reviewed-by: hjk --- src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index c695f488b1f..9193a1ba372 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -1718,7 +1718,7 @@ bool NodeMetaInfo::hasProperty(Utils::SmallStringView propertyName) const if constexpr (useProjectStorage()) return isValid() && bool(propertyId(*m_projectStorage, m_typeId, propertyName)); else - return isValid() && m_privateData->properties().contains(propertyName); + return isValid() && m_privateData->properties().contains(QByteArrayView(propertyName)); } PropertyMetaInfos NodeMetaInfo::properties() const