3218 Commits

Author SHA1 Message Date
Denis Rouzaud
4505ba7a01 Ensure that QgsApplication members are usable even when no
QgsApplication instance is available

Fixes crash when using custom widgets with Qt Designer
2017-02-20 13:06:15 +01:00
Matthias Kuhn
7e6695b0a0 Expose QgsRelation to QML
API changes for consistency:
  - setRelationName has been renamed to QgsRelation::setName
  - setRelationId has been renamed to QgsRelation::setId
2017-02-20 08:45:54 +01:00
Nyall Dawson
d19e70700f Ensure all pointer variables are initialized to nullptr 2017-02-18 20:23:18 +10:00
mhugent
43277909cc Merge pull request #4130 from mhugent/wfs_gml_from_geometry
Take wfs gml directly from geometry
2017-02-17 10:51:10 +01:00
Marco Hugentobler
04475f8e32 Adapt gml3 unit tests to use <posList> instead of <coordinates> 2017-02-16 14:38:22 +01:00
Matthias Kuhn
f46b25b9f3 Merge pull request #4049 from boundlessgeo/master-SldRotationFix
Tests and fix to read sld:Rotation when does not have ogc sub tags
2017-02-16 14:34:28 +01:00
Martin Dobias
5f5c1ddb15 Use a path resolver class instead of QgsProject::instance() in map layers
A new class QgsPathResolver is introduced for conversion between absolute
and relative paths when reading/writing XML.

Cleaned up code in layer definition file support (.qlr) to better handle
relative/absolute path conversion.
2017-02-16 09:56:11 +08:00
Juergen E. Fischer
ca33329edc update some documentation references to QgsDataDefinedButton/QgsDataDefinedSymbolDialog 2017-02-15 09:22:58 +01:00
Nyall Dawson
65e2dda468 Update indentation 2017-02-15 08:48:16 +10:00
lbartoletti
3703bf7396 Move midpoint to QgsGeometryUtils 2017-02-15 08:48:12 +10:00
lbartoletti
e851b68c53 Add some utils functions for QgsPointV2 (distance3D, midpoint) 2017-02-15 08:48:08 +10:00
Nyall Dawson
3215173692 Fix failing equality operator test 2017-02-14 13:48:11 +10:00
Nyall Dawson
a30fe357f1 [FEATURE] Add a generic numeric transform assistant for easy scaling of values 2017-02-14 13:48:11 +10:00
Nyall Dawson
2aae6e42d5 If transformer set on property, allow transformer to handle null values 2017-02-14 13:48:11 +10:00
Nyall Dawson
d457a894b3 Remove QgsDataDefined
Now completely replaced by QgsProperty and the properties framework
2017-02-14 13:48:11 +10:00
Nyall Dawson
1b5bf1d289 Deprecate QgsScaleExpression
Has now been completely replaced by QgsSizeScalePropertyTransformer
2017-02-14 13:48:11 +10:00
Nyall Dawson
b376ae103c Adds methods which attempt to parse expression based properties
as property transformers
2017-02-14 13:48:11 +10:00
Nyall Dawson
edb30a2191 Merge pull request #4134 from nyalldawson/save_task
[FEATURE] Background saving of vector layers
2017-02-14 13:39:23 +10:00
Nyall Dawson
fbf99afd01 Add method to retrieve all valid srs ids from CRS databases 2017-02-14 05:49:23 +10:00
Nyall Dawson
f2ac60ab54 Merge pull request #4111 from nyalldawson/refresh_layers
[FEATURE] Allow layers to be automatically refreshed at a specified interval
2017-02-14 05:48:41 +10:00
Vincent Mora
77bf999094 Merge pull request #3905 from nextgis/25d_enhancement
[FEATURE] QGIS setting to choose default Z value
2017-02-13 09:11:27 +01:00
Nyall Dawson
35bb5c611f Flip task manager to use weak layer pointers instead of layer ids 2017-02-13 08:55:55 +10:00
Nyall Dawson
8182ec2d3d QgsFeedback can handle report progress reports 2017-02-13 08:30:29 +10:00
Nyall Dawson
4b3d4017d0 Add unit tests for QgsVectorFileWriterTask 2017-02-13 08:30:29 +10:00
Nyall Dawson
38f87a624e [FEATURE] Allow layers to be automatically refreshed at a specified interval
This allows users to set a timer interval in layer properties
for individual layers. These layers will be automatically refreshed
at a matching interval.

Canvas updates are deferred in order to avoid refreshing multiple
times if more than one layer has an auto update interval set.

Additionally, logic has been added to skip any auto redraws of
the canvas while the canvas is already being redrawn. This avoids
issues caused by setting a layer auto refresh to a shorter time than
is required to redraw the canvas.
2017-02-13 08:28:39 +10:00
Nyall Dawson
9b9d49ade9 Add unit tests for deferred layer refresh
QgsMapCanvas test is rather messy, but I can't find anyway to
avoid showing the canvas in order to get a predictable result
2017-02-13 08:27:01 +10:00
Marco Hugentobler
dedeb9cc81 Change gml test output (use xmlns instead of gml: which both is valid) 2017-02-12 16:29:45 +01:00
Nyall Dawson
9ceb6c67e8 Merge pull request #4109 from nyalldawson/db
Rename "Db"/"DB" in API to "Database"
2017-02-12 08:34:19 +10:00
Nyall Dawson
a80258f82e Fix some leaks in test suite 2017-02-08 13:16:39 +10:00
Nyall Dawson
42ec4e65e1 Fix some leaks in geometry test suite 2017-02-08 07:30:17 +10:00
Denis Rouzaud
0d1b7dc71d add missing QScintilla includes 2017-02-07 07:41:43 +01:00
Mathieu Pellerin
6f2045fd84 fix QgsProject::readNumEntry() validity check (#4112) 2017-02-07 11:32:23 +07:00
Nyall Dawson
0f5b3fd129 Merge pull request #4110 from nyalldawson/label_cache
[FEATURE] Cache labeling result to avoid unnecessary redraws when refreshing canvas
2017-02-07 14:29:32 +10:00
Nyall Dawson
61523c8124 Update label test masks following sort algorithm change
std::sort is returning a slightly different sort order when
label z order (or label cost) is equal

Given that the order in these cases is effectively arbitrary
I've updated the test masks to accept either order.
2017-02-07 14:08:02 +10:00
Nyall Dawson
3ed6f5b72a Replace deprecated qSort/qStableSort/qGreater/qLess with std:: algs 2017-02-07 12:47:00 +10:00
Nyall Dawson
337dabea4e Swap QSharedPointer to std::shared_ptr 2017-02-07 12:32:02 +10:00
Nyall Dawson
aed6c735a6 Swap QScopedPointer to std::unique_ptr
Why?
- no benefits to QScopedPointer over std::unique_ptr
- unlike QScopedPointer, std::unique_ptr has no overhead
over regular pointers
- using standard language features makes it more likely that
compilers can optimise this use and static analysers can
correctly handle code using unique_ptrs
- QScopedPointer has an (IMO) uncertain future (given that
Qt is dropping features which have become part of the c++
standard). Better to port now before wider use of QScopedPointer
in the codebase!
2017-02-07 12:08:57 +10:00
Nyall Dawson
a08137f101 Add unit tests for map renderer label caching 2017-02-07 11:24:30 +10:00
Nyall Dawson
d47d31d13c Rename "Db"/"DB" in API to "Database"
Motivations:
- consistency - we generally use expanded names, and this also
matches Qt API which uses Database instead of Db
- avoids unpredictable capitalization throughout API (mix of "Db"
and "DB")
2017-02-07 09:32:05 +10:00
alisovenko
332961f748 Add test for map edit tool. Test the correctness of getting default z. 2017-02-06 14:12:57 +03:00
Nyall Dawson
c1b5da4726 Clear cached map renders if dependent layer is removed 2017-02-06 11:35:46 +10:00
Nyall Dawson
aa392dc23a Add method to retrieve dependent layers for map renderer cached images 2017-02-06 11:27:42 +10:00
Nyall Dawson
4f7d9cddfe Merge pull request #4064 from jgrocha/delete-style-from-db-provider-postgis
Delete style from db provider postgis
2017-02-06 08:34:24 +10:00
Jorge Gustavo Rocha
8b36ad5b90 Updated Qt connections to the new style qgis/QGIS-Enhancement-Proposals#77
Changed isDeleteStyleFromDBSupported to isDeleteStyleFromDbSupported
2017-02-05 19:35:47 +00:00
Nyall Dawson
c5546b0357 Allow conversion of QgsPropertyTransfomers to expressions (when possible) 2017-02-05 20:19:12 +10:00
Nyall Dawson
a0cb64520a Merge pull request #4095 from nyalldawson/label_engine_layers
Use weak layer pointers in labeling engine
2017-02-04 15:03:20 +10:00
Nyall Dawson
11150dde3e Add additional curvepolygon with compound curve to reference geometry tests 2017-02-04 14:57:29 +10:00
Nyall Dawson
7619cba438 Fix/avoid Coverity null pointer dereference warnings 2017-02-03 09:28:02 +10:00
Nyall Dawson
f84508a35d Fix Coverity uninitialized member warnings 2017-02-03 07:11:12 +10:00
Alexander Bruy
95091d9342 Merge pull request #4062 from alexbruy/raster-provider
Use native QGIS raster API instead of GDAL API in zonal statistics
2017-02-02 10:54:03 +02:00