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

As a QLatin1String user, I'm puzzled that this class is a view

XMLWordPrintable

    • Icon: User Story User Story
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.4.0 Beta1
    • 6.0, 6.1, 6.2
    • None
    • Team One Foundation Sprint 52, Team A Foundation Sprint 53, Team A Foundation Sprint 54, Team A Foundation Sprint 55, Foundation PM Prioritized
    • e440fec7fc (qt/qtbase/dev) e440fec7fc (qt/tqtc-qtbase/dev)

      I must confess that I'm new to Qt and still have a lot to learn. I already like the framework and value the API consistency. Similar stuff works similar and is similarly named. However, I always stumble over the issue that QLatin1String is a view like Q(Utf8)StringView, not an owning container, as I expected. I expected the view to be called QLatin1String_View_.

      Can you please fix this inconsistency?

      But instead of porting everything like s/QLatin1String/QLatin1StringView/, please provide

      namespace Qt {
      inline namespace string_literals {
       operator""_L1
      }
      }
      

      (something I use in every project and have to define by myself), but for string literals (→QLatin1StringView) and char (→QLatin1Char).

      Once you have that, I don't care what the things those operators return are named, as I won't see it in my code anymore (only in compiler error messages, but it's been years since I saw one of those ;P). I digress.

      Thanks!

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

            sonakur Sona Kurazyan
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes