dfaure added inline comments.

INLINE COMMENTS

> kossebau wrote in browseropenorsavequestion.cpp:270
> In most projects I have seen people omitting the const, and only adding 
> explicitly any &/* to help the human reader a bit more.
> If you prefer explicit const, fine with me, personally undecided how much 
> auto is good :)

auto or not auto isn't the question when it comes to const :-)

Would you have written `foreach(QString &app, apps)` if `apps` was a 
qstringlist (to simplify)?
Or `for (QString &app : apps)` ?
You say "in most projects I have seen", but my reference is Qt, please find me 
one place in Qt where a range-for isn't using const when the item isn't 
modified inside the loop :)

And while * is redundant (therefore it only helps humans), the & is definitely 
not redundant. Without it you get a copy.

REPOSITORY
  R306 KParts

REVISION DETAIL
  https://phabricator.kde.org/D24262

To: kossebau, dfaure
Cc: ahmadsamir, dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns

Reply via email to