Lower the default queue size, but automatically adjust it
based on how long each fetch takes. This change keeps fetching
responsive even for slow connections or databases. The current
approach with a fixed queue size can result in very slow feature
fetching, which prevents UI updates for multiple seconds.
Switching from QVariant to QVariantList solves the underlying Qt issue:
- comparison of QVariantList objects works fine
- comparison of QVariantList objects wrapped in QVariant does not work
The extra wrapping of QVariantList into another QVariant seems unnecessary anyway,
so we may as well save a tiny bit of memory and cpu
* Remove deprecated Qgis::WKBType and API cleanup
Renames QgsWKBTypes to QgsWkbTypes
Replaces usage of the enums:
* Qgis::WKBType with QgsWkbTypes::Type
* Qgis::GeometryType with QgsWkbTypes::GeometryType
Their values should be forward compatible (a fact that was already
explited up to now by casting between the types)
Renames some SSLxxx to SslXxx and URIxxx to UriXxx
* Fix build warnings and simplify type handling
* Add a fixer to rewrite imports
* The forgotten rebase conflictThe forgotten rebase conflicts
* QgsDataSourcURI > QgsDataSourceUri
* QgsWKBTypes > QgsWkbTypes
* Qgis.WKBGeom > QgsWkbTypes.Geom
* Further python fixes
* Guess what... Qgis::wkbDimensions != QgsWkbTypes::wkbDimensions
* Fix tests
* Python 3 updates
* [travis] pull request caching cannot be disabled
so at least use it in r/w mode
* Fix python3 print in plugins
All pointer based methods have been removed.
Now we have only:
void setGeometry( const QgsGeometry& geom )
and
QgsGeometry geometry() const
Benefits include avoiding a whole lot of tricky pointer lifetime
issues, potential memory leaks, and finally closing #777, which
has survived for over 9 years!...
Impacts on PyQGIS code:
- no more need for the messy
g = QgsGeometry( feature.geometry() )
workaround, just use g = feature.geometry() instead
- IMPORTANT: you can no longer test whether a feature has geometry
using `if f.geometry():`, since QgsFeature::geometry() will
*always* return an object. Instead, use
`if not f.geometry().isEmpty():`, or preferably the new method
`if not f.hasGeometry():`
Fix#777
Fixes again editing of features with negative identifiers.
Now a test fails, but it is the test being broken this time
(testSignedIdentifiers). The test was added as part of
2bd7f446b4dd368968f23b990262c5e8a5a83f80, which fixed a crash
when using signed identifiers.
Also rename pktInt64 to pktUint64, in case we'll be able to know
in advance the database contains only positive integers (not
implemented in this commit).
Can currently be triggered by using the field calculator to update a selection.
While an iterator is active and the connection is locked, an update statement
waits unsuccessfully for the same (locked) connection.
This commit only locks the connection while an iterator is actually fetching
data and not for its entire lifetime.
subsets of attributes and the filter expression requires fields
which are not included in the attribute subset
Note: I've only fixed the providers which implement the vector
provider conformance unit tests. Other providers (eg GRASS) should
also implement a similar fix.
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.
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.
Switch Postgres and OGR compilers to use the new base class. New class
should make it easier to add additional expression compilers (eg
spatialite, MS SQL, etc)
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.
The postgres provider is modified so that layers with
TIN, PolyhedralSurface and Triangle geometries can be loaded.
Geometries are converted to MultiPolygons (and Polygons for Triangles).
The postgres test is completed to cover the loading of different types
of layers