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

As a Qt user, I expect a string API that's as consistent and symmetric as reasonable between the various string classes.

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • None
    • QStringAPISymmetry
    • All

    Description

      I'm a developer who interfaces a lot with 3rd-party code that doesn't use Qt and/or maintain bindings to other programming languages, so, in general, I appreciate the new string view classes, since they allow me to pass data from said libraries or languages to Qt without conversion to QString, like in the olden days. I naturally crave to use these types in my own Qt programs, but while I expected all the const QString API to be on all of these new string classes, I found that there are quite some annoying omissions. I also don't quite understand why QLatin1String is a view and not an owner, given the relation between QString and QStringView.

      So, I guess there are two things here:

      1. complete this table with the missing types:
        Encoding Owner View Comment
        Latin-1 (x)QLatin1String (x)QLatin1StringView wrongly named atm
        UTF-8 (x)QUtf8String (/)QUtf8StringView incomplete API
        UTF-16 (/)QString (/)QStringView incomplete API on View
        any (x)QAnyString (/)QAnyStringView incomplete API on View
      2. complete the API of the classes new in Qt 6

      Thank you!

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes