[Development] Undeprecating Q_FOREACH (was: Re: qMoveToConst helper for rvalue references to movable Qt containers?)
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Sun Oct 28 19:34:19 CET 2018
Il 28/10/18 15:42, Kevin Kofler ha scritto:
> As long as it is not actually removed, it is not too late to undo this
> totally incorrect decision.
>
> See also:https://valdyas.org/fading/hacking/happy-porting/
>
> (Technically, it could be readded even after it is removed, but it would be
> much easier to undeprecate it now.)
Please bring technical arguments to the table for undoing this
deprecation. So far, this hasn't been done, so the deprecation stands
and likely go into effect the first time we get a chance of breaking SC.
Note that "annoyance for end-users" is not an argument. In the absence
of infinite development bandwidth, and given the natural evolution of
software, Qt will need to shed some old crust from time to time, even if
that means annoyances for the users.
I briefly discussed about this here:
> https://www.kdab.com/un-deprecate-qt-project/
Specifically for Q_FOREACH, if a project doesn't want to move away, then
the solution takes 5 minutes:
1) copy and paste Q_FOREACH's implementation in a central header of your
project
2) rename it to MY_FOREACH
3) do a search/replace of Q_FOREACH to MY_FOREACH throughout the
project's code base
And that's it.
Yes, this is effectively a fork, which means you'll also need to
backport any fixes that in the meanwhile land upstream. And they _do
land_, even for something apparently as "mundane" as Q_FOREACH:
> https://codereview.qt-project.org/#/c/179396/
> https://codereview.qt-project.org/#/c/176299/ > https://codereview.qt-project.org/#/c/176298/
> https://codereview.qt-project.org/#/c/170073/
> https://codereview.qt-project.org/#/c/167065/
> https://codereview.qt-project.org/#/c/140268/
Why should the Qt Project invest any resource whatsoever maintaining a
solution to a problem that has also been solved by the C++ language (and
in a more efficient and general way than Q_FOREACH)?
--
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: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20181028/fe5d9871/attachment.bin>
More information about the Development
mailing list