desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Migrate forach/Q_FOREACH as C++11 is assumed to be min for codebase

Open dmnq-f opened this issue 6 years ago • 4 comments

Search shows ~90 foreach/Q_FOREACH uses throughout the code. TODO. As @er-vin pointed out in a recent PR, the Qt variant is deprecated now where compact and efficient std alternatives are present. Also, in some cases probably more efficient/safe.

dmnq-f avatar Jul 20 '20 17:07 dmnq-f

I'd like to have a look at this if nobody minds.

snake66 avatar Jul 28 '20 19:07 snake66

Sure go ahead, it's likely a clazy run away. :-)

er-vin avatar Jul 29 '20 08:07 er-vin

Context:

  • https://doc.qt.io/qt-6/foreach-keyword.html
  • https://doc.qt.io/qt-6.5/qforeach-qtcore-proxy.html

Though in these newer versions of the docs, they seem to have downplayed from deprecated to "try not to use".

Looks like some of these were eliminated via #2272, but more remain:

https://github.com/search?q=repo%3Anextcloud%2Fdesktop%20foreach&type=code

joshtrichards avatar Aug 16 '24 15:08 joshtrichards

Done with #7905

claucambra avatar Feb 25 '25 08:02 claucambra