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

Outputting QVariant::User to qDebug() comes out as a random type

    XMLWordPrintable

Details

    Description

      For example:

      QApplication app(argc, argv);
      
      QVariant d = QVariant::fromValue<QJSValue>(QJSValue());
      
      qDebug() << d.type() << d;
      

      Can output:

      QVariant::QWidget* QVariant(QJSValue, )
      

      QVariant::type() does not carry full type information, it only contains QVariant::User. This is passed as is to QMetaType::typeName() which does not seem correct. Instead it could perhaps print User or Unknown.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes