Commit 81330faa authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to Qt6 no longer doing "deep" variant comparison by default

This breaks the generated value type comparison operators.
parent 4405e749
Pipeline #182591 passed with stage
in 4 minutes and 15 seconds
......@@ -40,6 +40,14 @@ template <typename T> inline bool equals(typename parameter_type<T>::type lhs, t
return lhs == rhs;
// compare QVariant contents (no longer the default with Qt6)
template <> inline bool equals<QVariant>(const QVariant &lhs, const QVariant &rhs)
return lhs.isNull() == rhs.isNull() && (lhs.isNull() || QVariant::compare(lhs, rhs) == QPartialOrdering::Equivalent);
// QDateTime::operator== is true for two instances referring to the same point in time
// we however want to know if two instances contain exactly the same information
template <> inline bool equals<QDateTime>(const QDateTime &lhs, const QDateTime &rhs)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment