answered
2014-01-07 15:17:58 +0200
thp 2490 ●26 ●38 ●34 moderator
We're working hard on adding support for QtPositioning. QtPositioning became stable in Qt 5.2, the Qt we ship is something between Qt 5.1 and Qt 5.2. QtLocation is not yet stable, so we can't support that at the moment until upstream Qt makes it stable. For getting the position, QtPositioning is enough (QtLocation is used for such things as maps, place search, routing and geocoding).
To get QtPositioning supported as an official API, we need to upgrade it to Qt 5.2 (as its API is only stable from then on, our current build differs a bit from Qt 5.2, as it's been taken from an earlier development version between Qt 5.1 and Qt 5.2), which we're working on at the moment, but it can take some time. If you want to see the difference of what the package we're currently shipping has and what the (API-stable) Qt 5.2 version of Qt Positioning looks like, you can do this yourself in the following way:
git clone --recursive git://github.com/mer-packages/qtlocation.git
cd qtlocation
cd upstream
git checkout v5.2.0
cd ..
diff -ru qtlocation upstream > changes_sailfish-to-qt52.patch
(a copy of that as of today is available temporarily at http://o.thp.io/tmp/2014-01-07_changes_sailfish-to-qt52.patch for your convenience)
You see, while most of these changes are internal, some QML APIs have changed, so we cannot just allow linking and using the current version of QtPositioning, as there might be conflicts.
As a temporary, not recommended workaround, you can use GeoClue via the D-Bus API directly (but check if there's a GeoClue service manager running on the current session bus, and use QtPositioning once 5.2 is out):
http://www.freedesktop.org/software/geoclue/docs/
If I understand correctly, the problem is that those API are not yet stable in Qt version used by Sailfish. This could cause compatibility breaks in future updates, so they are simply not allowed. This will be resolved by upgrading Qt in sailfish to newer version with stable API (hopefully soon).
koudi ( 2014-01-07 12:44:49 +0200 )editYes, this is my understanding as well. I wanted to add this topic here so we can all put nice little social pressure on Jolla to accept that they are stable ;-)
After all, both have been around since QtMobility...
Ecyrd ( 2014-01-07 12:53:35 +0200 )editis there any other possibility to obtain the position without qt5-qtdeclarative-import-positioning?
mgbler ( 2014-01-07 13:53:34 +0200 )edit