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

Pointer types in AutoConnections may fail to be queued at runtime, but work with QueuedConnection

    XMLWordPrintable

Details

    • 9483fcd68 (dev), bfea12b88 (6.5)

    Description

      Not sure if this is a bug, but it is certainly a behavior change from Qt 5.

      A pointer to a class can fail to be queued with AutoConnection with following message:

      qt.core.qobject.connect: QObject::connect: Cannot queue arguments of type 'MyType*'
      (Make sure 'MyType*' is registered using qRegisterMetaType().)
      

      If QueuedConnection is used in the connect() statement, then the signal parameters are apparently registered within the connect() statement automatically through QtPrivate::ConnectionTypes<typename SignalType::Arguments>::types();.

      Alternatively if the MyType header is included with Q_MOC_INCLUDE or there is a call to qRegisterMetaType for it, it also works with AutoConnection.

      Attachments

        1. qtbug108537.tar.gz
          1 kB
          Joni Poikelin
        For Gerrit Dashboard: QTBUG-108537
        # Subject Branch Project Status CR V

        Activity

          People

            fabiankosmale Fabian Kosmale
            poikelin Joni Poikelin
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: