diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2018-11-26 13:12:00 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2018-11-28 06:36:22 +0000 |
commit | 0b242a11b1193b74a2ab979c29e28553e47cc78e (patch) | |
tree | dd196afe9504102ac4ff0d37094a0564991baec9 /src | |
parent | 4f6e1d3d5542749e265c0d3ed0953ca66174ce49 (diff) | |
download | qtlocation-0b242a11b1193b74a2ab979c29e28553e47cc78e.tar.gz |
winrt: Remove unneeded status change callback
We do not use the native callback's result but Windows' backend will
complain if we try to set some of GeoLocator's properties while we are
registered for status changes. By removing the callback registration we
get rid of these warnings.
Change-Id: Ic3829ee438c708fb4411ba94ba1202bb427e8815
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp | 14 | ||||
-rw-r--r-- | src/plugins/position/winrt/qgeopositioninfosource_winrt_p.h | 4 |
2 files changed, 0 insertions, 18 deletions
diff --git a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp index 025a2c9c..9616b1d8 100644 --- a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp +++ b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp @@ -57,7 +57,6 @@ using namespace ABI::Windows::Foundation; using namespace ABI::Windows::Foundation::Collections; typedef ITypedEventHandler<Geolocator *, PositionChangedEventArgs *> GeoLocatorPositionHandler; -typedef ITypedEventHandler<Geolocator *, StatusChangedEventArgs *> GeoLocatorStatusHandler; typedef IAsyncOperationCompletedHandler<Geoposition*> PositionHandler; typedef IAsyncOperationCompletedHandler<GeolocationAccessStatus> AccessHandler; @@ -169,11 +168,6 @@ int QGeoPositionInfoSourceWinRT::init() &d->locator); RETURN_HR_IF_FAILED("Could not initialize native location services."); - hr = d->locator->add_StatusChanged(Callback<GeoLocatorStatusHandler>(this, - &QGeoPositionInfoSourceWinRT::onStatusChanged).Get(), - &d->statusToken); - RETURN_HR_IF_FAILED("Could not add status callback."); - hr = d->locator->put_ReportInterval(1000); RETURN_HR_IF_FAILED("Could not initialize report interval."); @@ -594,14 +588,6 @@ HRESULT QGeoPositionInfoSourceWinRT::onPositionChanged(IGeolocator *locator, IPo return S_OK; } -HRESULT QGeoPositionInfoSourceWinRT::onStatusChanged(IGeolocator*, IStatusChangedEventArgs *args) -{ - PositionStatus st; - args->get_Status(&st); - qCDebug(lcPositioningWinRT) << __FUNCTION__ << st; - return S_OK; -} - bool QGeoPositionInfoSourceWinRT::requestAccess() const { qCDebug(lcPositioningWinRT) << __FUNCTION__; diff --git a/src/plugins/position/winrt/qgeopositioninfosource_winrt_p.h b/src/plugins/position/winrt/qgeopositioninfosource_winrt_p.h index 5d291fce..4319ccae 100644 --- a/src/plugins/position/winrt/qgeopositioninfosource_winrt_p.h +++ b/src/plugins/position/winrt/qgeopositioninfosource_winrt_p.h @@ -62,7 +62,6 @@ namespace ABI { namespace Geolocation{ struct IGeolocator; struct IPositionChangedEventArgs; - struct IStatusChangedEventArgs; } } } @@ -92,9 +91,6 @@ public: HRESULT onPositionChanged(ABI::Windows::Devices::Geolocation::IGeolocator *locator, ABI::Windows::Devices::Geolocation::IPositionChangedEventArgs *args); - HRESULT onStatusChanged(ABI::Windows::Devices::Geolocation::IGeolocator*, - ABI::Windows::Devices::Geolocation::IStatusChangedEventArgs *args); - bool requestAccess() const; Q_SIGNALS: void nativePositionUpdate(const QGeoPositionInfo); |