12 Commits

Author SHA1 Message Date
Denis Rouzaud
537ef07c10 sipify analysis vector 2017-06-21 10:27:23 +02:00
Denis Rouzaud
7b60d89d6c align pointer and reference in sip files batch 2 2017-05-01 20:00:51 +02:00
Nyall Dawson
4b78b1c208 Make all QgsGeometry methods return values, not pointers
Reduces likelihood of crashes and leaks
2016-08-01 22:41:55 +10:00
Nyall Dawson
bd7d913379 Refine QgsFeature geometry getters/setters
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
2016-08-01 16:25:46 +10:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Nyall Dawson
2863f20d67 Add a const geometry getter to QgsFeature 2015-05-11 19:46:32 +10:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
f041072e66 fix some warnings 2014-06-02 21:52:01 +02:00
Marco Hugentobler
0a78102c36 Fix sip binding for eventLayer function 2014-03-14 17:09:15 +01:00
Juergen E. Fischer
45ebedf430 sip fixes: networkanalysis is a separate module 2012-09-27 11:18:52 +02:00