Il 29/10/18 13:00, André Hartmann ha scritto:
Looking athttps://docs.kdab.com/analysis/qtcreator/clazy.html gives currently 223 potential detaching containers within range-based for, and qtbase alone has 46 (https://docs.kdab.com/analysis/qt5/clazy.html).Even if there may be some false positives, who is going to check and fix them all? If we don't manage to use the range-based for correctly (for Qt-containers), why should we force the user to port away from foreach?
Well, noone is forcing you to change those usages right now; updating old practices is something which is naturally part of maintaining a code base. And, yes, *we* get this stuff wrong all the time (... QList<QImage> anyone?). Luckily we now have something like clazy now, so we can prevent such mistakes from happening in the first place.
My 2 c, -- Giuseppe D'Angelo | [email protected] | 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
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
