2092 Commits

Author SHA1 Message Date
Nyall Dawson
5ae0445607 Drop doc test threshold 2016-03-16 12:39:42 +11:00
Nyall Dawson
5e08626051 Add QgsMapLayer::isSpatial() method
The current approach of testing !vl || vl->geometryType() != NoGeometry
is not intuitive and has been the source of 2 recent bugs.

Replacing these tests with the new isSpatial() function makes it
immediately obvious what is being tested. It also allows for
non-spatial plugin layers to be correctly handled by overriding
this method.
2016-03-16 12:38:16 +11:00
Nyall Dawson
96c60fdaec Workaround failing color ramp test on OSX, add some docs
Failure is odd.
c = r.stops()[0].color
self.assertEqual(c, QColor(100, 100, 40))

fails, but

s = r.stops()
self.assertEqual(s[0].color, QColor(100, 100, 40))

passes!
2016-03-16 10:10:07 +11:00
Juergen E. Fischer
7694b9a1e5 fix shadowed color ramp test 2016-03-15 20:09:38 +01:00
Juergen E. Fischer
c6d921729e python fixes:
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
  python/console/console_sci.py:547 QsciScintillaCompat?
  python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Matthias Kuhn
054894a3dc Fix failing tests 2016-03-14 23:25:28 +01:00
Juergen E. Fischer
fb3fcfa3a0 Python3/Qt5/2to3 updates:
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
2016-03-14 20:38:20 +01:00
Nyall Dawson
e72a82e04f Minor refactor of QgsDiagramLayerSettings
- add public getters and setters for variables, will make variables
private in QGIS 3.0
- avoid some memory leaks and potential crashes
- move calculation of referenced fields to diagram classes, out
of QgsVectorLayerDiagramProvider
2016-03-15 06:24:38 +11:00
Hugo Mercier
f9c736c9f8 Only filter legend nodes that are checked.
Keep unchecked legend items when filtered by expression
2016-03-14 14:17:43 +01:00
Matthias Kuhn
5676430050 Rewrite some signals to new-style 2016-03-14 08:52:06 +01:00
Sebastian Dietrich
c7e675c343 improve the test of panning the map canvas by keyboard
Verify the extent is changed after each key event.
2016-03-14 00:08:29 +01:00
Nyall Dawson
3b40e2baa5 Fix broken $x_at, $y_at functions (fix #14462), add tests 2016-03-12 20:21:05 +11:00
Sandro Santilli
73caf352cc Merge pull request #2892 from SebDieBln/Test_CanvasPanByKeyboard
added a test for panning the canvas by keyboard
2016-03-11 11:04:52 +01:00
Matthias Kuhn
8d72e9f44c Convert some asserts to self.asserXXX methods in py tests 2016-03-10 19:52:39 +01:00
Matthias Kuhn
3dc40d72c5 Conditionalize tests which depend on QtWebkit 2016-03-10 18:44:23 +01:00
Nyall Dawson
3ec16131bc Indentation 2016-03-10 10:45:19 +11:00
Nyall Dawson
80afbeda93 Use doubles instead of float for min/max layer scales 2016-03-10 10:45:19 +11:00
Nyall Dawson
0e5214cdec Don't crash when iterating empty QgsFields 2016-03-10 10:45:18 +11:00
Nyall Dawson
bb0ecf427f Fix reshape involving first/last vertex (fix #14443) 2016-03-10 07:53:23 +11:00
Nyall Dawson
3b4638ab83 Followup 01f615d 2016-03-10 07:43:25 +11:00
Nyall Dawson
01f615d0d0 Merge pull request #2888 from pvalsecc/scaleDenom
Scale based layer visibility cosmetics
2016-03-10 07:42:25 +11:00
Sebastian Dietrich
4c88fc0372 added a test for panning the canvas by keyboard 2016-03-09 15:55:55 +01:00
Nyall Dawson
f27d36cf66 Lower doxygen test threshold 2016-03-09 22:12:28 +11:00
Matthias Kuhn
8e4d5a8b69 Add const_iterator and iterator methods to QgsFields
Because using Q_FOREACH is so much easier to write than an index-based loop.
2016-03-09 12:07:33 +01:00
Patrick Valsecchi
3efc73be61 Made layers/labels visibility more consistent
Some places forgot to make the max scale inclusive.
2016-03-09 09:56:06 +01:00
Nyall Dawson
6be8d06dc6 Fix searching for symbols by tag (fix #14445), add tests 2016-03-09 15:22:34 +11:00
Nyall Dawson
ed3cb12008 [FEATURE] Parameterized svg support for composer svg images
This makes it possible to change SVG fill/outline color and outline
width when using parameterised SVG files such as those included
with QGIS (fix #10542)
2016-03-08 08:15:04 +11:00
Juergen E. Fischer
b1b7b65771 add missing include (followup a89b510) 2016-03-07 16:35:18 +01:00
Nyall Dawson
a89b51076c Merge indidividual regression1141.cpp and regression1141.cpp checks
into testqgsrasterlayer and testqgsvectorfilewriter

(slightly speeds up compiling and running tests)
2016-03-07 09:39:48 +11:00
Nyall Dawson
eb31e01a2f Move QgsCompositionChecker to core, speeds up compilation with
tests enabled
2016-03-07 09:38:36 +11:00
Juergen E. Fischer
d1743a99f9 update qgis_labelingenginev2 test mask for ubuntu xenial 2016-03-06 22:18:47 +01:00
Sandro Mani
1e90786be7 Extend TestQgsGeometry::isEmpty to also test empty geometry collection 2016-03-06 12:29:48 +01:00
Nyall Dawson
1e7eae77e1 Add extra checks to provider test:
- test that fetching subset of attributes results in nulls for
all other fields
- test that geometry is fetched by default, but empty when
NoGeometry flag is passed
2016-03-05 14:32:04 +11:00
Nyall Dawson
98a216e032 Fix handling of longlong fields in memory provider 2016-03-04 10:51:30 +11:00
Nyall Dawson
dc2f1523cd Update test mask images 2016-03-03 15:32:44 +11:00
Nyall Dawson
30449e577f Fix fetching subset of attributes with mssql (fix #14402), add test 2016-03-03 10:34:32 +11:00
Nyall Dawson
527fe9d234 Fix mssql provider test data 2016-03-03 10:31:59 +11:00
Nyall Dawson
11cebff60a Add test for clipboard logic 2016-03-01 15:02:02 +11:00
Nyall Dawson
0d2df8097b Fix clipboard handling on OSX
Clipboard was wrongly using QClipboard::Selection for storage/retrieval
when this is not available on OSX

Also improve docs
2016-03-01 15:02:02 +11:00
Nyall Dawson
7f6446afd0 [FEATURE] Use OGR to parse clipboard text so that GeoJSON (and others) can be
directly pasted into QGIS (fix #9727)
2016-03-01 15:02:02 +11:00
Nyall Dawson
3f62cd46e7 New class QgsOgrUtils w/helper functions for working with OGR features
Also includes handy function for converting a string to a QgsFeatureList
or QgsFields by using OGR to parse the string. This allows eg conversion
of GeoJSON to QgsFeatures.
2016-03-01 15:02:02 +11:00
Juergen E. Fischer
143f3d6e53 run PyQgsDistanceArea in C locale 2016-02-29 10:29:40 +01:00
Nyall Dawson
b2235938e6 [FEATURE] Add km, yards and miles to distance unit options 2016-02-28 11:24:41 +11:00
Nyall Dawson
36b1db0488 Bump tolerance in distance area test 2016-02-27 09:44:14 +11:00
Nyall Dawson
87145f753c Test mask update 2016-02-27 09:43:08 +11:00
Matthias Kuhn
c79aeba0db Python unittest.expectedFailure improvements
Raises an _UnexpectedSuccess exception
Takes a boolean parameter with a condition under which the test is
expected to fail
2016-02-26 13:40:53 +01:00
Matthias Kuhn
d8ad5a3d53 The app startup / plugin path test succeeds again 2016-02-26 13:40:39 +01:00
Nyall Dawson
b8c620a317 update test mask 2016-02-26 22:48:08 +11:00
rldhont
36b0c3c10a [BUGFIX][QGIS Server] WFS DescribeFeatureType Geometry element type
In the OGR provider, we can read:
```
Some ogr drivers (e.g. GML) are not able to determine the geometry type of a layer like this.
In such cases, we use virtual sublayers for each geometry if the layer contains
multiple geometries (see subLayers) otherwise we guess geometry type from first feature
```
It means that in DescribeFeatureType Geometry element can be describe as simple and the GML contains
simple and multi. It's not XML valid.
To fix it, for OGR provider Geometry element type is set to `gml:GeometryPropertyType`

For the next release, it will be interesting to allow users to specify whether the geometries are multi.
2016-02-26 10:08:07 +01:00
Hugo Mercier
8fc5381b72 Merge pull request #2845 from pvalsecc/column_name_validation
Remove column name validation from virtual layers queries
2016-02-26 09:50:39 +01:00