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

As a user of QAnyStringView, I'm concerned that it is not a 100% drop-in replacement for QString

    XMLWordPrintable

Details

    • 3
    • Foundation Sprint 63, Foundation Sprint 64, Foundation Sprint 65
    • 812a0d3125 (qt/qtbase/dev) 812a0d3125 (qt/tqtc-qtbase/dev)

    Description

      As an example, this works:

      void fun(const QString &);
      QDBusReply<QString> r = ~~~;
      fun(r);
      

      while this doesn't:

      void fun(QAnyStringView);
      QDBusReply<QString> r = ~~~;
      fun(r); // ERROR: no conversion from QDBusReply<QString> to QAnyStringView
      fun(r.value()); // OK
      

      Same for other such types, e.g. QProperty<QString>.

      Expected behaviour: fun(QAnyStringView) accepts everything that fun(QString) (and fun(QByteArray) would.

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes