15 Commits

Author SHA1 Message Date
Matthias Kuhn
bb79d13e82 Remove deprecated Qgis::WKBType and API cleanup (#3325)
* 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
2016-08-04 09:10:08 +02: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
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Hugo Mercier
7dbc0bf819 [db manager] Fix virtual layers plugin (fixes #14404) 2016-03-23 17:39:41 +01:00
Juergen E. Fischer
c55f8b73f0 db_manager: cleanups 2016-03-21 17:00:24 +01:00
Juergen E. Fischer
8bda5c00a5 db_manager: migrate to new style signals 2016-03-15 23:46:54 +01:00
Juergen E. Fischer
c6d921729e python fixes:
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
  python/console/console_sci.py:547 QsciScintillaCompat?
  python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Werner Macho
6acdfc6e84 improve import handling 2016-03-15 11:14:16 +01:00
Hugo Mercier
942c5e5f73 Fix virtual layer file name handling (in Windows) 2016-02-15 16:44:17 +01:00
Hugo Mercier
1d7b281611 Add qgis functions to db manager and creation ui 2016-01-11 14:11:14 +01:00
Hugo Mercier
70f26b66be Merge pull request #2647 from mhugo/vlayer_gui
Virtual layers GUI integration
2016-01-11 12:17:50 +01:00
Juergen E. Fischer
4e1cf3c081 add missing copyright headers 2016-01-08 21:32:11 +01:00
Hugo Mercier
8bbdff471c Fix a bad indentation bug 2016-01-07 15:38:09 +01:00
Hugo Mercier
9e14f09862 Add a plugin to DB Manager to support virtual layers 2015-12-18 19:45:58 +02:00