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
Nyall Dawson
96d8986b9f
Add polygon layers to provider tests, so we can test ExactIntersect
...
feature requests
2016-01-31 20:42:11 +11:00
Nyall Dawson
df88a9f5c6
Fix some providers returning valid features when iterator is closed
...
Also add some additional tests to ProviderTestCase for closed iterators
and subset string handling.
2016-01-31 14:38:46 +11:00
Nyall Dawson
6a91603fe7
Merge pull request #2730 from PeterPetrik/13669_duplicate_circular_string_nodes
...
fix #13669 (Circular string generates duplicated nodes)
2016-01-31 11:28:26 +11:00
Nyall Dawson
49e45675ee
Correct handling of date and time values in mssql provider
2016-01-30 08:33:09 +11:00
Nyall Dawson
7dc5eac8bd
Improve handling of time values in attributes
...
- make QgsVectorFileWriter respect QTime field values and only
convert to string if required by output format
- list time types as native types for memory, postgres and OGR
providers (OGR support depends on file format)
2016-01-28 22:14:25 +11:00
Peter Petrik
86e67713d6
fix #13669 (Circular string generates duplicated nodes)
2016-01-28 11:04:40 +01:00
Nyall Dawson
ee5e1c7d22
Fix handling for QTime variants in expression functions
2016-01-28 20:55:04 +11:00
Nyall Dawson
aca66a710f
More debugging for app startup test
2016-01-28 20:52:51 +11:00
Juergen E. Fischer
4dd76da7f8
geometry sip sync and some cosmetics
2016-01-28 10:31:08 +01:00
Nyall Dawson
a88c93b10e
Followup 91ad20, increase startup test timeout
...
Now that the test has been improved we can safely bump the timeout
up a lot
2016-01-28 08:47:36 +11:00
Martin Dobias
c934291070
fix indentation
2016-01-27 14:21:33 +01:00
Martin Dobias
9fd6b24686
Move extraction of linestrings out of QgsExpression file + add unit test
2016-01-27 14:09:32 +01:00
Martin Dobias
42ea15b346
Merge pull request #2496 from SebDieBln/App_OptionsAsFiles
...
Accept option '--' to mark all following arguments as files (refs #3714 )
2016-01-27 12:42:56 +01:00