1792 Commits

Author SHA1 Message Date
Nyall Dawson
89b9b67974 Handle type conversion failures for compiled expressions 2015-12-10 20:49:17 +11:00
Nyall Dawson
038646170f Fix spatialite provider test data (was missing primary key) 2015-12-10 16:18:30 +11:00
Nyall Dawson
54776ebd79 Better debugging for provider tests 2015-12-10 16:18:00 +11:00
Matthias Kuhn
28cabbe4d0 [Expression] radians and degrees 2015-12-10 00:41:42 +01:00
Nyall Dawson
7d59be880a Fix coverity issues 2015-12-10 08:13:21 +11:00
Alessandro Pasotti
0287daf8ab Merge pull request #2555 from elpaso/bugfix-pg-inherits
Additional tests for tables with inherits
2015-12-09 12:03:59 +01:00
elpaso
94b5e609de Fixed comment base_table_good 2015-12-09 09:41:08 +01:00
nirvn
a5d670233b [FEATURE] add darker() and lighter() expression functions 2015-12-09 15:50:59 +11:00
Nyall Dawson
6e140b97fd [FEATURE] Edit legend symbols directly from layer tree
This adds a new "edit symbol" item to the right-click menu for a
renderer child legend item (eg categories for the categorised
renderer). Selecting it opens a symbol editor dialog which allows
for directly editing the classes symbol. It's much faster than
opening the layer properties and going through the style tab.
2015-12-09 07:25:03 +11:00
Nyall Dawson
83e139a550 Add method for retrieving legend nodes by layer ID and legend rule key 2015-12-09 06:01:12 +11:00
Matthias Kuhn
85e9f785a8 Expected failure for some tests
Waiting for travis to recover before looking into it.
They pass locally.
2015-12-08 15:49:02 +01:00
Matthias Kuhn
be01b7eec5 [FEATURE] Add N:M relation editing possibilities
This adds the possibility to manage data on a normalized relational
database in N:M relations. On the relation editor in a form, the tools
to add, delete, link and unlink work (also) on the linking table if a
relation is visualized as N:M relation.

Configuration is done through the fields tab where on the relation a
second relation can be chosen (if there is a suitable relation in terms
of a second relation on the linking table).

Limitations
===========

QGIS is not a database management system.

It is based on assumptions about the underlying database system. In
particular it expects

 * A `ON DELETE CASCADE` or similar measure on the second relation
 * Does not take care of setting the primary key when adding features.
   Either users need to be instructed to set them manually or - if it's a
   database derived value - the layers need to be in transaction mode
   (currently only activatable through the API)
2015-12-08 15:49:01 +01:00
Hugo Mercier
0f6256ebcd Merge pull request #2556 from mhugo/fix_nullp
Avoid insertion of null pointers in layer registry
2015-12-08 15:20:19 +01:00
Hugo Mercier
ec20db7ade Avoid insertion of null pointers in layer registry 2015-12-08 15:13:23 +01:00
Nyall Dawson
ee720796a3 Change size()/count() == 0 and count() > 0 to isEmpty() checks
Because:
- easier to read
- follows recommendations by clazy/KDAB
- potentially performance benefits
2015-12-08 22:45:06 +11:00
elpaso
96789f378e Added tests with use estimated metadata 2015-12-08 11:30:32 +01:00
Matthias Kuhn
4b3083d9a7 [FEATURE] Add translate expression function
Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2015-12-08 08:49:05 +01:00
Matthias Kuhn
f961ecef46 [FEATURE] Add an eval expression
Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2015-12-08 08:43:45 +01:00
Alessandro Pasotti
6127851a09 Renamed test to test_RemoveLayerShouldNotSegFault 2015-12-07 12:07:03 +01:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +11:00
Nyall Dawson
930b4850e0 Fix bad assert in TestQgsRectangle 2015-12-07 21:55:36 +11:00
Nyall Dawson
91f7918e21 [FEATURE] Add a show/hide all context menu for layer tree symbol items
Allows toggling on/off all the symbol items for categorized/graduated/
rule based layers via the right click menu on an item. Previously
you'd have to manually toggle each item one-by-one.

Fix #13458
2015-12-07 07:39:20 +11:00
Alessandro Pasotti
de3ce1560c Changed comment title 2015-12-05 09:43:20 +01:00
elpaso
5a7ee20fa9 Added test for QgsMapLayerRegistry
See: PR #2534
2015-12-05 09:33:12 +01:00
Nyall Dawson
edb16d0014 [FEATURE] Feature limit support for feature requests
Limits the maximum number of features returned by the iterator.
Some providers (postgres, spatialite, MS SQL) pass the limit on
to the provider to result in faster queries.
2015-12-05 10:24:42 +11:00
elpaso
614db66129 Added failing test for tables with INHERITS 2015-12-04 17:54:54 +01:00
Juergen E. Fischer
0d5d3bc9b8 travis: add indentation check after running tests 2015-12-04 11:50:42 +01:00
Nyall Dawson
5198f634b4 Followup 701d970, fix sizes for font marker test 2015-12-04 10:46:29 +11:00
Nyall Dawson
9eee121115 Apply filters to feature request for categorized renderer
Makes rendering much faster when only certain categories are checked,
as only the matching records for the displayed features are fetched
from the provider.
2015-12-04 07:29:06 +11:00
Matthias Kuhn
bd231c675c More output to debug flaky CSV test 2015-12-02 15:02:29 +01:00
Matthias Kuhn
436119be98 Fix failing test 2015-12-01 15:09:39 +01:00
Nyall Dawson
48e4d1c977 Add a method for getting a quoted string value for use as a literal
in expressions
2015-12-01 19:33:27 +11:00
Nyall Dawson
d388a4f1a4 [geometry] Add method to drop z/m values from a geometry 2015-12-01 16:33:44 +11:00
Nyall Dawson
a3d780cb4e [geometry] Add method to drop z/m from wkb types 2015-12-01 16:33:13 +11:00
Nyall Dawson
4ea0c56e9b Followup 53b116a, fix failing tests 2015-12-01 08:18:51 +11:00
Nyall Dawson
3910c457b1 Consolidate QgsGeometryUtils tests 2015-12-01 06:26:45 +11:00
Nyall Dawson
052fd7937d Followup c14352f, tweaked Coverity fixes 2015-11-30 07:39:16 +11:00
Juergen E. Fischer
c14352fa55 coverity fixes 2015-11-29 17:04:56 +01:00
Juergen E. Fischer
079029e354 indentation update 2015-11-29 17:04:56 +01:00
rldhont
5473c3394f [QGIS-Server] Help editing OWS Server general information
Fees and access constraints have a defined list of value by ISO. To help user editing these parameters, edit lines have been remplaced by editable combo box.

To enhance general information and has more INSPIRE compatibility, contact position is added to general information.
2015-11-28 15:47:40 +01:00
Nyall Dawson
a6d147f63e Temporarily disable part of PyQgsRulebasedRenderer test
Since testRefineWithCategories and testRefineWithRanges test were
added, this unit test has been crashing on nightlies on rare
occasions.

I can't track down what's causing this, and haven't been able to
reproduce locally.So, I'm going to temporarily skip
testRefineWithRanges to at least try and identify which of the
tests is causing the crash.
2015-11-27 16:53:32 +11:00
Nyall Dawson
7eb1133bc5 Make QgsLineStringV2::fromWkbPoints private 2015-11-27 16:32:47 +11:00
Nyall Dawson
1f33011960 Add more tests to QgsLineStringV2, fix vertexAngle calculation 2015-11-27 16:32:09 +11:00
Nyall Dawson
6ab718d6ac QgsGeometryUtils fixes
- add QgsGeometryUtils::normalizedAngle for restricting an angle
to [0, 2PI)
- fix calculations of QgsGeometryUtils::averageAngle, was returning
perpendicular angle and angles > 2Pi
- improve docs and add unit tests
2015-11-27 16:31:41 +11:00
Nyall Dawson
74ca290bd3 QgsLineStringV2 fixes
- fix incorrect centroid calculation (was always returning 0,0)
- fix closestSegment when numPoints < 2
- fix broken leftOf calculation for closestSegment
- area calculation when numPoints < 2

Plus add more unit tests
2015-11-26 16:56:30 +11:00
Nyall Dawson
da436f926b [FEATURE] New 'reverse' expression for reversing linestrings 2015-11-26 16:53:55 +11:00
Nyall Dawson
4624fb88ae Update test mask images 2015-11-26 12:53:52 +11:00
Nyall Dawson
de602e7b2d 'fix' build with Ubuntu 15.10
Avoid totally bizarre fontutils test moc error by renaming to
'typographicstylingutils'.

(Pretty sure Ubuntu 15.10 is haunted by ghosts)
2015-11-26 07:12:53 +11:00
Nyall Dawson
f3507747a7 QgsLineStringV2: better handling of LineString25D, more tests 2015-11-25 17:00:55 +11:00
Nyall Dawson
e03f5549ca Update test mask images 2015-11-25 07:48:47 +11:00