13010 Commits

Author SHA1 Message Date
Nyall Dawson
4e38d0696e Documentation 2018-06-06 06:27:33 +10:00
Nyall Dawson
40a2062ec1 [python] Don't install error hook by default
This error hook should only ever be used from QGIS app, never
from standalone scripts and applications, so we should default
to not using it and only install it when initializing python
from app.

Otherwise default behavior for standalone scripts based on
PyQGIS is to silently swallow exceptions - this leaves script
developers *no clues* to go off to debug their applications,
meaning that errors which would usually take a couple of seconds
to fix become horrible exercises in frustration for those
unaware of QGIS' exception handling and the
QGIS_DISABLE_MESSAGE_HOOKS environment variable.

Refs #19111
2018-06-06 06:27:33 +10:00
Nyall Dawson
cbbe905fae [processing] Fix missing schemas in postgis destination selection panel 2018-06-06 06:27:03 +10:00
Tom Chadwin
9780068548 Avoid deprecated regex
Avoid invalid escape sequence via raw string:

`re.compile('^[^\s\(]+')` > `re.compile(r'^[^\s\(]+')`
2018-06-06 06:24:24 +10:00
Tom Chadwin
fab563fe71 Processing: avoid deprecated regex
Invalid escape sequence avoided via raw string:

`re.findall("\d+|[a-zA-Z]+", rep[0][0])` > `re.findall(r"\d+|[a-zA-Z]+", rep[0][0])`
2018-06-06 06:24:24 +10:00
Tom Chadwin
6a8a622ea4 Processing: Avoid deprecated regex
Escape sequence avoided in DefinProjection by using raw string:

`re.compile('\|.*')` > `re.compile(r'\|.*')`
2018-06-06 06:24:24 +10:00
Blottiere Paul
0e7238448a
Merge pull request #7078 from arnaud-morvan/server_proper_literal_convertion
[server] Proper convertion of literals in Filters
2018-06-05 16:22:08 +01:00
Even Rouault
370bac9935
Merge pull request #7152 from rouault/fix_memleaks_qgsstyle
Fix various memleaks in QgsStyle
2018-06-05 17:03:55 +02:00
arnaud.morvan@camptocamp.com
b07c334723 [server] Proper convertion of literals in Filters
Convert OGC Filter's literals accordings to field type.
This can have a huge impact on performance in some cases.
For example for a filter like "num_char" = '+2' converted to "num_char" = 2,
this result with PostgreSQL provider in a fallback to client side evaluation for the whole filter,
including the bbox if present.
2018-06-05 14:26:37 +02:00
Denis Rouzaud
8ef0d1f7d9 [pyqgis] add missing install of __init__.py for modules 2018-06-05 03:25:47 -08:00
Alessandro Pasotti
e3f02eac72
Merge pull request #7012 from elpaso/python-provider
Python provider QEP 122
2018-06-05 12:51:17 +02:00
Luigi Pirelli
fa7879ade1 [processing] Correct management of optional rasters in batch mode. Fixes #19115 2018-06-05 11:53:52 +02:00
Nyall Dawson
8c689b2d36 [processing] Fix create constant raster layer modifies pixel size
Fixes #18446
2018-06-05 16:15:58 +10:00
Nyall Dawson
bd0ec6e4e9 Don't use old policy for CMP0040
Seems no longer required in any case
2018-06-05 14:08:30 +10:00
Nyall Dawson
b69389b650 Run clang-tidy modernization checks 2018-06-05 12:50:39 +10:00
Nyall Dawson
8f55093642 Add some missing dox 2018-06-05 10:19:13 +10:00
Nyall Dawson
2ed144ac59 Apply clang-tidy readability-avoid-const-params-in-decls fixit
Checks whether a function declaration has parameters that are
top level const.

const values in declarations do not affect the signature of a
function, so they should not be put there.
2018-06-05 10:19:13 +10:00
Nyall Dawson
e91aed6617 [processing] Force model outputs to respect constraints set by
their underlying algorithm's provider

E.g. for model outputs generated by a saga algorithm, only
sdat and shp files are valid outputs. So only give users choices
of these instead of all formats.

Also fixes temporary file names generated as part of model
execution may use formats which are not compatible with the
algorithm's provider.

Fixes #18908
2018-06-05 10:05:32 +10:00
Nyall Dawson
8307264c3b [processing][SAGA] Avoid unicode errors when parsing description files
Fixes #19062
2018-06-05 05:25:16 +10:00
Alessandro Pasotti
a8ce494529 NULL -> nullptr in sip code 2018-06-04 18:20:48 +02:00
Alessandro Pasotti
6ece1aa543 registerProvider now returns a bool 2018-06-04 14:26:22 +02:00
Even Rouault
0304ec49b6
qgsstyle.cpp: change protected to private 2018-06-04 14:13:15 +02:00
Nyall Dawson
3b2f690d26 [processing] Also add table output for raster unique values report algorithm
Allows values to be used within models
2018-06-04 21:30:12 +10:00
Alessandro Pasotti
0430a8d59c Better comment to explain why the ref needs to be incremented 2018-06-04 11:51:11 +02:00
Matthias Kuhn
36712b9ed2
Merge pull request #7118 from m-kuhn/stringCompOperators
Cast left node to text on string comparison
2018-06-04 09:25:10 +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
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
Even Rouault
d5afc71adf
Merge branch 'master' into fix_memleaks_qgsstyle 2018-06-04 00:07:52 +02:00
Even Rouault
b21701b5d7
Add QgsStyle::cleanDefaultStyle() and use it in QgsApplication::exitQgis() 2018-06-03 21:15:22 +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
8aeb2f6d14
qgsstyle.cpp: avoid minor memleaks in use of sqlite3_mprintf() 2018-06-03 21:01:19 +02:00
Nyall Dawson
9115d7f2f2 Add note to use QgsApplication::authManager() 2018-06-03 15:50:23 +10:00
Alessandro Pasotti
3aa630ca25 Added QgsDataProvider::ProviderOptions to the bindings 2018-06-01 14:18:44 +02:00
Denis Rouzaud
dc9fb90b01 add note on how to invalidate results 2018-06-01 03:31:39 -08:00
Denis Rouzaud
a15d8903ed [locator] add a way to invalidate results from python API
otherwise if you access the config of the filter (or change app settings) from outside the main application settings dialog, results are not invalidate

for instance, if you update a URL of a service, results won't be updated
2018-06-01 03:31:39 -08:00
Alessandro Pasotti
2f41d32e98 Added test to cmake 2018-06-01 10:55:17 +02:00
Alessandro Pasotti
6f3be9fa3d SIP updates 2018-06-01 10:55:17 +02:00
Alessandro Pasotti
324fd7d522 Allow python creation of QgsFeatureIterator from an abstract one 2018-06-01 10:53:46 +02:00
Alessandro Pasotti
7ffdab2d09 Do not dec ref in methodcode 2018-06-01 10:53:46 +02:00