D19539: Replace some iterator loops by range-based for

David Hurka noreply at phabricator.kde.org
Tue Mar 5 12:41:58 GMT 2019


davidhurka added a comment.


  Isn’t `auto` a bit confusing as item type? A beginner like me wouldn’t understand that.
  
  Example (pageview.cpp:1194):
  `page` is an item of `pageSet`, which is `QVector< Okular::Page * >`. If I don’t know that:
  `PageViewItem * item = new PageViewItem( page );` calls `PageViewItem::PageViewItem( auto )`. But does `auto` stand for `Okular::Page *` or `int`? And later, should I write `new PageViewItem( page )` or `new PageViewItem( pageSet.at( page ) )`?

REPOSITORY
  R223 Okular

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

To: sander, #okular
Cc: davidhurka, okular-devel, tfella, ngraham, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190305/356ebe24/attachment.html>


More information about the Okular-devel mailing list