[SailfishDevel] qml PositionSource element gives error: QMetaMethod::invoke: Unable to handle unregistered datatype 'QGeoPositionInfo'

Aaron McCarthy aaron.mccarthy at jolla.com
Mon Jan 13 04:10:12 UTC 2014


Hi,

On Sat, 11 Jan 2014 18:08:25 christopher.lamb at thurweb.ch wrote:
> I have added a QML PositionSource element to the FirstPage of the  
> default HelloSailors new project, and call the start() method from  
> Component.onCompleted (see code snippet below mail).
> 
> When running on the Emulator I get no error:
> 
> When running on a real Jolla I get the following error:
> 
> QMetaMethod::invoke: Unable to handle unregistered datatype
> 'QGeoPositionInfo'
>
> I have the GPS enabled, I have used the maps app and agreed to the  
> licence there.

This is a problem with the Qt Geoclue positioning plugin, it fails to register 
the data type. I have submitted a fix upstream [1]. In the meantime you can 
work around it in you application by calling

qRegisterMetaType<QGeoPositionInfo>();

prior to creating a position info source.

[1] https://codereview.qt-project.org/75256

Cheers,

-- 
Aaron McCarthy


More information about the Devel mailing list