Change addresses() to make it return a const QList &, this way it can
be iterated over, with a range-for, without detaching.
Details
Details
make && ctest
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Branch
- ahmad/foreach-kpac (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 17949 Build 17967: arc lint + arc unit
Comment Actions
sorry, missed this one. thanks for the ping.
src/kpac/script.cpp | ||
---|---|---|
157 | Why not just change this one to return const & and then use it in all range-fors? [note that returning a const ref is bad in public API, but this is an internal method so we can always change it again if needed] | |
162 | it's just weird to have two methods that do the same thing, with a different name. |
Comment Actions
In private API we can have a method return a const &, as it can be
changed later without side-effects.
src/kpac/script.cpp | ||
---|---|---|
157 | Because I didn't pay attention to public v.s. private API :) Fixing. |