4824 Commits

Author SHA1 Message Date
Nyall Dawson
635f8ad7ca Add QgsFileUtils::findClosestExistingPath to find the closest
existing folder match for a path

E.g. if \a path is "/home/user/projects/2018/P4343"
and "/home/user/projects" exists but no "2018" subfolder
exists, then the function will return "/home/user/projects".

(Suprisingly no existing Qt method for this!)
2018-06-22 10:45:00 +10:00
Martin Dobias
4c84cfa29a Fix a memory leak in classify() + add missing annotations/docstrings
A pseudo color renderer was getting created in classify() but never deleted.

Spotted by @PeterPetrik

As a bonus switched a for loop from mixed constBegin()/end() usage to range for.
2018-06-22 05:48:46 +10:00
Denis Rouzaud
ad00020366 QgsSettings.enumValue cast to enum 2018-06-21 05:29:16 -08:00
Denis Rouzaud
01681aba89 fix missing import 2018-06-21 05:29:16 -08:00
Denis Rouzaud
7dfec1fde0 [pyqgis] add misssing QgsSettings.setEnumValue
also fix sections in enumValue and flagValue
2018-06-21 05:29:16 -08:00
Nyall Dawson
981c6686c0 Dox++ 2018-06-21 18:22:55 +10:00
Nyall Dawson
2ed547219a Add globs to information returned by QgsVectorFileWriter.supportedFiltersAndFormats 2018-06-21 18:22:55 +10:00
Denis Rouzaud
f749c521a9 use Q_ENUM for QgsLocator::Priority 2018-06-20 11:21:25 -08:00
Nyall Dawson
77d22849d9 Fix calculation of relation aggregate in virtual field with same name as related field 2018-06-20 15:23:55 +10:00
Denis Rouzaud
ff1988f11d Python __repr__ test output 2018-06-19 13:55:53 -04:00
Denis Rouzaud
763dfd2998 use SIP to define Python __repr__ rather than injections
because it's a bit more clever!
2018-06-19 07:58:26 -04:00
Denis Rouzaud
cc3e29bcc2 add __repr__ for more geometry classes and add test 2018-06-19 07:02:17 -04:00
Denis Rouzaud
ac4f508c13 create Python __repr__ methods for QgsPoint and QgsPointXY 2018-06-19 07:02:17 -04:00
Nyall Dawson
4059c9b71d Move some more common geometry methods to headers to allow compiler inlining 2018-06-19 13:16:02 +10:00
Nyall Dawson
077ecedfc5 Unit tests for QgsMessageLog 2018-06-19 06:23:58 +10:00
Nyall Dawson
949853a0e0 Add API for temporarily suppressing user notifications for
message log critical/warning messages

These messages are still logged, but the log indicator is not
modified to flag their appearance.

This allows certain error messages to be logged (e.g. on startup)
which cannot be fixed by users/developers (e.g. those caused
by upstream Qt issues, 3rd party Python libraries, etc) but
without flagging them.

Currently, we get so many of these warnings on startup that the
log indicator loses all impact, and newly introduced, VALID
errors go unnoticed/ignored.
2018-06-19 06:23:58 +10:00
Nyall Dawson
00f0583325 Fix doc test 2018-06-18 23:14:45 +10:00
Nyall Dawson
68b38b2daf Add a signal when a project is cleared 2018-06-18 23:14:45 +10:00
Nyall Dawson
4fb9091e6e QgsRectangle::intersect should use a reference, not a pointer
We never call this method using nullptrs, so there's no need
for this to be a pointer argument in the first place. And
having it a pointer encourages leaky code, such as the
leak this commit fixes in server.
2018-06-18 07:55:17 +10:00
Nyall Dawson
b643465b12 Fix build, dox++ 2018-06-17 15:09:07 +10:00
Denis Rouzaud
8503896674
[locator] add clearPreviousResults virtual method (#7256)
* [locator] add clearPreviousResults virtual method

* also clear previous results when triggering result
2018-06-16 19:04:59 -08:00
Nyall Dawson
7a9b2980ea Fix doxygen warning 2018-06-17 11:15:10 +10:00
Marco Hugentobler
e76ca64eae Consider PR feedback 2018-06-17 11:11:39 +10:00
Marco Hugentobler
49cce29268 \param instead of @param 2018-06-17 11:11:39 +10:00
Marco Hugentobler
18f0af8c23 Port dxf export improvements to QGIS 3 2018-06-17 11:11:39 +10:00
Nyall Dawson
a4c8386e88 [sipify] Replace std::numeric_limits with old style DBL_MAX/etc 2018-06-17 09:24:37 +10:00
Nyall Dawson
47e7a100d9 DBL_EPSILON -> numeric_limits 2018-06-17 09:24:37 +10:00
Nyall Dawson
ac17d300ca DBL_MAX -> std::numeric_limits 2018-06-17 09:24:37 +10:00
Matthias Kuhn
66ad9d99dd
Merge pull request #7055 from m-kuhn/wfsNoMainThreadEventLoopb
Avoid running QEventLoop on main thread (in WFS provider)
2018-06-15 08:57:50 +02:00
Nyall Dawson
f99d51175f Fix seealso links 2018-06-15 06:39:48 +10:00
Nyall Dawson
76eb29daf3 Unit tests and dox for QgsRasterIterator 2018-06-15 06:39:48 +10:00
Matthias Kuhn
402f3ffdd5
Regenerate sip with latest sipify 2018-06-14 09:54:00 +02:00
Matthias Kuhn
44e8f60a63
Add documentation 2018-06-14 09:52:28 +02:00
Matthias Kuhn
620d4d7abb
Use direct connection for NAM auth connections 2018-06-14 09:52:27 +02:00
Denis Rouzaud
3651df0727
add logMessage method to locator filter (#7222)
to discourage from using Python print()
2018-06-13 03:26:25 -08:00
Nyall Dawson
0f0a7dc64a Add QgsRasterRange::asText for a text representation of a range 2018-06-13 14:54:40 +10:00
Nyall Dawson
f934c5c09a Add overlaps test to QgsRasterRange 2018-06-13 14:54:40 +10:00
Nyall Dawson
9be729321a Minor fixes 2018-06-13 14:54:40 +10:00
Nyall Dawson
79c907bf3e Add unique_ptr variant to QgsRasterIterator::readNextRasterPart 2018-06-13 14:54:40 +10:00
Nyall Dawson
a534286c89 Since 3.4->3.2 2018-06-13 14:54:40 +10:00
Nyall Dawson
a69274ac6d Add contains check to QgsRasterRange 2018-06-13 14:54:40 +10:00
Nyall Dawson
d435a7a0fb Add bounds type handling to QgsRasterRange 2018-06-13 14:54:40 +10:00
Nyall Dawson
a2042a4ace Expose a method to Python 2018-06-13 14:54:40 +10:00
Nyall Dawson
0ab63274f6 Documentation for QgsRasterRange 2018-06-13 14:54:40 +10:00
Denis Rouzaud
e899849def
Merge pull request #7199 from 3nids/vertex_tool
vertex tool fixes
2018-06-11 19:12:15 -08:00
Denis Rouzaud
5cb86be6a2 rename some arguments and variables 2018-06-11 23:11:03 -04:00
nirvn
d1fa1508c0 followup 5c267f2: apply @wonder-sk 's comments 2018-06-11 18:23:51 +07:00
nirvn
5c267f22fb Create a QgsLayerStyleOverride and use it for the job renderer 2018-06-11 12:00:16 +07:00
Nyall Dawson
ce6ea18280 Dox and indentation updates 2018-06-11 12:55:20 +10:00
Nyall Dawson
798408b6ba Silence a clazy warning 2018-06-11 12:55:20 +10:00