<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 23, 2019 at 6:15 PM Vincent Cloarec <<a href="mailto:vcloarec@gmail.com">vcloarec@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>I have some difficulties in passing the Travis tests with this PR: <a href="https://github.com/qgis/QGIS/pull/31942." target="_blank">https://github.com/qgis/QGIS/pull/31942.</a></div><br>As I am fed up to make turning the server for nothing and reject CO2, I ask for help.<br><br>The 'code layout' tests seem not to pass. Reading the log, I can find this link <a href="http://tinyurl.com/yynt7m9a" target="_blank">http://tinyurl.com/yynt7m9a</a>. Following this link, it seems the problems come from warning: undocumented parameters and unknown command '\TODO'.<br><br><div>Can anyone confirm ?</div></div></blockquote><div><br></div><div>Confirmed.</div><div><br></div><div>You need to complete the documentation of a few methods. <br></div><div>I don't know where the TODO comes from though.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div>Thanks.<div><br></div><div><span><font color="#888888"><span><font color="#888888"><div>Vincent Cloarec</div><div><a href="http://www.reos.site" target="_blank">www.reos.site</a></div></font></span></font></span></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 23 sept. 2019 à 00:25, Vincent Cloarec <<a href="mailto:vcloarec@gmail.com" target="_blank">vcloarec@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hello,<br><br>Thanks Nyall for your advice.<br><br>I have chosen to move the raster layer properties to the gui. As the widget is very convenient, no reason to rebuild my own. Moreover, it appears there is not a lot of code to change.<br><div>So I purpose this PR: <a href="https://github.com/qgis/QGIS/pull/31942" target="_blank">https://github.com/qgis/QGIS/pull/31942</a></div><div>The tests seem to pass for QGIS, and I have tried to import the QgsRasterLayerProperties class to a standalone application only using the gui library, it is ok.</div><div><br></div><div><span><font color="#888888"><div>Vincent Cloarec</div><div><a href="http://www.reos.site" target="_blank">www.reos.site</a></div><div><br></div></font></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 19 sept. 2019 à 00:37, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 19 Sep 2019 at 13:55, Vincent Cloarec <<a href="mailto:vcloarec@gmail.com" target="_blank">vcloarec@gmail.com</a>> wrote:<br>
><br>
> In standalone applications, I am using the QgsRasterLayerProperties class to manage rasters displayed in the map canvas.<br>
><br>
> However, since QGis 3.8, this class is no longer independent from the QgisApp instance because the methode QgisApp::instance()->askUserForDatumTransform() is called from the QgsRasterLayerProperties instance.<br>
><br>
> As in my standalone applications, I don't have QgsApp instance (no need), now this applications crash when the raster layer properties widget opens ...<br>
><br>
> So, after a look at the Qgis code, I am thinking about to make a PR to make again the QgsRasterLayerProperties independant from the QgisApp instance. I think it could be possible with a static method in the QgisApp class. I have to work on it.<br>
<br>
Possibly -- but it's a band-aid solution only. There's a LOT of code<br>
in the app library which will make assumptions that the QgisApp<br>
instance is available, and that's why all this code is partitioned off<br>
into the app library. app also has no stable API guarantees and you'll<br>
continue to hit situations like this.<br>
<br>
I'd suggest two possible alternative ways forward:<br>
<br>
1. Use the stable api classes exposes through the gui library to<br>
rebuild your own raster layer properties dialog<br>
2. Submit a PR moving the raster layer properties class from app -><br>
gui and adding it to the stable API<br>
<br>
Both approaches are more upfront work, but are paths to much less pain<br>
and future breakage...<br>
<br>
Nyall<br>
</blockquote></div></div>
</blockquote></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>