QmlDesigner: fix build with Qt 6.8 w/ the spaceship operator changes

There are new operator== overloads that are causing this to now be
ambiguous.

qlist.h: In instantiation of ‘qsizetype QtPrivate::indexOf(const QList<T>&, 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 <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Thiago Macieira
2024-03-05 14:44:46 -08:00
parent 4e8bdd610b
commit 1ac1095d4d

View File

@@ -1718,7 +1718,7 @@ bool NodeMetaInfo::hasProperty(Utils::SmallStringView propertyName) const
if constexpr (useProjectStorage()) if constexpr (useProjectStorage())
return isValid() && bool(propertyId(*m_projectStorage, m_typeId, propertyName)); return isValid() && bool(propertyId(*m_projectStorage, m_typeId, propertyName));
else else
return isValid() && m_privateData->properties().contains(propertyName); return isValid() && m_privateData->properties().contains(QByteArrayView(propertyName));
} }
PropertyMetaInfos NodeMetaInfo::properties() const PropertyMetaInfos NodeMetaInfo::properties() const