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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.3.0 Feature Freeze
    • 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

            thiago Thiago Macieira
            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