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

QStringRef can't reference QStrings outside the first 2Gi characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.4
    • 6.2.4, 6.3.1, 6.4.0 Beta1, 6.5
    • Qt5 Compat
    • None
    • 5
    • Foundation PM Prioritized

      No-one ported QStringRef to qsizetype when QString was ported away from int, so now we're left with a QStringRef that has int size and offset members, and thus can't reference all QStrings. The only thing we can do, at this point, is document it and Q_ASSERT() when trying to construct a QStringRef that would reference a portion of QString outside the first 2Gi characters.

      Technically speaking, we need to widen the setters to accept qsizetype (to prevent narrowing at the call site), but reject offset/length pairs that are not confined to the first 2Gi of characters.

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

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes