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

QVariant implicit construction from smart pointer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.3.2, 6.0
    • None

    Description

      The following code fails to compile, as expected with an error about using the deleted QVariant(void *) contructor:

      QSharedPointer<QFile> obj(new QFile);
      QVariant var = QVariant(obj.data());
      

      However, the following code compiles and creates a QVariant containing a boolean.

      QSharedPointer<QFile> obj(new QFile);
      QVariant var = QVariant(obj);
      

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              ske Steve
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes