https://issues.qgis.org/https://issues.qgis.org/favicon.ico2011-12-16T11:45:49ZQGIS Issue TrackingQGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=270662011-12-16T11:45:49ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Target version</strong> changed from <i>Version 1.7.0</i> to <i>Version 1.7.4</i></li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=309642012-04-16T04:27:33ZPaolo Cavallinicavallini@faunalia.it
<ul><li><strong>Target version</strong> changed from <i>Version 1.7.4</i> to <i>Version 1.8.0</i></li><li><strong>Affected QGIS version</strong> set to <i>master</i></li><li><strong>Crashes QGIS or corrupts data</strong> set to <i>No</i></li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=345952012-09-04T10:00:40ZPaolo Cavallinicavallini@faunalia.it
<ul><li><strong>Target version</strong> changed from <i>Version 1.8.0</i> to <i>Version 2.0.0</i></li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=535492014-06-28T05:38:58ZJürgen Fischerjef@norbit.de
<ul><li><strong>Target version</strong> changed from <i>Version 2.0.0</i> to <i>Future Release - Lower Priority</i></li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=657882015-11-20T06:14:04ZMédéric RIBREUX
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>50</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>Assignee</strong> deleted (<del><i>nobody -</i></del>)</li><li><strong>Pull Request or Patch supplied</strong> set to <i>No</i></li></ul><p>Hello, bug triage...</p>
<p>something has been done on this bug because I am able to launch QGIS 2.13 master with the <code>-reverse</code> QApplication argument. With this option, QGIS menus and panels are oriented from right to left (or inverse). So it seems that QApplication arguments are used by QGIS application.</p>
<p>But with this option, QGIS still complains about the fact that the layer <code>~/-reverse</code> is not valid !</p>
<p>We need a better QApplication argument detection (and management)...</p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=658112015-11-21T01:42:06ZSebastian Dietrich
<ul></ul>If I am right, the cause for this issue is some two step initialization:
<ul>
<li><a href="https://github.com/qgis/QGIS/blob/ca3da4ceee1cb7d23ad2503f0254e4bca23e47bd/src/app/main.cpp#L529" class="external">instantiate a dummy QCoreApplication object</a></li>
<li><a href="https://github.com/qgis/QGIS/blob/ca3da4ceee1cb7d23ad2503f0254e4bca23e47bd/src/app/main.cpp#L530-L691" class="external">parse the arguments</a></li>
<li><a href="https://github.com/qgis/QGIS/blob/ca3da4ceee1cb7d23ad2503f0254e4bca23e47bd/src/app/main.cpp#L751" class="external">instantiate the actual QgsApplication object</a></li>
</ul>
So when given the <code>-reverse</code> argument, it is:
<ul>
<li>ignored by QCoreApplication</li>
<li>evaluated by QGIS, leading to the mentioned complaint</li>
<li>accepted by QgsApplication via inheritance of QApplication</li>
</ul>
<p>thus leading to a complaint <strong>and</strong> the expected behaviour.</p>
<p>See <a href="https://github.com/qgis/QGIS/pull/2491" class="external">PR 2491</a> for a possible solution.</p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=658142015-11-21T05:20:01ZSebastian Dietrich
<ul></ul>There are two other interesting questions here:
<ul>
<li>How do I specify a layer by the name of <code>-reverse</code> (preventing QApplication from interpreting it)?</li>
<li>How do I specify a layer by the name of <code>--help</code> (preventing QGIS from interpreting it)?</li>
</ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=658302015-11-22T09:04:17ZSebastian Dietrich
<ul></ul><p>Looking at the Qt sources it appears there is no simple solution for <code>-reverse</code> and other Qt options. QApplication always parses all arguments, eating up all it can handle.</p>
<p>For <code>--help</code> and other QGIS options see <a href="https://github.com/qgis/QGIS/pull/2496" class="external">PR 2496</a>, introducing '--' as an additional option to mark all following arguments as files.</p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=667552015-12-26T05:37:30ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status info</strong> deleted (<del><i>0</i></del>)</li><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li><li><strong>Operating System</strong> deleted (<del><i>All</i></del>)</li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=671122016-01-12T15:23:42ZSebastian Dietrich
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>70</i></li><li><strong>Pull Request or Patch supplied</strong> changed from <i>No</i> to <i>Yes</i></li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=676472016-01-26T02:19:48ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Thanks for the work, Sebastian!</p>
<p>I think my preference would be to defer solving this to QGIS 3 for two reasons:</p>
<p>- Qt5 comes with nice and shiny QCommandLineParser class to do parsing for us<br />- bootstrapping of QGIS is already quite complicated. I would like to simplify it, see <a class="external" href="https://github.com/qgis/qgis3.0_api/issues/9">https://github.com/qgis/qgis3.0_api/issues/9</a></p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=676532016-01-26T14:20:43ZSebastian Dietrich
<ul></ul><p><a href="http://doc.qt.io/qt-5/qcommandlineparser.html" class="external">QCommandLineParser</a> really looks promising!</p>
<p>How do you feel about merging only <a href="https://github.com/qgis/QGIS/pull/2496" class="external">PR 2496</a>? It implements the same behaviour like QCommandLineParser, which <a href="http://doc.qt.io/qt-5/qcommandlineparser.html#details" class="external"><em>will treat everything after the option -- (double dash) as positional arguments</em></a>.</p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=676792016-01-27T02:44:25ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Sounds good - I have merged PR 2469 and let's keep the other PR open...</p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=676802016-01-27T04:18:52ZSebastian Dietrich
<ul></ul><p>Martin Dobias wrote:</p>
<blockquote>
<p>Sounds good - I have merged PR 2469 and let's keep the other PR open...</p>
</blockquote>
<p>Thanks, that makes sense.</p> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=787102017-04-30T23:10:00ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Regression?</strong> set to <i>No</i></li><li><strong>Easy fix?</strong> set to <i>No</i></li></ul> QGIS Application - Bug report #3714: Qt arguments are not supportedhttps://issues.qgis.org/issues/3714?journal_id=1022602019-03-09T15:04:08ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>end of life</i></li></ul><p><strong>End of life notice: QGIS 2.18 LTR</strong>
<strong><br />Source:</strong><br /><a class="external" href="http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/">http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/</a></p>