Details
-
Sub-task
-
Resolution: Invalid
-
P2: Important
-
None
-
None
Description
This sucks badly. It's a deep hook for overloading the == operator when comparing two objects.
In normal JavaScript, using == to compare two object references will only return true if the references are to the exact same object.
In order to make the operator "more useful" for wrapped QObjects and QVariants, we override the operator in this case and compare the underlying value instead. This is completely non-standard.
This behavior is not documented; it is unknown whether any users rely on it. Unfortunately the QtDeclarative module does rely on (and even extends the semantics of) == comparison. Need to determine the importance of that.
It's likely that dropping this patch will cause stuff to break; on the other hand, there's no way this can be upstreamed. Consider introducing an "equals" function on some prototype and advise users to switch to that one.
Proposed action: Keep the patch until alternative comparison method has been introduced.
Attachments
Issue Links
- relates to
-
QTBUG-17375 QtScript overloads comparison operator == for QObject and QVariant wrappers
-
- Closed
-