Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1791

QML OrganizerModel missing qRegisterMetaType

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 1.2.0
    • Organizer
    • None

    Description

      Creating a simple QML based app with QtMobility.organizer can not find any
      entries.
      Example qml-contents:

      OrganizerModel {
              id:organizerModel
              autoUpdate: true
              startPeriod: '2010-01-01'
              endPeriod:'2012-12-31'
          }
      
          ListView {
              id:organizerList
              anchors.fill: parent
              model:organizerModel
              delegate: Label {
                  text:model.item.displayLabel
              }
          }
      

      This is caused by a missing metatype (console output):
      QObject::connect: Cannot queue arguments of type 'QOrganizerAbstractRequest::State'
      (Make sure 'QOrganizerAbstractRequest::State' is registered using qRegisterMetaType().)

      I can manually add this

      qRegisterMetaType<QOrganizerAbstractRequest::State>("QOrganizerAbstractRequest::State");
      

      to the c++ application code to overcome this issue. But it isn't obvious and shouldn't be
      necessary.

      Attachments

        Activity

          People

            djcb Dirk-Jan C. Binnema
            nicolai Nicolai Hess
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: