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

Misleading "strong comparable" in the docs

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change