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

First-class QVariant/QMetaType support for QStringView, QByteArrayView, QAnyStringView

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0 Feature Freeze
    • Fix Version/s: None
    • Labels:
      None

      Description

      As the subject says: there's first-class support for QString/QByteArray, but not for the respective view classes.

       

      QStringView view;
      QVariant v = view; // error
      QVariant v2 = QVariant::fromValue(view); // error
      
      constexpr auto id = qMetaTypeId<QStringView>(); // error

       

      The above works with QString/QByteArray.

      Also, did something change in Qt 6 wrt queued connections? I would've said that without QMetaType support, a connection forced queued would have failed to compile, but apparently instead works fine.

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes