src/core/*
src/urifilters/*
src/widgets/*
Details
- Reviewers
dfaure - Commits
- R241:7c0402ed9fd7: Compile without deprecated foreach
make && ctest
Diff Detail
- Repository
- R241 KIO
- Branch
- ahmad/foreach-urifilters2 (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 17451 Build 17469: arc lint + arc unit
src/core/job.cpp | ||
---|---|---|
181 ↗ | (On Diff #67217) | You need a local const var to hold the result of the subjobs() method call. (repeats) |
src/core/ksslcertificatemanager.cpp | ||
380 ↗ | (On Diff #67217) | userList would be a better variable name |
src/core/ktcpsocket.cpp | ||
729 ↗ | (On Diff #67217) | or just iterate over ciphers, which is already const |
src/core/scheduler.cpp | ||
214 ↗ | (On Diff #67217) | qAsConst not needed, this method is const |
299 ↗ | (On Diff #67217) | I'm afraid that kill() ends up removing the job from waitingList. I would iterate over a copy to be safe. |
377 ↗ | (On Diff #67217) | Did you try enabling this to make sure your ported code compiles? |
src/widgets/dropjob.cpp | ||
270 ↗ | (On Diff #67217) | qAsConst |
329 ↗ | (On Diff #67217) | qAsConst |
361 ↗ | (On Diff #67217) | qAsConst |
src/widgets/kdirmodel.cpp | ||
151 ↗ | (On Diff #67217) | qAsConst not needed, method is const |
src/widgets/kfileitemdelegate.cpp | ||
233 ↗ | (On Diff #67217) | not needed, method is const and informationList is a member |
- Use more descriptive var names other than list2
- qAsConst isn't needed if the method is const and the container is a member var
src/core/job.cpp | ||
---|---|---|
181 ↗ | (On Diff #67217) | IIUC, subjobs() returns a const QList &, do we still need a local const var? |
src/core/ktcpsocket.cpp | ||
729 ↗ | (On Diff #67217) | Yep. |
src/core/scheduler.cpp | ||
214 ↗ | (On Diff #67217) | (... and m_runningJobs is a member var). |
377 ↗ | (On Diff #67217) | Yes, I did. (I, like everyone else, hate to be embarrassed, so I always make sure it builds and passes unittests whenever I change anything except maybe comments :)). |
src/widgets/dropjob.cpp | ||
270 ↗ | (On Diff #67217) | m_urls is declared const in DropJobPrivate: https://cgit.kde.org/kio.git/tree/src/widgets/dropjob.cpp#n142 |
src/widgets/kfileitemdelegate.cpp | ||
233 ↗ | (On Diff #67217) | "member" is what made that concept finally click in my head; (I kept thinking calling begin() on a qt container won't call the const overload, but it will if the container is a member and the this pointer is a pointer to const). |