Commit 0bb66932 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.TextToModelMerger: Fixing comparison of QVariant

n the case of custom types, their equalness operators are not called.
Instead the values' addresses are compared.
This is not want we want. Instead we have to cast and compare
our custom types manually.
This fixed a couple of QTC_ASSERTS.

Change-Id: I3a82b84744f9b8860b7efaeb203475bb9dba5d11
Reviewed-by: default avatarTim Jenssen <>
parent 4ca49dc9
......@@ -671,6 +671,8 @@ static inline bool smartVeryFuzzyCompare(QVariant value1, QVariant value2)
static inline bool equals(const QVariant &a, const QVariant &b)
if (a.canConvert<Enumeration>() && b.canConvert<Enumeration>())
return a.value<Enumeration>().toString() == b.value<Enumeration>().toString();
if (a == b)
return true;
if (smartVeryFuzzyCompare(a, b))
Markdown is supported
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