Hopefully, the new document makes it clear when one can use QRect::right()
and QRect::bottom().
Details
Details
- Reviewers
davidedmundson - Group Reviewers
KWin - Commits
- R108:c9c3c3ad653c: Introduce coding-conventions.md
Diff Detail
Diff Detail
- Repository
- R108 KWin
- Branch
- coding-conventions
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 21897 Build 21915: arc lint + arc unit
Comment Actions
++
You know my thoughts on per project rules.
But maybe it is different for kwin. Use of setRight() is the easier call than left+width() if you are actually using it for painting and need to think about the 1px the other way round.
But would here work? https://community.kde.org/Policies/API_to_Avoid#API_that_is_considered_broken
if we added a line about "for anything other than painting"
doc/coding-conventions.md | ||
---|---|---|
39 | please say another QRect instead of rectangle. QRectF source; target.setRight(source.right()); is problematic |
Comment Actions
Maybe... But I would like to avoid comments such as "i'm not a big fan of this policy, boo!" If other projects find this policy somewhat sensible, then I think we could move it "upstream."