Details
-
Task
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
None
-
Qt 4.8.0 documentation
-
f3fea329fdd4abbc2f2eec0098d0d5aae1c8cc86
Description
QVariant documentation for operator==() is so vague it's almost funny. It says: "Returns true if v1 and v2 are equal; otherwise returns false."
No way! Is that what equals means?
If I went to the documentation for operator==(), I was looking for more specifics than that. For example, if I compare QVariant(true)==QVariant("true"), is that considered equal? I suspect not, and yet I suspect QVariant("true").toBool() is true.
In short, the documentation for operator==() should define equality for variants, not just assume the reader knows what it is, especially since it's not obvious.