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
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
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. |