On https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html it is recommended to write for loops like the following:
Container::iterator end = large
In fact, the end() method is inline. The 2nd not call it every time, I don't think end() gives any performance lag.