5276 Commits

Author SHA1 Message Date
Nyall Dawson
88a839061d Restore more unit tests 2018-01-05 11:15:03 +10:00
Nyall Dawson
ec67ddfc0e Restore more atlas tests 2018-01-05 11:15:03 +10:00
Nyall Dawson
3d03128e4a Restore some more atlas related tests 2018-01-05 11:15:03 +10:00
Nyall Dawson
1b932319a2 Fix some layout expression context handling, restore some tests 2018-01-05 11:15:03 +10:00
Nyall Dawson
b6f1425828 Flesh out QgsAbstractLayoutIterator interface 2018-01-05 11:15:03 +10:00
Nyall Dawson
69ddc32d0f Restore atlas map handling 2018-01-05 11:15:03 +10:00
Nyall Dawson
3ffdda3e30 Port predefined scale handling to layouts 2018-01-05 11:15:03 +10:00
Nyall Dawson
7c086beb92 Fix some map item todos 2018-01-05 11:15:03 +10:00
Nyall Dawson
49eaebbf40 Remove outdated icon support for item metadata
Now handled in QgsLayoutItem directly
2018-01-05 11:15:03 +10:00
Nyall Dawson
2ef3a5f199 Port current geometry from atlas to layouts 2018-01-05 11:15:03 +10:00
Nyall Dawson
92003c8797 Code shuffle, to make QgsLayoutContext aware of parent QgsLayout 2018-01-05 11:15:03 +10:00
Nyall Dawson
4a7813b953 Restore picture atlas handling 2018-01-05 11:15:03 +10:00
Nyall Dawson
60a28e32b7 Add some unit tests 2018-01-05 11:15:03 +10:00
Nyall Dawson
b7596970bc Remove outdated TODO 2018-01-05 11:15:03 +10:00
Nyall Dawson
f86c2988bb Serialize atlas settings 2018-01-05 11:15:03 +10:00
Nyall Dawson
2d43dac0b5 Refine behavior of QgsGeometry equals tests
Before we had two checks - equals() and isGeosEqual() which
performed the exact same check (since equals() called the geos
equality test)

Since the geos equality test is a slow, topological test, which
considers two geometries equal if their component edges overlap,
but disregards ordering of vertices this is not always what we
want. There's also the issue that geos cannot consider m values
when testing the geometries, so two geometries with different
m values would be reported equal.

So, now calling QgsGeometry::equals performs a very fast, strict
equality test where geometries are only equal if the have exactly
the same vertices, type, and order.

And swap most code which was calling the slow geos test to instead
use the fast strict native test.
2018-01-05 09:59:22 +10:00
Nyall Dawson
13aa5211d1 Expand equality operators for QgsAbstractGeometry subclasses 2018-01-05 09:37:27 +10:00
Nyall Dawson
b904731259 Respect transform context in point locator 2018-01-04 15:04:42 +11:00
Nyall Dawson
8f15cdf680 Respect transform contexts when tracing 2018-01-04 15:04:42 +11:00
Nyall Dawson
d69f932c31 Reformat code 2018-01-04 12:27:38 +11:00
Nyall Dawson
71cdb8cf8e Fix QgsVectorLayer::updateFeature cannot add geometry to feature
with no existing geometry

Fixes #17678
2018-01-04 12:27:38 +11:00
Nyall Dawson
5ecb5603df Fix QgsVectorLayer::updateFeature returns true when errors occur
Refs #17678
2018-01-04 12:27:38 +11:00
Matthias Kuhn
6ed078c889
Merge pull request #5946 from DelazJ/nullMinMax
[needs-docs] Update min and max functions
2018-01-03 09:13:46 +01:00
Martin Dobias
6508543f5f [3d] Fix tessellator crash with nearly collinear points (fixes #17745) 2018-01-01 22:28:40 +01:00
Matthias Kuhn
a650a03f19
Merge pull request #5853 from m-kuhn/valueRelationReadonly
Value relation widget: respect readonly state
2017-12-28 08:10:44 +01:00
Matthias Kuhn
375daf1879 PEP8 2017-12-28 07:54:07 +01:00
Harrissou Sant-anna
99abc8dfb5 Revert QVERIFY change 2017-12-28 12:12:55 +11:00
Matthias Kuhn
90acb5690e Make ValueRelation test more stable 2017-12-28 00:02:16 +01:00
Matthias Kuhn
46a74a090a Add test for enabled state of relation value widget 2017-12-27 22:04:40 +01:00
Matthias Kuhn
0c292a0207 Add some more min/max tests 2017-12-27 21:46:11 +01:00
Matthias Kuhn
2e1b9ae0e4 Improve test output 2017-12-27 21:43:20 +01:00
Harrissou Sant-anna
c063710352 Add more tests 2017-12-27 21:43:20 +01:00
Harrissou Sant-anna
49a3af0034 Adding tests to min and max functions 2017-12-27 21:43:20 +01:00
Matthias Kuhn
d01f94f7ef Avoid crash with represent_value exp function
represent_value would crash when it was called via evaluate without any context specified.
2017-12-27 20:40:41 +01:00
Matthias Kuhn
a4141c7f03 Expression tests: change Q_ASSERT to QVERIFY 2017-12-27 19:53:10 +01:00
Matthias Kuhn
e552b9b2de Replace Q_ASSERT with QVERIFY in tests
Q_ASSERT's are only evaluated in debug mode. However, tests should trigger in debug or release mode.
2017-12-27 18:28:49 +01:00
Nyall Dawson
4ff72de62e
Merge pull request #5858 from lbartoletti/segment_intersection
Segment intersection
2017-12-22 21:43:13 +11:00
Nyall Dawson
e02ff050ad Fix some issues with to_interval expression function
- incorrect regex for handling values with decimal point
- fix overflow with large intervals
2017-12-22 04:41:04 +11:00
Nyall Dawson
3c7f745424
Merge pull request #5919 from nyalldawson/iter_datum
Use transform context in feature requests with destination crs set
2017-12-20 19:02:11 +11:00
Nyall Dawson
4643712a1e Fix missing transform contexts for QgsDistanceArea
QgsDistanceArea.setSourceCrs() now requires a QgsTransformContext
argument.
2017-12-20 17:37:46 +10:00
Nyall Dawson
6528f1c307 Require a transform context when setting the destination crs for
a feature request

Forces correct datum handling for these requests, and removes
a few more uses of the deprecated/datum unaware transforms.
2017-12-20 12:32:20 +10:00
Denis Rouzaud
8a5d53325c [doxygen] add test to ensure code snippet use \code command 2017-12-19 21:19:45 -04:00
Sandro Santilli
336995dc30
Allow age expression to represent time intervals above 130 years (#5914)
Uses a 64bit integer instead of 32bit one for seconds,
meaning about 584 billions of years rather than 136...

Closes #17681

Includes test
2017-12-19 19:11:13 +01:00
Nyall Dawson
54acc80d14 Indentation 2017-12-19 13:00:49 +10:00
Nyall Dawson
2007792f77 Restore layered svg export option 2017-12-19 12:06:29 +10:00
Nyall Dawson
d06e12743f Add unit test for svg export 2017-12-19 11:28:19 +10:00
Nyall Dawson
c7bd7b3d67 Add method to ensure file name string is safe 2017-12-19 10:59:27 +10:00
Nyall Dawson
7c8f4c3e12 Fix extensions not automatically added to new filenames in QgsFileWidget
Fixes a UX regression introduced by swapping dialogs to use
QgsFileWidget, where on some platforms the extension is not
automatically added for selected file names
2017-12-19 11:37:58 +11:00
Nyall Dawson
128e37eaf4 Add some extension and filter handling functions to QgsFileUtils 2017-12-19 11:37:58 +11:00
Nyall Dawson
48e6ec58e8
Merge pull request #5906 from nyalldawson/datum
Datum fixes and cleanups
2017-12-19 11:33:35 +11:00