<div dir="ltr"><div class="gmail_extra">On Sun, Jun 9, 2013 at 6:27 PM, Borys Jurgiel <span dir="ltr"><<a href="mailto:lists@borysjurgiel.pl" target="_blank">lists@borysjurgiel.pl</a>></span> wrote:<br><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":226" style="overflow:hidden">Actually no breaking change happened now, there would be just MUCH more<br>


switches (assuming that e.g. each formerly QString-type variable may be either<br>
QString or unicode). So in the simplest plugins you can still use them and<br>
make the plugin dual-API-compatible. Just remember to explicitly set both<br>
qgisMinimumVersion and qgisMaximumVersion, otherwise QGIS assumes<br>
qgisMaximumVersion at 1.9</div></blockquote></div><br>Technically this can be done for smaller plugins like Borys said.  Something like:</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>import sip</div>

<div class="gmail_extra" style>if sip.getapi("QVariant") > 1:<br></div><div class="gmail_extra" style>    # Use the new API style</div><div class="gmail_extra" style>else:</div><div class="gmail_extra" style>

    # Use the old API style</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>Unless you have a small amount of code, say a small script, I would avoid this because you would have to do it around every method that returns QString or QVariant, which would not be nice and make your life harder.</div>

<div class="gmail_extra" style><br></div><div class="gmail_extra" style>- Nathan</div></div>