2150 Commits

Author SHA1 Message Date
Even Rouault
9fe6a9fe48 QgsOgcUtils: add support to generate WFS 1.1 and 2.0 filters
Fixes #14119: Ensure the OGC filter XML expression contains the GML namespace references
2016-04-05 21:49:45 +02:00
Even Rouault
57ae4fee25 QgsGML: expose lower level streaming parser, add handling of GML3
- Add a low-level QgsGmlStreamingParser class that doesn't do any
  network activity, but builds features from GML data in a streaming way
- Add handling of GML3 for WFS 1.1 and 2.0.
- Add tests
2016-04-05 20:51:09 +02:00
Nyall Dawson
fe54a78d60 Merge pull request #2974 from nirvn/diagram_line_unit
[diagram] add unit type setting for outlines (fixes #14614)
2016-04-05 21:56:50 +10:00
Nyall Dawson
410a43814b Allow relative links in composer labels
Allow relative links in composer labels
2016-04-05 21:37:46 +10:00
nirvn
dc5d7ab985 [diagram] make use of unit widget for diagram size 2016-04-05 15:21:54 +07:00
Nyall Dawson
ca642e44ff Add easy methods for temporarily blocking signals
- QgsSignalBlocker: RAII signal blocking class. Used for temporarily
  blocking signals from a QObject for the lifetime of QgsSignalBlocker
  object.

- easy shortcut "whileBlocking( QObject* )" function. Temporarily
  blocks signals from a QObject while calling a single method from the
  object.

  Usage:
    whileBlocking( checkBox )->setChecked( true );
    whileBlocking( spinBox )->setValue( 50 );

  No signals will be emitted when calling these methods.

based on Boojum's code from
http://stackoverflow.com/questions/3556687/prevent-firing-signals-in-qt
2016-04-05 10:50:42 +10:00
Patrick Valsecchi
f696b0a34d Allow relative links in composer labels
Now labels and HTML boxes can contain relative URLs. If we don't have
a base URL, the project file will be used as a base URL (closes #7236).

Remove the exception for the labels where the images where not
loaded (unless in in PDF or image mode). It was because of a crash. Qt didn't
like having the HTML loading to be done synchronously during painting.

Fix a leak when rendering labels.
2016-04-04 11:05:30 +02:00
elpaso
8b0b06875a Delete a blank line to make flake8 happy 2016-04-04 10:55:10 +02:00
Alessandro Pasotti
ff1764539d Merge pull request #2963 from elpaso/server-fix-qs-encoding
[SERVER] Fix encoding of query string for bindings
2016-04-04 09:20:57 +02:00
Mathieu Pellerin
541463718d [FEATURE] add outline join style to ellipse markers 2016-04-04 14:38:52 +10:00
Nyall Dawson
ae00eb965c [FEATURE] Allow expression functions to use named parameters
This commit sets the framework for allowing expression functions to
use named parameters. Ie, instead of:

clamp(1,2,3)

you can use:

clamp( min:=1, value:=2, max:=3)

This also allows arguments to be switched, eg:

clamp( value:=2, max:=3, min:=1)

Additionally, it allows for a more structured definition of function
parameters to handle optional arguments and default values for
parameters. These are currently being done using a hacky infinite
argument list.

I've utilised the postgres ':=' syntax for specifying named arguments
to avoid potential collisions which may arise with the equality test
if we re-used just the '=' operator alone.

Sponsored by North Road
2016-04-04 13:59:13 +10:00
David Adler
5fe19c5f15 merged DB2 updates
[FEATURE] New vector data provider for DB2 sources
2016-04-04 07:55:50 +10:00
Nyall Dawson
cbad546b09 Followup 99d5e4, add unit tests 2016-04-04 06:20:07 +10:00
nirvn
3a2a099c59 add simple marker join style tests 2016-04-03 11:56:47 +07:00
elpaso
5a72bc7d52 [SERVER] Fix encoding of query string for bindings
Fix an error when passing utf-8 chars in the query string
from python bindings

Adds a test for GetLegendGraphics
2016-04-01 23:59:21 +02:00
Juergen E. Fischer
4f6c271490 move new composer tests to pyqt wrappers (followup 7a8a541 and f413046) 2016-04-01 15:52:51 +02:00
Nyall Dawson
38fa2980ad [composer] Fix polylines would be removed if they had < 3 points
when deleting nodes (2 node lines should be allowed)
2016-04-01 14:23:19 +11:00
Blottiere Paul
7a8a5411e0 [FEATURE][composer] Add tools for drawing polygon and polylines 2016-04-01 11:05:03 +11:00
Matthias Kuhn
18cdad9956 Convert print function to py3 style in tests 2016-03-31 17:20:53 +02:00
Nyall Dawson
befa962b30 Update legend test mask images for Windows build 2016-03-31 16:46:30 +11:00
Nyall Dawson
9e759efc2c Fix PyQgsVirtualLayerDefinition test on Windows 2016-03-31 16:46:11 +11:00
Nyall Dawson
cb149107b6 Fix qgis_coordinatereferencesystemtest with GDAL >= 2.0 2016-03-31 16:45:44 +11:00
Nyall Dawson
810fb5b165 Fix qgsrasterlayer tests under GDAL >= 2.0 2016-03-31 16:45:29 +11:00
Nyall Dawson
9dd791da01 Fix composer_label tests under Windows 2016-03-31 16:44:43 +11:00
Matthias Kuhn
46162f2145 Remove expected failure from test 2016-03-30 13:47:38 +02:00
Nyall Dawson
9104704f59 [composer] Set base stylesheet of composer labels to match the
label font and margins when rendering as HTML.

This allows interactive choice of font, margins and colors and
avoids the need to manually set these with CSS within the
label HTML code.
2016-03-30 19:35:34 +11:00
Nyall Dawson
6526cf5a86 New QgsFontUtils::asCSS method for converting a QFont to a CSS
string representation (as close as possible)
2016-03-30 19:35:34 +11:00
Nyall Dawson
402ee9d4cf Fix missing features when combining FilterExpression requests with
subsets of attributes and the filter expression requires fields
which are not included in the attribute subset

Note: I've only fixed the providers which implement the vector
provider conformance unit tests. Other providers (eg GRASS) should
also implement a similar fix.
2016-03-30 16:31:55 +11:00
Matthias Kuhn
fbc2a4ee7a Fix locale problems in PyQgsAppStartup test 2016-03-29 08:20:44 +02:00
Matthias Kuhn
0cc7ae0ff4 Inlcude PyQgsAppStartup test on Qt5 2016-03-29 08:20:43 +02:00
Matthias Kuhn
a129f190b8 Improve debug output of app startup test 2016-03-29 08:20:43 +02:00
Matthias Kuhn
e133b42896 Enable console with Python3 / PyQt5 2016-03-29 08:20:43 +02:00
Nyall Dawson
af8c1667df Fix QgsFieldExpressionWidget reporting field names with spaces as
invalid, add tests
2016-03-29 11:04:49 +11:00
Matthias Kuhn
e922ba37fb Merge pull request #2942 from rouault/missing_sqlite3_include_tests_analysis
Add missing SQLITE3_INCLUDE_DIR in tests/src/analysis/CMakeLists.txt
2016-03-27 11:00:27 +02:00
Even Rouault
6ac13988b1 Make QgsVectorDataProvider::fillMinMaxCache() handle LongLong
The code currently fallbacks to dealing with LongLong fields as
strings, which breaks the ProviderTestCase testMinValue() and
testMaxValue() tests, if we change the definition of the tests
of the memory provider to use a int8 field for the cnt field.

======================================================================
FAIL: testMaxValue (__main__.TestPyQgsMemoryProviderIndexed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/even/qgis-git/Quantum-GIS.clean/tests/src/python/providertestbase.py", line 349, in testMaxValue
    self.assertEqual(self.provider.maximumValue(1), 400)
AssertionError: u'400' != 400

======================================================================
FAIL: testMinValue (__main__.TestPyQgsMemoryProviderIndexed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/even/qgis-git/Quantum-GIS.clean/tests/src/python/providertestbase.py", line 345, in testMinValue
    self.assertEqual(self.provider.minimumValue(1), -200)
AssertionError: u'-200' != -200
2016-03-25 17:48:52 +01:00
Juergen E. Fischer
8af5edce12 pyqtwrapper: update some remaining scripts 2016-03-25 10:42:17 +01:00
Jürgen Fischer
0d21e640a9 Merge pull request #2944 from rouault/fix_crash_on_invalid_spatialite_iterator
[Spatialite] Fix crash on iterator closing if connection failed.
2016-03-24 20:21:11 +01:00
Juergen E. Fischer
ea4a0e27d9 testqgswcspublicservers: also update network timeout (followup 3894159) 2016-03-24 18:39:00 +01:00
Even Rouault
2b15eaa14d [Spatialite] Fix crash on iterator closing if connection failed.
If an iterator fails to open the spatialite database (mHandle == nullptr
in QgsSpatiaLiteFeatureIterator::QgsSpatiaLiteFeatureIterator() ),
a crash will occur at the destruction of the QgsSpatiaLiteFeatureSource,
due to the iterator not being removed from the list of active iterators.

Currently QgsSpatiaLiteFeatureIterator::close() does not call
iteratorClosed() if mHandle is invalid, which later causes
QgsAbstractFeatureSource::~QgsAbstractFeatureSource() to try calling
the close() method of a now defunct iterator.

If not applying the patch, the added test case crashes with:

177: src/providers/spatialite/qgsspatialiteconnection.cpp: 736: (openDb) [1ms] New sqlite connection for /tmp/test.sqlite.corrupt
177: src/providers/spatialite/qgsspatialiteconnection.cpp: 750: (openDb) [1ms] Failure while connecting to: /tmp/test.sqlite.corrupt
177:
177: invalid metadata tables
177: src/core/qgsfeaturerequest.cpp: 259: (~QgsAbstractFeatureSource) [0ms] closing active iterator
177: CMake Error at PyQgsSpatialiteProvider.cmake:22 (MESSAGE):
177:   Test failed: Segmentation fault
2016-03-24 18:37:17 +01:00
Even Rouault
2c6d4ba35e Add missing SQLITE3_INCLUDE_DIR in tests/src/analysis/CMakeLists.txt
For OSM test
2016-03-24 16:29:50 +01:00
Matthias Kuhn
f669af06fa Fix indentation 2016-03-24 06:48:23 +01:00
Matthias Kuhn
a46efeea69 Some style improvements for test 2016-03-23 23:33:03 +01:00
Matthias Kuhn
f197b7cac4 Merge pull request #2934 from rouault/missing_sqlite3_include
Add missing SQLITE3_INCLUDE_DIR in a few components
2016-03-22 13:15:07 +01:00
Matthias Kuhn
e6939b8aee Merge pull request #2921 from m-kuhn/py33
Python 3.3 and future
2016-03-22 11:12:57 +01:00
Stéphane Brunner
1f9f133e4d Add way to regenerate the list 2016-03-22 09:29:01 +01:00
Stéphane Brunner
3b4a250c64 Ignore None signature 2016-03-22 09:29:01 +01:00
Stéphane Brunner
aa68834156 Change acceptable missing doxygen from count to list
To have only the concerned members in the errors
2016-03-22 09:29:01 +01:00
Stéphane Brunner
ae6bdb9183 Remove no more needed acceptable values in test_qgssipcoverage.py 2016-03-22 09:28:40 +01:00
Matthias Kuhn
02c5637155 py2/py3 compat patches 2016-03-22 09:17:16 +01:00
Even Rouault
9fcc246cf7 Add missing SQLITE3_INCLUDE_DIR in a few components
Those components depend on sqlite3.h, but fails to add
explictly its paths, relying on it to be present in the other used
included paths, which may be not always the case in some setups.

This is a follow-up of 455a473a287ef278bbd7d91d13313cf43710c1da on
a clean build.
2016-03-21 18:36:51 +01:00