> Den lör 27 okt. 2018 kl 13:37 skrev Olivier Goffart <oliv...@woboq.com>:
> > Jokes aside, I think we still should let users use Q_FOREACH for implicitly
> > shared containers.

But what's the percentage of Qt developers that understand the
subtleties between Q_FOREACH and range-for ?
Having a toolbox with two similar-but-not-quite constructs is bad for
less seasoned users.
I prefer explicitly assigning the container to a const local variable
instead of relying in the magic behind macros.

On Sat, Oct 27, 2018 at 1:53 PM Elvis Stansvik <elvst...@gmail.com> wrote:
> Yes, I thought that Q_FOREACH was slated for deprecation though. But
> maybe that's not set in stone yet?

It is, see Qt's documentation:
"Since Qt 5.7, the use of this macro is discouraged. It will be
removed in a future version of Qt"


Regards,
Sérgio
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to