Warning, /sdk/clazy/docs/checks/README-range-loop-detach.md is written in an unsupported language. File is not indexed.

0001 # range-loop-detach
0002 
0003 Finds places where you're using C++11 range-loops with non-const Qt containers (potential detach).
0004 
0005 Fix it by marking the container const, or using `qAsConst`/`std::as_const`
0006 
0007 #### Example
0008 
0009 `for (auto i : qAsConst(list)) { ... }`
0010 `for (auto i : std::as_const(list)) { ... }`
0011 
0012 #### Fixits
0013 This check supports adding missing `qAsConst` or `std::as_const` when the file is compiled with C++17.