- call reserve on container classes where applicable
- make sure Q_FOREACH uses references
- remove dynamic casts to base classes
- fix some implicit bool conversions
Also fixes:
- multiple reloads of table (due to additional connections to cache invalidation)
- crash in attribute form (on redo of deleted field when it was not the last)
- crash in editor widget wrapper (during table reload)
* QgsVectorDataProvider::dataChanged() will be emitted
* QgsVectorLayer::dataChanged() will be emitted
* Clears QgsVectorLayerCache
* Reloads the attribute table
* Clears the selection
Looking forward to people complaining about their lost selection...
Fix#10560Fix#11989
Refs #8317
Refs #8822
Refs #10483
Refs #11007
Refs #7540
Refs #11398
Refs #11296
This fixes performance issues with the attribute table visible when deleting a
large number of features.
The attribute table tries to behave smart in the following way:
* It tries to remove only the deleted rows as long as they are in one or a few
single blocks
* If there are more than 100 rows to delete and it starts to delete blocks
of a size smaller than 10 it assumes that the selection to delete is widely
distributed and that a reload of the whole model is less expensive than a
differential update.
Fix#10167
to improve performance (actually to make it usable with large tables again).
When used as initial setting in options the open attribute table will have a
fixed spatial filter to the canvas extent when it was opened. That extent is
also highlighted to indicate the filter.
fixes#10619
Qt 4.6 introduced a better way of resetting models with beginResetModel()/
endResetModel(). Call beginResetModel() before resetting internal data
structures, and then endResetModel() when finished. beginResetModel()
followed by endResetModel() is the same as calling reset().
Note: reset() is deprecated and is removed in Qt 5.
The reason for removing instances of "#include <QtGui>" is twofold:
1) Including it will probably include more than is actually needed. Plus,
it hide what is actually needed, especially if in a header
2) Qt 5 splits Gui into Gui and Widgets, so being explict about what is
needed gets around this problem
used as a generic api for registering actions which can apply to
a specific map layer or layer type.
Create a QgsMapLayerAction for setting features as the current
atlas feature for compositions.
This work was kindly sponsored by SIGE (www.sige.ch).
* With a selection model, the way the attribute table handles selections
can be customized. E.g. synchronized to layer selection or used to pick
features.
* With request filters, the visible features on an attribute table can be
limited. This will effectively reduce the subset of features the attribute
table works on. Additional filters by means of a proxy model can of course
further reduce the visible subset subsequently.
* In the attributetable there was a mess with references and pointers, originating from 66fadee8ef.
* QgsVectorLayerCache did sometimes cache features which did not contain all information which needs to be cached and therefore corrupting the cache and leading to incomplete cache hits.
* Add a unit test for the cache problem
* Fix QgsCacheIndexFeatureId
* QgsAbstractCacheIndex::getCacheIterator now produces a QgsFeatureIterator (instead of a list of Feature Ids). This allows to combine a mixed response, partly satisfied by the cache and partly by an additional query to the backend.