4566 Commits

Author SHA1 Message Date
Nyall Dawson
22eddfd4c0 Merge pull request #5238 from nyalldawson/geometry_coverage
Geometry unit test coverage + fixes
2017-09-22 17:18:39 +10:00
Nyall Dawson
cbca7c97bc Boost test coverage of geometry classes 2017-09-22 15:41:41 +10:00
Nyall Dawson
c41dca937c Port processing combineFields to c++ 2017-09-22 15:19:32 +10:00
Nyall Dawson
b4a798e892 Setting field for QgsFieldComboBox should be case-insensitive 2017-09-22 11:39:17 +10:00
Larry Shaffer
559973739c Merge pull request #5202 from dmarteau/fix_ln_option_OSX
Execute ln command with GNU compatible options in install phase
2017-09-21 19:37:42 -06:00
Nyall Dawson
9d6d60727a Expand unit tests for compound curves 2017-09-22 09:54:23 +10:00
Nyall Dawson
f268ccc837 Expand test coverage for compound curves 2017-09-22 09:54:23 +10:00
Nyall Dawson
e7b08d520e Expand geometry test coverage 2017-09-22 09:54:23 +10:00
Nyall Dawson
c77afeda9a Expand geometry unit test coverage 2017-09-22 09:54:23 +10:00
Matthias Kuhn
9caa7224cd Merge pull request #5230 from m-kuhn/taskWaitForFinished
QgsTask::waitForFinished without event loop
2017-09-21 18:35:43 +02:00
Matthias Kuhn
8f2c885436
[travis] Disable flaky test
See https://travis-ci.org/qgis/QGIS/jobs/278224577
https://github.com/qgis/QGIS/pull/5230#issuecomment-331189552
2017-09-21 18:00:46 +02:00
Sandro Mani
59ed19fff0 [OGR] Defer repacking while in explicit updateMode 2017-09-21 14:07:39 +02:00
Sandro Mani
a67194df77 [OGR] Add orig_ogc_fid as last field to avoid changing field order 2017-09-21 11:17:12 +02:00
Sandro Mani
4ce2cf1744 [OGR] Add workaround for OGRSQL not recognizing the column name returned by OGR_L_GetFIDColumn 2017-09-21 10:50:39 +02:00
Nyall Dawson
20e1d72007 Merge pull request #5209 from nyalldawson/geometry_coverage
[WIP] Extend geometry classes unit test coverage
2017-09-19 22:15:14 +10:00
Nyall Dawson
38cc5703d7 Improve test cases 2017-09-19 21:18:06 +10:00
Matthias Kuhn
8d34023d6e Merge pull request #5216 from m-kuhn/vectorFileWriter
Make error message accessible for python in vector file writer
2017-09-19 13:17:09 +02:00
Nyall Dawson
6f5d9c94a6 Fix some leaks in geometry tests (valgrind noise) 2017-09-19 20:36:16 +10:00
Matthias Kuhn
d1d26e96b0
Fix test 2017-09-19 12:24:01 +02:00
Nyall Dawson
9526d487ad Astyle 2017-09-19 19:39:54 +10:00
Matthias Kuhn
44e32e18c0
Fix tests for new QgsVectorFileWriter python API 2017-09-19 11:00:49 +02:00
Nyall Dawson
b744820bc3 Boost test coverage of geometry classes 2017-09-19 17:22:33 +10:00
Nyall Dawson
1540448334 Boost test coverage of geometry classes 2017-09-19 17:22:33 +10:00
Nyall Dawson
bb425e4540 Cleaner signature for QgsAbstractGeometry::closestSegment 2017-09-19 17:22:33 +10:00
Nyall Dawson
1f40f62011 Expand geometry test coverage 2017-09-19 17:22:33 +10:00
Nyall Dawson
fd3a38fcd8 More tests 2017-09-19 17:22:33 +10:00
Nyall Dawson
5bb359db90 Boost test coverage of geometry classes 2017-09-19 17:22:33 +10:00
Nyall Dawson
9b6e79cd18 Expand QgsTriangle test coverage 2017-09-19 17:22:32 +10:00
Nyall Dawson
a15340fc2c Extend geometry test coverage 2017-09-19 17:22:32 +10:00
Nyall Dawson
d3db082cd2 Extend unit tests for QgsPolygonV2, QgsPoint 2017-09-19 17:22:32 +10:00
Nyall Dawson
6b07b9bbfb Extend geometry unit test coverage 2017-09-19 17:22:32 +10:00
Nyall Dawson
328fc9cb8d Consistently use unsigned int for QgsRegularPolygon 2017-09-19 17:22:32 +10:00
rldhont
10fbfb3737 [Server] WMS GetPrint refactoring - Update tests 2017-09-19 07:34:33 +02:00
rldhont
7c1d397288 [Server] WMS GetPrint refactoring 2017-09-19 07:34:33 +02:00
rldhont
bb61db2e8d [Server] test: add response content in message when it's not an image 2017-09-19 07:34:33 +02:00
Nyall Dawson
dd441f6154 [processing] A non-optional multiple enum parameter must have at
least one choice selected to be valid
2017-09-16 09:59:13 +10:00
Vincent Mora
f63c302420 [FEATURE] Add undo and redo on transaction groups (#4765)
* [FEATURE] adds undo/redo for transaction groups

[needs-docs] the undo/redo now works with transcation groups. Just check
that there is no restriction in the transaction groups doc concerning
undo.

related to #14799

The undo/redo is implemented using SAVEPOINT.

The QgsTransaction interface has been enlarged to allow savepoints
creation and management. The savepoint is destroyed on
rollbackToSavepoint to have the same behavior has the sql ROLLBACK TO
SAVEPPOINT.

To avoid the creation of a savepoint for each feature modified in bulk
editing (e.g. paste, field calculator) the logic is a bit complicated: the
savepoint is created on QgsVectorLayer::editCommandStarted and the first
actual undo command (QgsVectorLayerUndoPassthroughCommand) is
responsible for the re-creation of the savepoint in case of undo-redo.
Since the behavior must be different in case edition doesn't take place
inside an edit command, a member function has been added to
QgsVectorLayer to expose the mEditCommandActive state.

Another (commented) tricky bit is the modification of the database
structure on add/delete attributes. On undo, the attribute is removed
before the rollback to savepoint, i.e. there is a useless ALTER TABLE
issued to restore the structure just before restoring it with the
ROLLBACK TO SAVEPOINT. This is necessary to make the provider
aware of the change of structure. It could be nicer/cleaner to have a way
to reload providers metadata.

The editPaste function has also been modified to use addFeatures instead of
addFeature (plural/singular), this is at the expense of an additional "cpy"
of the clipboard in memory, but it should improve perf with postgis provider.

* fixup operator aliases
2017-09-15 14:55:43 +02:00
Martin Dobias
3d0ce5f101 Fix build with Qt 5.9 2017-09-15 10:38:23 +02:00
David Marteau
5534d743f1 Execute ln command with GNU compatible options
On some OSX macport installation, GNU commands may be used in favor
    of native commands and 'make install' fail with
         'ln: invalid option -- 'h'"

    As BSD ln support the GNU -n option as an equivalent of the -h option
    it shoud be preferred over the specific BSD option.
2017-09-15 09:27:31 +02:00
Nyall Dawson
9b112284c7 Add method to recover extent parameter CRS 2017-09-15 14:09:27 +10:00
Nyall Dawson
cfdc3c71e7 Use geometry of reproject extent parameters for more accurate clipping 2017-09-15 08:35:42 +10:00
Nyall Dawson
74565e22de Nicer display of rectangle parameter values 2017-09-15 08:34:13 +10:00
Nyall Dawson
ae8bc04b6c Allow use of Qgs(Referenced)Rectangle for processing extent parameter values
And add a new target CRS argument to parameterAsExtent. If set, and
the source CRS of the rectangle parameter can be determined, then
the returned value will be the rectangle automatically reprojected
to the desired target CRS.
2017-09-15 08:33:45 +10:00
Nyall Dawson
4ec1b4b348 [processing] Transparently map 'qgis' algorithms to 'native' algorithms
This allows us to freely move algorithms from the qgis python library
to the c++ native provider without breaking API or existing models
2017-09-14 11:41:38 +10:00
Nyall Dawson
742f3e5b4d Merge pull request #5112 from nyalldawson/locator_core
Move locator non-gui classes to core
2017-09-13 18:50:28 +10:00
Nyall Dawson
ac15df9863 Add support for updating a uri with GeoNode WFS/WMS related connection settings 2017-09-13 05:47:53 +10:00
Nyall Dawson
05e047d779 Generalize some WFS/WMS connection setting handling 2017-09-13 05:47:53 +10:00
Nyall Dawson
e1562df16b [geonode] Don't block data source manager while connecting to a server
Also add missing docstrings
2017-09-13 05:47:53 +10:00
Nyall Dawson
1a19283634 Class shuffle 2017-09-13 05:47:53 +10:00
Nyall Dawson
e6a8980b97 Run all GeoNode tests locally, but skip ones which rely on a remote server on Travis 2017-09-13 05:47:53 +10:00