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

qobject_cast<QContactManagerEngineV2*> always 0, so any engine always only used with v2 wrapper

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.2.x
    • 1.2.1
    • Contacts
    • None
    • 5f3e42d86f08e95979f6ab93fe35b1b4b9004391

    Description

      qobject_cast<QContactManagerEngineV2*> always returns 0.
      This seems to be caused by the (possibly) wrong usage of the Qt interface system, by using the macro DECLARE_INTERFACE directly on the subclass QContactManagerEngineV2 and not on some separate abstract class which then gets additionally inherited next to QContactManagerEngine. Ideally moc should have complained about this and not accept it.

      For more background see https://bugreports.qt.nokia.com/browse/QTBUG-20616

      That cast returning 0 also effects the loading of the engines, so as the check for the V2 will always fail (see https://www.qt.gitorious.org/qt-mobility/contacts/blobs/2808d3b/src/contacts/qcontactmanager_p.cpp#line166 ) each engine, also those implementing QContactManagerEngineV2, will only be used via the v2 wrapper.

      Bug found while extending qtcontacts-tracker to support the V2 of the QContactManagerEngine.

      Attachments

        Activity

          People

            satu.m.makela satu makela
            kossebau Friedrich W. H. Kossebau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: