summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-08-06 13:17:15 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2016-11-30 12:20:58 +0000
commit4ed9e84d5933a3eeaf55ac2f39fec826f0cadad0 (patch)
tree80b60ff9e0ec7fda0ac773920eb1f231d11a0531 /tests
parentcd8880cc04b22610e835e6cc02cc16ac22ec9fae (diff)
downloadqtlocation-4ed9e84d5933a3eeaf55ac2f39fec826f0cadad0.tar.gz
Change QGeoRectangle::translate to not modify the rectangle
QGeoRectangle::translate currently modifies the rectangle if the latitudinal offset brings the rectangle out of bounds. This patch changes the behavior of the translation, clamping the latitudinal offset, and preventing changes to the rectangle geometry. Change-Id: Iedb8823bbd6e3c04ee499bb9f9945049a9590aae Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgeorectangle/tst_qgeorectangle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qgeorectangle/tst_qgeorectangle.cpp b/tests/auto/qgeorectangle/tst_qgeorectangle.cpp
index 59dc38be..06b65e86 100644
--- a/tests/auto/qgeorectangle/tst_qgeorectangle.cpp
+++ b/tests/auto/qgeorectangle/tst_qgeorectangle.cpp
@@ -1794,14 +1794,14 @@ void tst_QGeoRectangle::translate_data()
<< 20.0
<< 20.0
<< QGeoRectangle(QGeoCoordinate(90.0, -10.0),
- QGeoCoordinate(40.0, 50.0));
+ QGeoCoordinate(30.0, 50.0));
QTest::newRow("non wrapping -> south clip")
<< QGeoRectangle(QGeoCoordinate(-20.0, -30.0),
QGeoCoordinate(-80.0, 30.0))
<< -20.0
<< 20.0
- << QGeoRectangle(QGeoCoordinate(-40.0, -10.0),
+ << QGeoRectangle(QGeoCoordinate(-30.0, -10.0),
QGeoCoordinate(-90.0, 50.0));
QTest::newRow("wrapping -> non wrapping")
@@ -1826,14 +1826,14 @@ void tst_QGeoRectangle::translate_data()
<< 20.0
<< 20.0
<< QGeoRectangle(QGeoCoordinate(90.0, 150.0),
- QGeoCoordinate(40.0, -150.0));
+ QGeoCoordinate(30.0, -150.0));
QTest::newRow("wrapping -> south clip")
<< QGeoRectangle(QGeoCoordinate(-20.0, 130.0),
QGeoCoordinate(-80.0, -170.0))
<< -20.0
<< 20.0
- << QGeoRectangle(QGeoCoordinate(-40.0, 150.0),
+ << QGeoRectangle(QGeoCoordinate(-30.0, 150.0),
QGeoCoordinate(-90.0, -150.0));
}