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

QStringView-related API missing in Qt5

    XMLWordPrintable

Details

    • 8e01088b555271886424dacd14fe95b1a89bb217 (qt/qtbase/5.15)

    Description

      Some QStringView related API is missing in Qt5, compared to what Qt6 has, related to easier porting from QStringRef to QStringView:

      • QStringView::mid / left / right / chop / truncate have undefined behavior or assert when corresponding QStringRef / QString methods return an empty ref / whole string, or similar
      • QStringView::split is missing
      • QStringView comparison with const char[] is not working, requires wrapping in QLatin1String or similar
      • QStringView::toInt(...) et al missing, requiring to convert to QString first
      • QStringView::count(...) missing
      • QRegularExpression::(global)match(QStringView...) is missing
      • QString::operator+=(QStringView) / append / prepend / insert missing
      • QString::localeAwareCompare(QStringView), count missing

      Attachments

        Issue Links

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

          Activity

            People

              laknoll Lars Knoll
              con Eike Ziller
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes