Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26018

QVariant documentation is vague on operator==()

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • Documentation
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dm Geir Vattekar
            nathan Nathan Carter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes