summaryrefslogtreecommitdiff
path: root/tests/auto/qgeopath
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2018-04-29 23:35:36 +0200
committerSamuel Gaist <samuel.gaist@edeltech.ch>2018-06-27 21:55:01 +0000
commitfafa19f90f3622878519fa9bd331d634a92f1bd9 (patch)
treecbe929a20a096abd56ae345481a211d7eed78303 /tests/auto/qgeopath
parent1518ea42bfb08fe5ea8629373c892ad30b453ed4 (diff)
downloadqtlocation-fafa19f90f3622878519fa9bd331d634a92f1bd9.tar.gz
QGeoPath: implement clear function
QGeoPath is missing a function to clear its content. This patch implements it. [ChangeLog][Positioning] QGeoPath can now be cleared directly using clearPath. Task-number: QTBUG-62875 Change-Id: I215edf180d11002c6f7e57bb10b008e935f32340 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'tests/auto/qgeopath')
-rw-r--r--tests/auto/qgeopath/tst_qgeopath.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qgeopath/tst_qgeopath.cpp b/tests/auto/qgeopath/tst_qgeopath.cpp
index 86ff137d..43028427 100644
--- a/tests/auto/qgeopath/tst_qgeopath.cpp
+++ b/tests/auto/qgeopath/tst_qgeopath.cpp
@@ -180,6 +180,10 @@ void tst_QGeoPath::path()
for (const QGeoCoordinate &c : coords) {
QCOMPARE(p.path().contains(c), true);
}
+
+ p.clearPath();
+ QCOMPARE(p.path().size(), 0);
+ QVERIFY(p.boundingGeoRectangle().isEmpty());
}
void tst_QGeoPath::width()