<div dir="ltr">Hi David,<div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for bringing this up. After reading the referenced KDAB article (and especially the not-so-happy comments about this deprecation), I looked at the code base.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Instances of Q_FOREACH in QGIS 2.99 (master): 2023</div><div class="gmail_extra"><br></div><div class="gmail_extra">Why can't Qt just leave the macro in and recommend using a better C++11 construct for devs wishing better performance? (rhetorical question)</div><div class="gmail_extra"><div><div class="gmail_signature"><br></div><div class="gmail_signature">I guess the macro can be added to a QGIS header file while devs spend their time endlessly figuring out how to do a port "for each" Q_FOREACH.</div><div class="gmail_signature"><br></div><div class="gmail_signature">I, for one, find this a bit annoying on Qt's part, but still understand the reasoning for it.</div><div class="gmail_signature"><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota</div></div>
<br><div class="gmail_quote">On Thu, Jan 19, 2017 at 3:28 AM, David Marteau <span dir="ltr"><<a href="mailto:dmarteau@3liz.com" target="_blank">dmarteau@3liz.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I would like to know if there is plans for replacing Q_FOREACH (use discouraged from QT 5.7) with C++11 range based loop in QGIS code and if it is appropriate to start the move in new PR ?<br>
<br>
Some références:<br>
<a href="http://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH" rel="noreferrer" target="_blank">http://doc.qt.io/qt-5/<wbr>qtglobal.html#Q_FOREACH</a><br>
<a href="http://en.cppreference.com/w/cpp/language/range-for" rel="noreferrer" target="_blank">http://en.cppreference.com/w/<wbr>cpp/language/range-for</a><br>
<a href="https://www.kdab.com/goodbye-q_foreach/" rel="noreferrer" target="_blank">https://www.kdab.com/goodbye-<wbr>q_foreach/</a><br>
<br>
Thx<br>
David<br>
______________________________<wbr>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">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/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></blockquote></div><br></div></div>