QLinkedList is likely to go away in Qt 6. Use a std::stack instead
Details
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Maniphest Tasks
- T12087: Port Frameworks away from QLinkedList
- Commits
- R241:e18ae3ea52dc: [chmodjob] Port away from QLinkedList
Changed file permissions in Dolphin, verified with ls -l
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Branch
- ll
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 19048 Build 19066: arc lint + arc unit
Comment Actions
While the change should be fine as is, that sounds like a job for std::deque, as we don't need insertions/removals at random positions. Or even for a std::queue, because we only operate on the front.
src/core/chmodjob.cpp | ||
---|---|---|
115 | Does that make sense with a linked list? |
Comment Actions
Indeed there's no reserve for std::list.
And std::queue is FIFO, not LIFO.
std::stack would be a more appropriate container here.
Comment Actions
Code looks good, just the comment needs a fix.
[Too bad std::stack doesn't seem to have a reserve() method.]
src/core/chmodjob.cpp | ||
---|---|---|
188 | "Prepend" is confusing now since push is more of an append. This comment needs an update, like "Push this info on top of the stack so it's handled first" |