summaryrefslogtreecommitdiff
path: root/src/plugins/position/winrt
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2019-01-03 12:52:31 +0100
committerOliver Wolff <oliver.wolff@qt.io>2019-01-14 12:43:16 +0000
commit7bd6955fa1d1839f542fe6f83199e78e15f623b7 (patch)
tree008884aa36809ceb5c0eca6822923720d0d62603 /src/plugins/position/winrt
parent17457ddb657ea94408ac581958b065dc2d8711ff (diff)
downloadqtlocation-7bd6955fa1d1839f542fe6f83199e78e15f623b7.tar.gz
winrt: Do not emit error signal with NoError
Change-Id: Ic90cf82b9c07377875408d0c485aa8af987323c4 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Diffstat (limited to 'src/plugins/position/winrt')
-rw-r--r--src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp
index 0e3a4060..683b383f 100644
--- a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp
+++ b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp
@@ -280,6 +280,7 @@ void QGeoPositionInfoSourceWinRT::startUpdates()
qCDebug(lcPositioningWinRT) << __FUNCTION__;
Q_D(QGeoPositionInfoSourceWinRT);
+ setError(QGeoPositionInfoSource::NoError);
if (d->updatesOngoing)
return;
@@ -368,6 +369,7 @@ void QGeoPositionInfoSourceWinRT::requestUpdate(int timeout)
qCDebug(lcPositioningWinRT) << __FUNCTION__ << timeout;
Q_D(QGeoPositionInfoSourceWinRT);
+ setError(QGeoPositionInfoSource::NoError);
if (timeout != 0 && timeout < minimumUpdateInterval()) {
emit updateTimeout();
return;
@@ -456,7 +458,8 @@ void QGeoPositionInfoSourceWinRT::setError(QGeoPositionInfoSource::Error positio
qCDebug(lcPositioningWinRT) << __FUNCTION__ << positionError;
d->positionError = positionError;
- emit QGeoPositionInfoSource::error(positionError);
+ if (positionError != QGeoPositionInfoSource::NoError)
+ emit QGeoPositionInfoSource::error(positionError);
}
void QGeoPositionInfoSourceWinRT::reactOnError(QGeoPositionInfoSource::Error positionError)