[Qgis-developer] plugin for QGIS3 test

Richard Duivenvoorde rdmailings at duif.net
Tue Nov 1 00:03:56 PDT 2016

On 31-10-16 23:15, Nyall Dawson wrote:
> Given that you're probably the first to go through this process, I'm
> very keen to hear any further feedback you have on the porting
> process. What did you find hardest? Is the available api break
> documentation useful? Could we make it better? Do you have any
> suggestions on how we can make this process easier for plugin
> developers?

One thing I learned:

- IF you make use of a plugin Makefile (if you created a plugin using
the plugin builder), is to FIRST fix your make file (that is:
- point to .qgis3 directory instead of .qgis2
- change pyrcc4 an pyuic4 to pyrcc5 and pyuic5 in your makefile
- make clean (to get rid of the Qt4-versions of your gui-py files and
- run make again to have Qt5 versions of your gui-py's and resources
- and THEN run [QGIS-repo]/scripts/2to3 <yourplugin sources>

Else you end up wondering why just half of your python files are 'fixed'
by the script :-)

Other point to make:
- as a lot of deprecated QGIS code is removed: remove all the switches
you had for < 2.0 (if you have an old plugin :-) ), <2.6 etc etc
versions of QGIS, as this cleans up nicely

- FIX all signal slot stuff to use the 'connect'/new way

- I only had a couple of QGIS-api changes. But that is maybe still coming...

- Often you can clean __init_.py (as that was used for the 'old'
waymetadata (which is now in metadata.txt), and I had to keep that for
very old QGIS version (my plugin should work from 1.8 onwards....)

- maybe some notes about the Qt-wrappers and the future script?

Some links to add: http://qgis.org/api/api_break.html
And please add other api change links... I think we should put these on
the frontpage of qgis.org.. I could not google them easy

> I'd also like to echo your disclaimer that it's premature for general
> plugin developers to start porting their plugins yet (unless they
> enjoy redoing changes!). There's still many more changes planned
> before 3.0 is finalised.

hear hear



More information about the Qgis-developer mailing list