1229 Commits

Author SHA1 Message Date
Sandro Santilli
10d2ce4584 Add tests for rotated map
Thanks Nyall for initial template.

Include tests for raster layers, SVG and simple markers
with data-defined or fixed rotation, parallel line labels.
2015-02-20 11:30:11 +01:00
Martin Dobias
e38b13c5d0 Fix rule-based renderer's descendants() method.
This was causing unexpected changes to rule keys on 3rd level and deeper
2015-02-19 15:45:40 +07:00
Nyall Dawson
7f2fac15dc Add some more test mask images
Also some debugging info for tests failing on certain platforms.
2015-02-19 16:24:11 +11:00
Nyall Dawson
854c0b8bab Allow use of masks for unit test control images
Masks set which pixels in the control image should be tested and
an optional tolerance for each pixel. This is done via the colors
in the mask image - white pixels are ignored, black must be an
exact match, and gray levels represent the maximum color component
deviation for that pixel.

This should replace the fragile anomaly images, in that a single
control image with a suitable mask will not be susceptible to
antialiasing differences, etc.

A new script (scripts/generate_test_mask_image.py) is included which
either creates a new mask or modifies an existing mask to handle
an acceptable rendered image.

Ultimately, masking along with multi render checks for specific
platform differences should be flexible enough to meet our needs.
2015-02-19 07:23:57 +11:00
Juergen E. Fischer
fc22bf19b1 identation update 2015-02-18 08:37:00 +01:00
Nyall Dawson
b0657b0fbc Fix unchecked return values 2015-02-18 17:35:47 +11:00
Nyall Dawson
d4f509f7a2 Avoid some mixing enum types warnings 2015-02-18 17:35:47 +11:00
Nyall Dawson
2d8feebbde Some very minor Coverity related fixes 2015-02-16 16:11:57 +11:00
Nyall Dawson
da092bf054 Coverity fixes: uninitialised members 2015-02-16 16:11:57 +11:00
Jürgen Fischer
553abbdc01 Merge pull request #1900 from mhugo/fix_spatialite2
[spatialite] Bug fixes
2015-02-14 20:58:41 +01:00
Hugo Mercier
221ba9c336 [spatialite] Fix geometry column name case sensitivity 2015-02-13 15:14:04 +01:00
Nyall Dawson
e96b204b09 Fix failing pal labeling canvas test
Make sure image dpi respects mapsettings dpi in
QgsMapRendererSequentialJob.

Also apply a workaround to avoid segfault on end of test. This
workaround probably should be moved to QgsApplication::exitQgis()
but I'll do that after release in case of regressions.
2015-02-13 06:32:37 +11:00
Nyall Dawson
1a606358c0 "Fix" failing atlas composition tests
These failing tests are actually revealing an issue with the atlas
map API, which can't be fixed without a break.

This API will be replaced for QGIS3.0 or the layout refactor work.
2015-02-12 09:19:12 +11:00
Nyall Dawson
25652e4228 More Coverity fixes 2015-02-12 07:35:40 +11:00
Hugo Mercier
12a4e7dc8e Allow to load a query-based SQLite layer without geometry 2015-02-11 17:07:36 +01:00
Juergen E. Fischer
f76d7301a3 indentation update/fix (followup 9ab22bd) 2015-02-11 13:49:07 +01:00
Nyall Dawson
47488f280d Add unit test for API documentation coverage
This test checks that the coverage of the API docs does not drop
below a preset threshold (initially set at the current doc coverage)

If new members are added without documentation, then the coverage
will drop and this test will fail. Hopefully over time we can slowly
increase this threshold until documentation coverage reaches an
acceptable level.
2015-02-11 22:22:06 +11:00
Nyall Dawson
4e0431d88b Coverity fixes (unchecked dynamic_cast) 2015-02-11 17:12:44 +11:00
Nyall Dawson
868720b7e0 Coverity null dereference fixes 2015-02-11 16:03:04 +11:00
Nyall Dawson
c253a9f623 Uninitialized variable fixes 2015-02-10 22:23:01 +11:00
Nyall Dawson
db17513287 Fix some warnings, incorrect use of abs for double values 2015-02-10 18:54:49 +11:00
Martin Dobias
68f94647fd Fix #12165 - table can't be joined multiple times 2015-02-10 14:48:22 +07:00
Juergen E. Fischer
b67daf0336 new coverity fixes 2015-02-08 19:32:50 +01:00
Juergen E. Fischer
a264a27dfb fix windows build (pow called with an integer) and comma cosmetics 2015-02-08 13:15:42 +01:00
Juergen E. Fischer
6ed695aa73 remaining cppcheck issues 2015-02-07 23:14:09 +01:00
Juergen E. Fischer
0f9397028e fix more cppcheck issues 2015-02-07 18:40:42 +01:00
Sandro Santilli
a40eca4a34 Use core support for map rotation in composer
Includes patch by Martin Dobias
See http://lists.osgeo.org/pipermail/qgis-developer/2015-January/036309.html

Fix #11912
2015-02-07 15:34:30 +01:00
Sandro Santilli
1ccf558497 Add a new visiblePolygon method to QgsMapSettings
Centralizes code to return a possible rotated map area boundaries.
Makes use of the new method from the grid decoration.

Adds new testcase for QgsMapSettings, including test for visibleExtent,
mapUnitsPerPixel and the new visiblePolygon method.
2015-02-07 15:05:00 +01:00
Juergen E. Fischer
198d8fe58f fix warnings and extra semicolons 2015-02-07 13:54:46 +01:00
Juergen E. Fischer
76b0bcfce0 again more coverity fixes 2015-02-07 09:54:11 +01:00
Nyall Dawson
5160d467cb More (probably harmless) uninitialized variables in tests 2015-02-07 13:16:03 +11:00
Juergen E. Fischer
a3668f5853 more coverity fixes 2015-02-07 02:31:42 +01:00
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