Sandro Santilli
6365eb7ee6
Do not hard-code database connection parameters
...
Rely on libpq defaults instead (overridable via environment)
Fixes #14308
2016-02-16 15:28:19 +01:00
Juergen E. Fischer
42bc938700
add QgsCredentialsNone to not return any credentials and make it default instead of QgsCredentialsConsole ( fixes #14269 ; reverts f8d2091)
2016-02-16 10:45:58 +01:00
Nyall Dawson
13c5848e5e
Fix deselecting null category when categorising using expression
...
hides all features (fix #14273 )
2016-02-16 13:19:36 +11:00
Nyall Dawson
4094bae960
Respect project ellipsoid and unit settings in virtual fields
...
Fix #12622 , #4252
2016-02-16 12:12:40 +11:00
Nyall Dawson
2265eb90ec
"Fix" QgsDistanceArea test on OSX
...
Test has revealed that the current algorithm used for ellipsoidal
calculations is unstable when measuring small very areas (eg < 1m2)
For now, modify the test to use larger areas
2016-02-16 12:11:27 +11:00
Juergen E. Fischer
f8d2091255
avoid credentials requests in PyQgsPostgresProvider
2016-02-16 00:34:14 +01:00
Sandro Santilli
ab580fbd0e
Do not hard-code database connection parameters
...
Rely on libpq defaults instead (overridable via environment)
2016-02-15 18:17:34 +01:00
Hugo Mercier
942c5e5f73
Fix virtual layer file name handling (in Windows)
2016-02-15 16:44:17 +01:00
Nyall Dawson
479d90a5ce
Make measure tool respect project area unit setting
...
Also add unit tests for measure tool length and area measurement
to ensure they return the same results as field calculator
and identify tool
Refs #13209 , #4252
2016-02-15 17:26:16 +11:00
Nyall Dawson
6dc0b6910f
Move handling of angular units to QgsUnitTypes, swap angle and distance
...
radio buttons to combo boxes in options dialog for consistency with
project properties
2016-02-15 15:22:30 +11:00
Nyall Dawson
dfdcec8922
Fix project unit confusion (pt 3): add area unit settings with a
...
ton of available area units (eg m2, km2, mi2, ft2, yd2, ha, ac,
etc)
Adds a new option in both the QGIS setting and project properties to
set the units used for area measurements. Just like the distance
setting, this defaults to the units set in QGIS options, but can
then be overridden for specific projects.
The setting is respected for area calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values
Also adds unit tests to ensure that area calculated by attribute table
update bar, field calculator and identify tool are consistent wrt
ellipsoidal calculations and area units.
TODO: make measure tool respect area setting
(refs #13209 , #4252 and fixes #12939 , #2402 , #4857 )
2016-02-15 12:47:36 +11:00
Nyall Dawson
35c2d185fb
Add square nautical miles as a supported areal unit, add API
...
method for converting a distance unit to corresponding area unit
2016-02-15 12:47:36 +11:00
Juergen E. Fischer
5d989abd6f
fix parsing of IS NOT and NOT LIKE, NOT ILIKE and dumping of IS (NOT ...) ( fixes #13938 )
2016-02-14 23:44:06 +01:00
Nyall Dawson
1f2cc3d051
Revert deprecation of QgsSymbolV2Utils::encode/decodeOutputUnit
...
...as it causes circular dependancies. Defer to 3.0 when we can
move QgsSymbolV2::OutputUnit to QgsUnitTypes
2016-02-15 07:24:35 +11:00
Nyall Dawson
ddbdcf8ab1
Fix project unit confusion (pt 2): add project distance unit setting
...
Adds a new option in project properties to set the units used for
distance measurements. This setting defaults to the units set in
QGIS options, but can then be overridden for specific projects.
The setting is respected for length and perimeter calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values
- Default unit shown in measure dialog
Also adds unit tests to ensure that length and perimeter calculated
by attribute table update bar, field calculator and identify tool
are consistent wrt ellipsoidal calculations and distance units.
(refs #13209 , #12939 , #2402 , #4857 , #4252 )
2016-02-14 21:04:41 +11:00
Nyall Dawson
17a29f90d6
Add area units to QgsUnitTypes (refs #13209 )
2016-02-14 14:57:38 +11:00
Juergen E. Fischer
a90be95f7b
sip sync
2016-02-14 03:50:49 +01:00
Nyall Dawson
9f772bce29
Add API call for setting preferred distance unit for QgsExpression
...
(refs #13209 , #12939 , #4857 )
2016-02-13 11:36:51 +11:00
Nyall Dawson
9e2890dad4
Fix (harmless) Coverity warnings
2016-02-13 07:29:57 +11:00
Nyall Dawson
356719144c
Fix failing expression test on OSX
2016-02-13 07:13:47 +11:00
Nyall Dawson
c50033bbaa
Misc optimisations suggested by clazy
...
- avoid Q_FOREACH( ..., QMap.values() ) as it allocates an unnecessary
list
- use .endsWith( ... , Qt::CaseInsensitive) instead of
.lower().endsWith( ... ) as it avoids an extra QString allocation
2016-02-12 20:54:25 +11:00
Nyall Dawson
229ef29170
If no geomCalculator is set for QgsExpression, perform cartesian
...
calculations for $length, $area, $perimeter (refs #13209 )
ie, the default is now to use planimeteric calculations unless
a geomCalculator has been explicitly set
2016-02-12 20:54:25 +11:00
Hugo Mercier
6bbe3b93a2
Fix DependencySorter.sortedLayerIds. Fixes #14281
2016-02-12 09:16:46 +01:00
Juergen E. Fischer
294f033b81
adapt wfs capabilities test data to d11c689e
2016-02-10 09:54:40 +01:00
Sandro Santilli
e8be21ad61
Add test for premature WKB end in QgsGeometry::asWkt
...
See #14182
2016-02-09 14:20:07 +01:00
Juergen E. Fischer
2ea3d7744d
port more WKB parsing to Qgs(Const)WkbPtr including bounds checking
2016-02-09 14:20:07 +01:00
Juergen E. Fischer
ded1ebb33b
indentation fixes
2016-02-09 14:19:13 +01:00
Hugo Mercier
fa78ccf74d
Deprecate old WkbType in QgsDataSourceUri
2016-02-09 10:44:41 +01:00
Hugo Mercier
e2123c79e5
Fix addFeature and addPart maptool for layers with a Z
2016-02-09 10:44:41 +01:00
Juergen E. Fischer
63d9fec54b
fix syntax error in test_provider_mssql.py
2016-02-09 02:50:18 +01:00
Juergen E. Fischer
093eb419df
include image resource in gui tests (perhaps fixes trusty nightly tests)
2016-02-06 14:53:54 +01:00
Jürgen Fischer
8cdd7233c5
Merge pull request #2757 from manisandro/pool_invalidate_release
...
Connection pool improvements
2016-02-05 12:26:50 +01:00
Nyall Dawson
99cef42eef
Improve QgsDistanceArea API to make it easier to determine units
...
for returned distances, add unit tests
2016-02-05 20:13:10 +11:00
Matthias Kuhn
164090688e
Indentation fix
2016-02-04 15:26:32 +01:00
Matthias Kuhn
f26f92743a
Fix unittypes test
2016-02-04 15:24:49 +01:00
Matthias Kuhn
c21889f945
Add qgis.testing module for generic qgis test helpers
2016-02-04 13:36:13 +01:00
Nyall Dawson
27f1637fb1
Add provider test for getting feature count with subset string set,
...
fix memory provider invalid count when subset set
2016-02-04 16:21:51 +11:00
Nyall Dawson
ddabad247f
Move unit handling helpers out of QGis and QgsSymbolLayerUtils
...
into a new QgsUnitTypes helper class. Add unit tests.
TODO QGIS 3.0: Move QGis::UnitType and QgsSymbolV2::OutputUnit
to QgsUnitTypes
2016-02-04 08:01:32 +11:00
Sandro Mani
060dca671e
Destroy layers in TestQgsVectorAnalyzer::cleanupTestCase
2016-02-03 11:47:07 +01:00
Nyall Dawson
b6c714ac20
Improve API, docs for QgsDistanceArea
2016-02-03 18:57:10 +11:00
Nyall Dawson
0a64c16e98
Add polygon test for mssql provider
2016-02-03 08:38:00 +11:00
Nyall Dawson
9e292d0cca
Boost app startup test timeout further
...
To check whether this fixes failures on the windows nightly builds
2016-02-03 06:53:02 +11:00
Nyall Dawson
c3ed6b9fa3
foreach -> Q_FOREACH
2016-02-02 20:00:26 +11:00
Nyall Dawson
c3a57434d9
Fix clazy 'pass small and trivially-copyable type by value' warnings
2016-02-02 19:47:21 +11:00
Nyall Dawson
f3c7ab61e6
Spelling fixes, updates to chkspelling.sh
2016-02-02 19:47:21 +11:00
Sandro Santilli
87887e43d1
Add test for unexpected WKB input in simplification
...
Closes #12416
2016-02-01 13:22:15 +01:00
Denis Rouzaud
2797ed79b0
Merge pull request #2743 from 3nids/testfieldwidget2
...
Fix label expression/field lose when removing a join in layer properties
2016-02-01 04:54:29 -05:00
Sandro Santilli
793e7b28fc
Stub test for QgsMapToPixelGeometrySimplifier
...
See #12416
2016-02-01 09:51:43 +01:00
Denis Rouzaud
cae49d7025
Add test for QgsFieldExpressionWidget
...
the test checks that fields are updated properly on join removal, that expression is not lost and that validity is correct
2016-02-01 03:38:05 -05:00
Nyall Dawson
4825856fd7
Fix provider ordering by test to correctly also test compiled order by
...
...and as a result, disable compiled order by support for postgres
due to bugs exposed by the test
2016-01-31 20:42:11 +11:00