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
..
2016-02-14 03:50:49 +01:00
2016-07-24 22:40:52 +02:00
2016-04-19 08:16:05 +10:00
2016-07-25 15:22:36 +10:00
2016-07-25 15:22:12 +10:00
2016-08-01 16:25:46 +10:00
2016-02-14 03:50:49 +01:00
2016-07-21 08:40:50 +10:00
2016-07-26 10:11:57 +10:00
2016-07-26 10:08:18 +10:00
2016-06-10 10:03:34 +10:00
2016-01-08 21:32:11 +01:00
2016-06-05 14:16:30 +10:00
2016-07-27 07:11:55 +10:00
2016-07-25 14:47:16 +10:00
2016-06-02 21:29:35 +02:00
2016-07-21 08:40:50 +10:00
2016-07-15 06:07:52 +10:00
2016-07-26 11:11:05 +10:00
2016-07-19 12:00:35 +10:00
2016-07-21 08:40:50 +10:00
2016-07-07 17:35:55 +02:00
2016-02-16 14:12:54 +11:00
2015-12-07 21:55:36 +11:00
2015-10-07 12:02:04 +11:00
2015-10-07 12:02:04 +11:00
2016-05-25 22:50:28 +02:00
2016-07-22 07:32:07 +10:00
2016-02-14 03:50:49 +01:00
2015-11-02 18:07:16 +11:00
2015-10-07 12:02:04 +11:00
2016-07-26 11:14:35 +10:00
2016-07-27 07:10:46 +10:00
2016-02-16 13:29:36 +01:00
2016-07-25 10:15:46 +10:00
2015-06-11 19:19:00 +02:00
2016-02-14 03:50:49 +01:00
2016-07-21 08:40:50 +10:00
2015-03-05 00:13:05 +07:00
2016-02-14 03:50:49 +01:00
2016-07-15 05:57:57 +10:00
2016-07-21 22:01:38 +10:00
2016-05-17 10:52:06 +10:00
2016-07-21 08:40:50 +10:00
2015-07-29 11:52:14 +02:00
2016-07-25 15:22:12 +10:00
2016-07-25 14:47:16 +10:00
2016-05-31 20:16:22 +02:00
2013-09-26 16:06:29 +02:00
2015-10-13 22:54:01 +02:00
2012-02-04 10:11:22 +01:00
2016-07-25 14:47:16 +10:00
2016-07-20 11:01:00 +10:00
2015-10-07 12:02:04 +11:00
2016-08-01 16:25:46 +10:00
2015-11-20 10:38:34 +11:00
2016-04-15 07:52:02 +10:00
2016-06-10 11:18:25 +10:00
2016-01-26 14:24:45 +11:00
2016-05-31 20:16:21 +02:00
2016-03-30 19:35:34 +11:00
2016-02-14 03:50:49 +01:00
2016-02-14 03:50:49 +01:00
2015-10-26 22:46:25 +11:00
2016-07-21 22:01:38 +10:00
2016-01-26 14:24:45 +11:00
2015-05-24 18:48:22 +02:00
2016-02-14 03:50:49 +01:00
2016-05-20 09:48:18 +10:00
2016-07-15 06:01:39 +10:00
2016-01-22 18:45:45 +11:00
2016-02-02 19:47:21 +11:00
2015-02-03 02:21:52 +01:00
2016-02-14 03:50:49 +01:00
2016-02-14 03:50:49 +01:00
2016-01-25 14:43:54 +11:00
2016-07-21 08:40:50 +10:00
2014-09-01 10:10:37 +07:00
2016-07-04 12:26:25 +10:00
2016-07-21 08:40:50 +10:00
2015-01-19 18:39:03 +07:00
2015-10-07 12:02:04 +11:00
2015-10-07 12:02:04 +11:00
2016-07-20 18:35:20 +08:00
2014-06-24 14:02:03 +07:00
2014-06-24 14:02:03 +07:00
2016-07-25 14:47:16 +10:00
2016-02-14 03:50:49 +01:00
2016-05-25 22:53:01 +02:00
2015-09-17 20:35:27 +10:00
2015-10-26 22:46:25 +11:00
2016-02-14 03:50:49 +01:00
2015-10-07 12:02:04 +11:00
2016-02-14 03:50:49 +01:00
2016-06-12 13:48:30 +02:00
2016-02-14 03:50:49 +01:00
2016-01-05 11:16:15 +11:00
2015-07-29 11:52:14 +02:00
2016-02-02 19:47:21 +11:00
2016-07-21 08:40:50 +10:00
2012-09-24 02:42:57 +02:00
2016-07-24 22:40:52 +02:00
2016-08-01 16:25:46 +10:00
2016-02-29 20:39:29 +08:00
2016-01-22 18:45:45 +11:00
2016-04-06 20:55:26 +10:00
2016-07-21 08:40:50 +10:00
2016-07-25 14:47:16 +10:00
2015-10-07 12:02:04 +11:00
2016-07-21 08:40:50 +10:00
2016-02-14 03:50:49 +01:00
2012-09-24 02:42:57 +02:00
2012-09-24 02:42:57 +02:00
2016-02-14 03:50:49 +01:00
2016-05-28 07:21:21 +10:00
2015-11-05 21:06:44 +01:00
2016-05-29 08:57:26 +02:00
2016-07-21 08:40:50 +10:00
2016-07-15 06:07:52 +10:00
2016-07-24 22:40:52 +02:00
2016-07-16 20:36:45 +10:00
2012-09-24 02:42:57 +02:00
2016-06-05 14:16:30 +10:00
2016-07-26 08:29:24 +10:00
2016-02-14 03:50:49 +01:00
2015-07-29 11:52:14 +02:00
2016-05-25 22:50:28 +02:00
2016-07-24 22:40:52 +02:00
2016-06-21 11:46:18 +02:00
2015-10-07 12:02:04 +11:00
2016-06-02 21:29:35 +02:00
2016-05-17 10:53:25 +10:00
2016-05-17 10:52:06 +10:00
2016-07-13 16:01:57 +10:00
2016-07-24 22:40:52 +02:00
2016-04-27 16:50:19 +08:00
2016-02-14 03:50:49 +01:00
2016-01-18 13:11:43 +01:00
2016-07-26 08:31:29 +10:00
2016-08-01 16:25:46 +10:00
2016-07-26 08:29:24 +10:00
2016-08-01 16:25:46 +10:00
2016-07-19 10:47:14 +02:00
2016-07-31 21:23:07 +10:00
2016-07-31 21:23:07 +10:00
2016-08-01 16:25:46 +10:00
2016-02-14 03:50:49 +01:00
2016-07-21 22:01:38 +10:00
2016-02-01 03:38:16 -05:00
2016-07-31 21:23:07 +10:00
2016-05-25 22:53:01 +02:00
2016-02-14 03:50:49 +01:00
2016-01-07 16:34:34 +01:00
2016-07-21 08:40:50 +10:00
2016-07-25 15:22:36 +10:00