Details
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.