summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-02 03:03:13 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-02 03:03:13 +0100
commitebd9e3b1f874b5d6b062914947a3de9954862066 (patch)
tree14ba5b2db92e9e9b88c524cd641545fff9fdfdcf
parent265f2b75b86337287880290593b3c411ad5fa7a1 (diff)
parentdc384a2376a13ae2a8776ea0eda7d6e2fd088a64 (diff)
downloadqtlocation-ebd9e3b1f874b5d6b062914947a3de9954862066.tar.gz
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia0a66c229f249532e70b1548f5e618e4db4bc5ad
-rw-r--r--src/location/labs/qdeclarativenavigator.cpp18
-rw-r--r--src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp4
-rw-r--r--tests/applications/positioning_backend/widget.cpp13
-rw-r--r--tests/applications/positioning_backend/widget.h1
-rw-r--r--tests/applications/positioning_backend/widget.ui23
5 files changed, 47 insertions, 12 deletions
diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp
index 5dfdfdbe..eccfd082 100644
--- a/src/location/labs/qdeclarativenavigator.cpp
+++ b/src/location/labs/qdeclarativenavigator.cpp
@@ -44,6 +44,24 @@
QT_BEGIN_NAMESPACE
/*!
+ \qmlmodule Qt.labs.location 1.0
+ \title Qt Labs Location QML Types
+ \ingroup qmlmodules
+ \brief Provides experimental QtLocation QML types, such as \l Navigator and
+ various map objects types (not to be confused with map items).
+
+ To use this module, import the module with the following line:
+
+ \code
+ import Qt.labs.location 1.0
+ \endcode
+
+ \note These types are experimental and subject to source-incompatible changes from one
+ Qt minor release to the next, until they are ready to be moved to the stable QtLocation QML
+ module.
+*/
+
+/*!
\qmltype Navigator
\instantiates QDeclarativeNavigator
\inqmlmodule Qt.labs.location
diff --git a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp
index c3b9efaa..7df49307 100644
--- a/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp
+++ b/src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp
@@ -226,11 +226,10 @@ void QGeoPositionInfoSourceWinRT::setPreferredPositioningMethods(QGeoPositionInf
PositioningMethods previousPreferredPositioningMethods = preferredPositioningMethods();
QGeoPositionInfoSource::setPreferredPositioningMethods(methods);
if (previousPreferredPositioningMethods == preferredPositioningMethods()
- || d->initState != InitializationState::Uninitialized) {
+ || d->initState == InitializationState::Uninitialized) {
return;
}
- Q_ASSERT(d->initState != InitializationState::Initializing);
const bool needsRestart = d->positionToken.value != 0 || d->statusToken.value != 0;
if (needsRestart)
@@ -257,7 +256,6 @@ void QGeoPositionInfoSourceWinRT::setUpdateInterval(int msec)
return;
}
- Q_ASSERT(d->initState != InitializationState::Initializing);
// minimumUpdateInterval is initialized to the lowest possible update interval in init().
// Passing 0 will cause an error on Windows 10.
// See https://docs.microsoft.com/en-us/uwp/api/windows.devices.geolocation.geolocator.reportinterval
diff --git a/tests/applications/positioning_backend/widget.cpp b/tests/applications/positioning_backend/widget.cpp
index efdaebdd..3244c478 100644
--- a/tests/applications/positioning_backend/widget.cpp
+++ b/tests/applications/positioning_backend/widget.cpp
@@ -102,7 +102,9 @@ void Widget::positionTimedOut()
void Widget::errorChanged(QGeoPositionInfoSource::Error err)
{
- ui->labelErrorState->setText(err == 3 ? QStringLiteral("OK") : QString::number(err));
+ ui->labelErrorState->setText(QString::number(err));
+ m_posSource->stopUpdates();
+ ui->checkBox->setChecked(false);
}
Widget::~Widget()
@@ -126,11 +128,11 @@ void Widget::on_buttonStart_clicked()
// Either start or stop the current position info source
bool running = ui->checkBox->isChecked();
if (running) {
- m_posSource->stopUpdates();
ui->checkBox->setChecked(false);
+ m_posSource->stopUpdates();
} else {
- m_posSource->startUpdates();
ui->checkBox->setChecked(true);
+ m_posSource->startUpdates();
}
}
@@ -175,3 +177,8 @@ void Widget::on_buttonUpdateSupported_clicked()
ui->labelSupported->setText(text);
}
+
+void Widget::on_buttonResetError_clicked()
+{
+ ui->labelErrorState->setText(QStringLiteral("N/A"));
+}
diff --git a/tests/applications/positioning_backend/widget.h b/tests/applications/positioning_backend/widget.h
index b67e53b8..e0dc68fc 100644
--- a/tests/applications/positioning_backend/widget.h
+++ b/tests/applications/positioning_backend/widget.h
@@ -59,6 +59,7 @@ private slots:
void on_radioButton_4_clicked();
void on_buttonUpdateSupported_clicked();
+ void on_buttonResetError_clicked();
private:
LogWidget *log = nullptr;
diff --git a/tests/applications/positioning_backend/widget.ui b/tests/applications/positioning_backend/widget.ui
index a96a83f6..9cb1566d 100644
--- a/tests/applications/positioning_backend/widget.ui
+++ b/tests/applications/positioning_backend/widget.ui
@@ -135,11 +135,22 @@
</widget>
</item>
<item row="11" column="1">
- <widget class="QLabel" name="labelErrorState">
- <property name="text">
- <string>N/A</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="labelErrorState">
+ <property name="text">
+ <string>N/A</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonResetError">
+ <property name="text">
+ <string>Reset</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item row="10" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
@@ -199,7 +210,7 @@
<rect>
<x>43</x>
<y>21</y>
- <width>251</width>
+ <width>254</width>
<height>71</height>
</rect>
</property>