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

Misleading "strong comparable" in the docs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.8.0
    • Documentation
    • None

      Consider a class like QByteArrayView:

      https://doc.qt.io/qt-6/qbytearrayview.html

      This class is strongly comparable.

      This class is strongly comparable with QByteArray and const char *.

      This class is strongly comparable with QString, QStringView, QUtf8StringView, QLatin1StringView, QChar, and char16_t.

      When comparing with string and Unicode character types, the content is interpreted as UTF-8.

      First, I don't understand why the first "strong comparable" is in italics while the other two are in bold.

      Second, it almost looks like that this class isn't comparable with itself, since we're listing a series of types. It would make more sense to extend the first entry with something like ("This class is strongly comparable: QByteArrayView objects can be compared against each other.") or something like that.

        For Gerrit Dashboard: QTBUG-134929
        # Subject Branch Project Status CR V

            treinio Topi Reiniƶ
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change