32 Commits

Author SHA1 Message Date
Denis Rouzaud
7eacd444d0 prevent concurrent access while creating iterators and updating cache info (#3224)
#mutexmania
kudos to @m-kuhn
2016-06-21 18:02:06 +02:00
Nyall Dawson
0a5ad73581 Invalid join cache when layer is modified (fix #11140) 2016-06-13 22:08:55 +10:00
Nyall Dawson
1563193707 Port more field iterating to Q_FOREACH, avoid some detachments 2016-03-10 10:45:19 +11:00
Denis Rouzaud
e453c1588d remove join returns true in case of success 2016-02-01 03:38:16 -05:00
Denis Rouzaud
13ccf70e1a test vector join: add PostgreSQL provider 2016-01-20 12:00:46 +01:00
Nyall Dawson
576875e998 Followup 320c696 use clang-modernize to replace 0/NULL use with nullptr 2015-12-15 11:24:51 +11: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
Nyall Dawson
b7e1cae4f0 Switch double quoted single character to single quotes for some
QString methods

Using single quotes is a significant performance boost. Rough
benchmarks indicate the QString single quote methods take
about 15% of the time the double quote variants take.
2015-11-02 17:55:08 +11:00
Nyall Dawson
1969e09b6f Also avoid detaching QgsFields and QgsAttributes where possible 2015-10-20 20:36:08 +11:00
Nyall Dawson
f628ebd423 Replace foreach with Q_FOREACH
For:
- consistency
- to make it immediately clear that this is a Qt macro and that it
works slightly differently to c++ for loops
2015-09-09 19:17:29 +10:00
Nyall Dawson
73ffb83ad4 Make sure a lot of foreach loops use references 2015-09-08 17:33:18 +10:00
Matthias Kuhn
e832b2a28a Add QgsVectorLayer::fields() as alias to pendingFields()
pendingFields() is not very intuitive and leads to confusion for new developers.
2015-08-04 15:13:31 +02:00
Martin Dobias
78708159b2 Fix shifted joined attributes when join field is repeated (fixes #12589) 2015-06-18 21:18:19 +08:00
arnaud.morvan@camptocamp.com
cb4d5189ef Write to project join memory cache property instead of cachedAttributes.isEmpty 2015-05-21 08:42:31 +02:00
Nyall Dawson
d393d268e1 Fix up non-const getters for attributes and geometry in QgsFeature
(preparation for implicit sharing)
2015-05-20 21:46:15 +10:00
Matthias Kuhn
60712cd9bd [FEATURE] Allow to specify custom prefix for joins 2015-01-22 15:58:34 +01:00
Nyall Dawson
d74f4062f0 Fix warning 2014-10-19 18:37:46 +11:00
Juergen E. Fischer
d8cc79ac44 indentation update 2014-09-26 22:00:00 +02:00
Martin Dobias
de48dad6e9 Followup #10912 - detect cycles in joins and reject joins that would create cycle
Cycle would otherwise cause infinite loop when updating fields and it does not make sense
2014-09-16 12:11:15 +07:00
Martin Dobias
ffcd07b066 Joins: optionally use just a subset of fields from joined layer 2014-09-13 14:27:52 +07:00
Martin Dobias
071a5ec0c5 Fix #10912 (joined attributes are not correctly propagated in nested joins)
This commit makes QgsVectorLayerJoinBuffer listen to changes in fields
of joined vector layers in order to update the cache and inform parent layer
2014-09-09 20:17:51 +07:00
Martin Dobias
c1c8aa6418 Fix #10657 (crash opening a project with invalid join) 2014-06-20 18:02:22 +07:00
Minoru Akagi
30c343cc89 Fix broken compatibility of table join (project file) (fix #7068) 2013-03-29 13:52:07 +09:00
Juergen E. Fischer
dc728f6c39 update calls to new api 2013-01-29 01:58:32 +01:00
Martin Dobias
81b0930498 QgsVectorLayer: large internal refactoring
Most important changes:
- introduced feature iterator for QgsVectorLayer
- vector editing moved to QgsVectorEditBuffer
- complete rework of undo/redo commands for vector layers
- geometry cache separated from editing (QgsVectorLayerCache)
- non-essential editing functionality moved to QgsVectorLayerEditUtils
2012-12-17 21:22:42 +01:00
Martin Dobias
51122d263a Store attributes and fields in vectors instead of maps 2012-10-20 22:19:55 +02:00
Martin Dobias
8bf959093f QgsFeature: use a vector of attributes instead of a map (for faster access) 2012-10-19 00:31:03 +02:00
Marco Hugentobler
664973866f Prefix joined field with layer name to make conflict between attributes with the same name less likely 2012-08-14 08:54:28 +02:00
Marco Hugentobler
dd83c441fa embedding of single layer 2011-06-09 15:08:03 +02:00
Marco Hugentobler
3ac604ff1b Don't list join fields to facilitate 'save as' function (fixes #3857). Don't display the query builder if a layer has joins (#3858) 2011-06-03 14:13:57 +02:00
mhugent
f42443c942 Fix for bug #3692 (QGIS segfaults after removing table join)
git-svn-id: http://svn.osgeo.org/qgis/trunk@15700 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-04-14 19:09:27 +00:00
mhugent
f1a655f480 [FEATURE]: experimental table join support refactored and ported from branch to trunk
git-svn-id: http://svn.osgeo.org/qgis/trunk@15155 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-02-11 16:23:17 +00:00