[Kde-graphics-devel] Review Request 127317: Don't use range-based loops with Qt containers

Kai Uwe Broulik kde at privat.broulik.de
Wed Mar 9 17:45:48 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127317/#review93350
-----------------------------------------------------------



Range-for is still prefered if you can use it.

Just do const QList foo = foo->bar() if applicable and then you can happily use range for

- Kai Uwe Broulik


On März 9, 2016, 5:30 nachm., Daniel Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127317/
> -----------------------------------------------------------
> 
> (Updated März 9, 2016, 5:30 nachm.)
> 
> 
> Review request for KDE Graphics and Boudhayan Gupta.
> 
> 
> Repository: spectacle
> 
> 
> Description
> -------
> 
> C++11 range-based loop syntax calls non-const iterators causing detach when used on Qt containers.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 897ba01 
>   src/CMakeLists.txt e1eb3c1 
>   src/Gui/ExportMenu.cpp 0232f4e 
>   src/Gui/ScreenClipper.cpp 4e3555b 
>   src/KipiInterface/KSGKipiImageCollectionSelector.cpp 8a5786c 
>   src/PlatformBackends/X11ImageGrabber.h e6ad26f 
>   src/PlatformBackends/X11ImageGrabber.cpp e07785a 
> 
> Diff: https://git.reviewboard.kde.org/r/127317/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Daniel Vrátil
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-graphics-devel/attachments/20160309/436f1ed6/attachment.html>


More information about the Kde-graphics-devel mailing list