1197 Commits

Author SHA1 Message Date
Juergen E. Fischer
e3d5a0549c fix some coverity issues 2015-02-06 21:12:18 +01:00
Sandro Santilli
e0116ef5d2 Have QCOMPARE be more verbose about failure 2015-02-06 18:47:56 +01:00
Nyall Dawson
88c928af56 Fix a bunch of (probably harmless) uninitialized variables
(improves Coverity signal-to-noise ratio)
2015-02-06 19:59:21 +11:00
Sandro Santilli
fb344ff1b6 Use a simpler image for testing composer map rotation and overview
Update expected results and configuration of new image
Add rendering anomalies, as determined by travis ubuntu 12.02
2015-02-05 19:08:11 +01:00
Nyall Dawson
73b9569386 Fix a bunch of memory leaks
...thanks Coverity, thoverity.
2015-02-05 18:30:39 +11:00
Nyall Dawson
cb5ef020f3 Avoid 'array compared against 0' error for QgsRasterLayer constructor
... by explicitly passing QString arguments. Otherwise the string
literals are implictly converted to bool and the wrong constructor
is called.

This is not an ideal solution as the API is still misleading, but I
can't see an alternative solution without breaking API and making
one of the constructors explicit or changing their signature.
2015-02-04 17:18:35 +11:00
Nyall Dawson
6e9468811e Followup 956c155: fix python errors in PAL labeling tests 2015-02-02 09:35:51 +11:00
Juergen E. Fischer
956c155e8f fix python pep8 warnings and fix some revealed errors
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \
     --exclude="ui_*.py,debian/*,python/ext-libs/*" \
     .
2015-02-01 20:46:47 +01:00
Nyall Dawson
e0adf89d80 Add some missing tests for QgsImageOperation 2015-01-27 20:53:29 +11:00
Michael Kirk
d6c969c02e test for original createFileFilter 2015-01-26 18:57:12 -08:00
Michael Kirk
262a5b2b18 test case for file filter formatter 2015-01-26 14:08:00 -08:00
Nyall Dawson
f7f89b37b9 Fix calculation of blur ops with non ARGB32_Premultiplied images 2015-01-26 14:27:20 +11:00
Martin Dobias
23c776e10d [FEATURE] New snapping mode to snap to all layers 2015-01-23 11:37:39 +07:00
Matthias Kuhn
0bdebed2c0 Test for non-custom prefix join name 2015-01-22 17:47:07 +01:00
Matthias Kuhn
7f97c31fc0 Add test for custom prefix on joins 2015-01-22 17:45:39 +01:00
Nathan Woodrow
bed278a729 Expand args for custom functions. Add auto arg count
Format test to use spaces and not tabs
2015-01-22 09:21:41 +10:00
Juergen E. Fischer
77a280eff2 fix building of app test with internal qwtpolar 2015-01-21 18:14:58 +01:00
Nyall Dawson
670ad7b809 Add gaussian blur image operation 2015-01-21 20:02:42 +11:00
Nyall Dawson
be2d6d1a70 New QgsImageOperation class for operations that modify QImages
Contains framework for multithreaded operations on QImages, and
numerous operations such as grayscale, hue/saturation, brightness/
contrast modification, flip, blur, distance transform, alpha
modification and color overlays.
2015-01-21 18:58:10 +11:00
Juergen E. Fischer
106358c46c fix windows build 2015-01-20 22:43:30 +01:00
Martin Dobias
dbe830b0bb Point locator: Use just one R-tree for indexing instead of three R-trees
The maintenance of three R-trees was too complicated, using a lot of memory
and the performance benefit was questionable :)
The approach with just one R-tree leads to much simpler code

Removed k-NN queries in the process - they were not used in QGIS code. They can be
reintroduced later, but there is not much use for them right now...
2015-01-20 18:54:07 +07:00
Martin Dobias
54e8493bc7 QgsPointLocator: make it possible to index just a part of layer 2015-01-20 10:21:55 +07:00
Martin Dobias
30684c7d57 Add support for match filtering, fix unit tests 2015-01-20 10:21:54 +07:00
Martin Dobias
81bb124741 Added vertex/edge in tolerance queries 2015-01-20 10:18:39 +07:00
Martin Dobias
e05de3f9c6 Handle updates of the layer in the point locator
This currently just invalidates the whole trees. It would be more sophisticated to do just the updates
to the existing trees - but I run into various issues with the spatial index library when doing that.
So resorting to this for the moment.
2015-01-20 10:18:39 +07:00
Martin Dobias
83770dfd9e Hook snapping utils into QGIS interface
Now the new snapping engine is ues for add feature map tool
2015-01-20 10:18:39 +07:00
Martin Dobias
1dae560c02 Added initial tests for QgsPointLocator and QgsSnappingUtils 2015-01-20 10:18:39 +07:00
Martin Dobias
5266fd97ee [FEATURE] Composer map - optionally store layer styles
There is a new check box that allows the user to tell whether a map should
keep the layer styles (it will store the state when the check box is checked).
The stored layer styles keep a snapshot of each layer's configuration
instead of just keeping name of the style.

This solves issues with styles and visibility presets in composer which were
not completely compatible.

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 6002233F59)
and commissioned to Gis3W s.a.s.
2015-01-19 15:18:55 +07:00
Juergen E. Fischer
2b58df4d3c add missed files (followup 313f2c8d) 2015-01-16 08:55:00 +01:00
Nyall Dawson
0e354957b5 Add overrides pt 2 2015-01-15 22:25:17 +11:00
Nathan Woodrow
d9042f590f Follow up 6a17a60ae2 - Fix error when passing usesgeometry to qgsfunction 2015-01-10 10:43:12 +10:00
Sandro Santilli
e2e47d71c6 Add rotate and transform(QTransform) methods to QgsGeometry
Reimplement translate in terms of transform(QTransform).
Includes new unit test for rotate() and translate() methods.
Includes sip bindings update.
2015-01-09 12:37:00 +01:00
Martin Dobias
8b5587fe13 Improve the internals of map layer style manager
- style manager is always enabled (client code does not need to distinguish between enabled/disabled state)
- layers currently active style is stored only in QgsMapLayer - in style manager it has entry with no data (avoids duplication of data)

This also solves issues with visibility presets and styles when some presets do not have stored style
2015-01-09 17:04:26 +07:00
Martin Dobias
603b3a5248 Fixed problems with style switching not always working correctly
Caused by internal storage (QByteArray) not re-adjusting its size
to new content, resulting in corrupted XML data
2015-01-08 12:08:13 +07:00
Martin Dobias
3ce9c70cc4 Merge pull request #1755 from wonder-sk/multiple-styles
[FEATURE] Support for multiple styles per map layer

Available in legend context menu in Styles sub-menu where it is possible to add/remove styles
and quickly switch between them.
2015-01-07 21:50:25 +07:00
Martin Dobias
f00f4fd7cd Style manager code cleanups 2015-01-07 19:55:25 +07:00
Martin Dobias
829f99b0b8 Initial core work on multiple styles per layer 2015-01-07 14:17:18 +07:00
Matthias Kuhn
df2cac7640 Merge pull request #1743 from naihil/master
[Qt5-compat] Change Q_WS_* macroses to Q_OS_*
2015-01-05 09:56:15 +01:00
Juergen E. Fischer
841af773e3 remove (outdated) internal spatialite 2015-01-04 16:18:01 +01:00
Juergen E. Fischer
6f8f66eb49 indentation update 2015-01-03 01:50:39 +01:00
rldhont
a0ffad2532 [FEATURE] Add get and transform geometry in Expression
In version 2.6, new keywords has been added to Expression :
* $currentfeature - returns the current feature
* $atlasfeature - returns the atlas feature
* getFeature - gets a matching feature from a layer

But I think, Expression lacks a few keywords :
* geometry - returns the feature's geometry
* transform -  returns the transformed geometry

These new keywords can be used with getFeature for some geometry tests like
 intersects, crosses, contains, etc

Tests has been added to geometry and transform in Expression
2015-01-02 12:02:55 +01:00
Juergen E. Fischer
bff64fdef9 indentation update 2014-12-30 22:47:09 +01:00
Julien Nabet
e6561cec68 Fix cppcheck reports:
[src/providers/ogr/qgsogrprovider.cpp:1071]: (error) Memory leak: oldlocale
[src/providers/ogr/qgsogrprovider.cpp:1268]: (error) Memory leak: oldlocale
[src/core/spatialite/spatialite.c:50598]: (error) Memory leak: reader
[tests/src/core/testqgscolorscheme.cpp:155]: (error) Memory leak: dummyScheme2
[src/core/spatialite/spatialite.c:40138]: (error) Memory leak: ln
2014-12-30 22:47:08 +01:00
Anatoliy Golubev
d5d4a5adeb Q_WS_* macros removed from Qt5, to determine platform use Q_OS_* macroses which exists in Qt4 and Qt5 2014-12-23 12:34:21 +03:00
Nathan Woodrow
d61bf1f70f Add lazy evaluation support to expression functions
Add if(cond, true, false) function using lazy evaluation feature
2014-12-13 15:33:09 +10:00
Radim Blazek
69b27f04be ziplayertest fix 2014-12-12 19:27:41 +01:00
Denis Rouzaud
ea33122a54 expression: more comments and test to avoid differences between operators declaration and text values 2014-12-12 15:28:57 +01:00
Sandro Santilli
917cee0510 Consider map rotation in rendering of horizontal and parallel labels
See http://hub.qgis.org/issues/11814

NOTE: the map rotation should likely be considered at LabelPlacement
      configuration rather than at rendering time

Raises pixel mismatch tolerance for background labels tests
2014-12-12 11:22:32 +01:00
Sandro Santilli
bd4087b4d3 Tweak tolerances for CanvasPoint and ComposerPdfPoint PAL tests
.. to succeed on Ubuntu 14.04.1 LTS
2014-12-12 11:09:24 +01:00
Nyall Dawson
bcc29ff5d0 Add methods to QgsDataDefined for reading and writing to XML 2014-12-10 19:53:16 +11:00