[Development] How to port from Q_FOREACH to range-based for

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue Jun 11 11:49:11 CEST 2019


On 11/06/2019 09:17, Lars Knoll wrote:
> So, is removing it worth all the hassle to us and our users? Q_FOREACH is a macro and it doesn’t really cost us anything to keep it around. Yes, it has issues with non Qt containers and I wouldn’t recommend it for any new code.

In fact, I wasn't proposing removal, only deprecation -- the other 
thread was started because an hypothetical removal in 6.0 would badly 
hit users.

For the "why", you just said it: you wouldn't recommend its usage for 
any new code, so why should anyone else use it?

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190611/fc91edbb/attachment.bin>


More information about the Development mailing list