48010 Commits

Author SHA1 Message Date
Matthias Kuhn
6c72d7e33b
Make doctest happy 2018-06-04 08:59:33 +02:00
Matthias Kuhn
b5b16dfaa5
Adjust docstrings 2018-06-04 08:59:33 +02:00
Matthias Kuhn
2b9ffa160f
Fix test 2018-06-04 08:59:32 +02:00
Matthias Kuhn
a016254386
Adjust tests 2018-06-04 08:59:32 +02:00
Matthias Kuhn
5b0473aabe
Invert logic
because True is not False
2018-06-04 08:59:31 +02:00
Matthias Kuhn
6a265d4a5c
Fix docstring 2018-06-04 08:59:31 +02:00
Matthias Kuhn
8be4cc6079
Advanced logic for QgsVectorLayer::hasFeatures() 2018-06-04 08:59:31 +02:00
Matthias Kuhn
6049e4074f
Make QgsVectorDataProvider::hasFeatures() final 2018-06-04 08:59:30 +02:00
Matthias Kuhn
5fb9d14ce7
QgsFeatureSource::hasFeatures() -> Yes, No, Maybe
This method allows to determine if a feature source has content or not
(or maybe).

This method works for "generator" sources as well as for "collection"
sources.

Collection sources like QgsVectorDataProvider which allow to easily and
in a cheap way determine if features are available can return
FeaturesAvailable or NoFeaturesAvailable, generators will return
FeaturesMaybeAvailable.

QgsVectorDataProvider also implements an empty() method.
2018-06-04 08:59:30 +02:00
Matthias Kuhn
3b35948ba9
Use cheap request 2018-06-04 08:59:30 +02:00
Matthias Kuhn
cb4de25001
Improve API docs 2018-06-04 08:59:29 +02:00
Matthias Kuhn
91b0fbaa50
Fix typo 2018-06-04 08:59:29 +02:00
Matthias Kuhn
94f3e13908
Add test for empty() to provider test suite 2018-06-04 08:59:28 +02:00
Matthias Kuhn
b568d6be55
Add optimized version of QgsPostgresProvider::empty() 2018-06-04 08:59:28 +02:00
Matthias Kuhn
381a7661ba
Add optimized versions of empty() to QgsVectorDataProvider 2018-06-04 08:59:27 +02:00
Matthias Kuhn
e252cc0ce9
Add empty() and emptyUnknown() to QgsFeatureSource 2018-06-04 08:59:27 +02:00
Andrea Giudiceandrea
adf5eb77cf Add vector icons to some qgs algorithms (fixes #19082) (#7149) 2018-06-04 13:32:56 +07:00
Nyall Dawson
b8ff44e63d [processing][saga] Fix error in merge vector layers
Fixes #18545
2018-06-04 15:15:46 +10:00
Nyall Dawson
1bc1790b7b [processing][SAGA] Resync kriging parameters with saga manual
And remove duplicate kriging algorithms, add tests

Fixes #18191
2018-06-04 15:05:15 +10:00
Nyall Dawson
268aa171cb [processing][saga] Fix error in raster calculator
Fixes #18751
2018-06-04 14:01:24 +10:00
Nyall Dawson
a1d46de0de [processing] Fix evaluation of vector layer references to compatible feature sources
Refs #18545
2018-06-04 13:57:06 +10:00
Nyall Dawson
433513005a [processing][SAGA] Fix missing outputs from some algorithms
Fixes #19103
2018-06-04 13:16:08 +10:00
Nyall Dawson
f6ac45a510 [processing][saga] Add unit test for reclassify values (simple) 2018-06-04 12:58:12 +10:00
Nyall Dawson
3dde95de5d [processing][SAGA] Fix broken reclassify values algorithm
Fixes #18750
2018-06-04 12:58:12 +10:00
Nyall Dawson
4b354984e8 [processing] Matrix parameter values are always 1-dimensional
Fix gui wrapper returns 2-dimensional parameters, which don't
match with the expectations of QgsProcessingParameterMatrix
2018-06-04 12:58:12 +10:00
Nyall Dawson
f85a3d6bc0 [processing][SAGA] Fix exposed output formats to include only those supported by SAGA
Refs #18908
2018-06-04 12:00:28 +10:00
Nyall Dawson
1395dc0e9c Add missing license headers 2018-06-04 11:30:32 +10:00
Nyall Dawson
23c3731121 Fix path to licensecheck in test 2018-06-04 11:30:32 +10:00
Nyall Dawson
aa55f3abcb Try to use cpanm to install licensecheck 2018-06-04 11:30:32 +10:00
Nyall Dawson
4bb572f4d0 Move licensecheck to external folder 2018-06-04 11:30:32 +10:00
Nyall Dawson
4e0845b4c6 Include licensecheck.pl script in code_layout test folder
Seems to be the only way to get this functional under Travis.

TODO: remove when Travis is upgraded to a reasonably modern
Ubuntu version
2018-06-04 11:30:32 +10:00
Nyall Dawson
48b117e0db Fail check if licensecheck missing 2018-06-04 11:30:32 +10:00
Nyall Dawson
8b44b06ea9 Install more dependencies from repos 2018-06-04 11:30:32 +10:00
Nyall Dawson
43abdf7224 Don't run tests when install modules 2018-06-04 11:30:32 +10:00
Nyall Dawson
3c274036f2 No prompts 2018-06-04 11:30:32 +10:00
Nyall Dawson
d52c698a43 Install licensecheck via cpan 2018-06-04 11:30:32 +10:00
Nyall Dawson
d16ec3e257 Add unit test for license headers 2018-06-04 11:30:32 +10:00
Nyall Dawson
bb2e15c95a More checks 2018-06-04 06:35:10 +10:00
Nyall Dawson
0af5fb9d02 [ogr] Fix combination of filterrect and filterfids ignores filterrect check 2018-06-04 06:35:10 +10:00
Nyall Dawson
4ddf58c01c Add feature source test for combination of filterfids AND filterrect
Both these conditions must be honored when set, i.e. features
with matching IDs but which fail the rect check should not be
returned.
2018-06-04 06:35:10 +10:00
Even Rouault
851319f444
Merge pull request #7151 from rouault/fix_use_after_free_at_qgis_exit
Fix use-after-free at QGIS exist, linked to QgsCoordinateTransform cache
2018-06-03 22:27:36 +02:00
Denis Rouzaud
164f662dc0 fix sipify and run 2018-06-03 11:07:09 -08:00
Denis Rouzaud
1fb02e8d83 concatenate auto_additions files with python module __init__.py.in 2018-06-03 11:07:09 -08:00
Denis Rouzaud
e5b02cd2a8 use dedicated files for auto additions 2018-06-03 11:07:09 -08:00
Denis Rouzaud
7cb18cd5f1 [sipify] allow to define python operator in headers
sipify will take care of injecting them in python/{module}/__init__.py
2018-06-03 11:07:09 -08:00
Even Rouault
6b7504d6cc
Fix use-after-free at QGIS exist, linked to QgsCoordinateTransform cache
This fixes the following warning

==23284== Invalid read of size 4
==23284==    at 0x14911DE5: pj_ctx_get_errno (pj_ctx.c:137)
==23284==    by 0x149104A9: pj_free (pj_malloc.c:188)
==23284==    by 0x88C4DD3: QgsCoordinateTransformPrivate::freeProj() (qgscoordinatetransform_p.cpp:336)
==23284==    by 0x88C29AB: QgsCoordinateTransformPrivate::~QgsCoordinateTransformPrivate() (qgscoordinatetransform_p.cpp:88)
==23284==    by 0x88BEA6E: QExplicitlySharedDataPointer<QgsCoordinateTransformPrivate>::~QExplicitlySharedDataPointer() (qshareddata.h:156)
==23284==    by 0x88B7857: QgsCoordinateTransform::~QgsCoordinateTransform() (qgscoordinatetransform.cpp:139)
==23284==    by 0x88C1827: QHashNode<QPair<QString, QString>, QgsCoordinateTransform>::~QHashNode() (qhash.h:237)
==23284==    by 0x88C18A6: QHash<QPair<QString, QString>, QgsCoordinateTransform>::deleteNode2(QHashData::Node*) (qhash.h:585)
==23284==    by 0xB9CBBF8: QHashData::free_helper(void (*)(QHashData::Node*)) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==23284==    by 0x88C0276: QHash<QPair<QString, QString>, QgsCoordinateTransform>::freeData(QHashData*) (qhash.h:621)
==23284==    by 0x88BF735: QHash<QPair<QString, QString>, QgsCoordinateTransform>::~QHash() (qhash.h:342)
==23284==    by 0x88C1F2B: QMultiHash<QPair<QString, QString>, QgsCoordinateTransform>::~QMultiHash() (qhash.h:994)
==23284==    by 0xC378369: __cxa_finalize (cxa_finalize.c:56)
==23284==    by 0x8110BB2: ??? (in /home/even/qgis/QGIS/build/output/lib/libqgis_core.so.3.1.0)
==23284==    by 0x4010DE6: _dl_fini (dl-fini.c:235)
==23284==    by 0xC377FF7: __run_exit_handlers (exit.c:82)
==23284==    by 0xC378044: exit (exit.c:104)
==23284==    by 0xC35E836: (below main) (libc-start.c:325)
==23284==  Address 0xaed0c6f0 is 0 bytes inside a block of size 32 free'd
==23284==    at 0x4C2ECF0: free (vg_replace_malloc.c:530)
==23284==    by 0x149103FD: pj_dealloc (pj_malloc.c:133)
==23284==    by 0x88C1FB0: QgsProjContextStore::~QgsProjContextStore() (qgscoordinatetransform_p.cpp:45)
==23284==    by 0xBE23DF5: (anonymous namespace)::run(void*) (atexit_thread.cc:71)
==23284==    by 0xC377FF7: __run_exit_handlers (exit.c:82)
==23284==    by 0xC378044: exit (exit.c:104)
==23284==    by 0xC35E836: (below main) (libc-start.c:325)
==23284==  Block was alloc'd at
==23284==    at 0x4C2DBF6: malloc (vg_replace_malloc.c:299)
==23284==    by 0x14911D8A: pj_ctx_alloc (pj_ctx.c:109)
==23284==    by 0x88C1F64: QgsProjContextStore::QgsProjContextStore() (qgscoordinatetransform_p.cpp:40)
==23284==    by 0x88C505B: __tls_init (qgscoordinatetransform_p.cpp:33)
==23284==    by 0x88C5131: TLS wrapper function for QgsCoordinateTransformPrivate::mProjContext (in /home/even/qgis/QGIS/build/output/lib/libqgis_core.so.3.1.0)
==23284==    by 0x88C39F6: QgsCoordinateTransformPrivate::threadLocalProjData() (qgscoordinatetransform_p.cpp:228)
==23284==    by 0x88C33BE: QgsCoordinateTransformPrivate::initialize() (qgscoordinatetransform_p.cpp:162)
2018-06-03 19:36:11 +02:00
Even Rouault
7f97a2f32a
Merge pull request #7146 from rouault/fix_18342
[OGR provider] Improve performance of subLayers(), particularly on FileGDB with the proprietary driver (fixes #18342)
2018-06-03 12:41:53 +02:00
Nyall Dawson
9115d7f2f2 Add note to use QgsApplication::authManager() 2018-06-03 15:50:23 +10:00
Even Rouault
55aa7a86be
[OGR provider] Improve performance of subLayers(), particularly on FileGDB with the proprietary driver (fixes #18342) 2018-06-03 01:35:25 +02:00
Nyall Dawson
477fb89fdf More tests 2018-06-03 09:24:35 +10:00