QSequentialIterable and QAssociativeIterable have only const members, so there is no way they could be detached. Currently, clazy-range-loop warns "c++11 range-loop might detach Qt container (QSequentialIterable)" if the QSequentialIterable object is not const. I did not check QAssociativeIterable. Reproducible: Always
Git commit 8384d74e37e1dcea80a2c9cf524b9c0ef3be34d3 by Sergio Martins. Committed on 02/05/2016 at 19:50. Pushed by smartins into branch 'master'. range-loop: Don't warn for non implicitly shared classes M +1 -1 checks/range-loop.cpp M +5 -1 tests/range-loop/main.cpp http://commits.kde.org/clazy/8384d74e37e1dcea80a2c9cf524b9c0ef3be34d3