Prefer virtual methods that take QRect and QSize rather than multi-int versions.
Makes for clearer API and reduces the amount of code that was taking all of the
components and turn it into a class.
Details
Details
- Reviewers
zzag - Group Reviewers
KWin - Commits
- R108:5eb84af46935: Remove overloads on virtual methods
Diff Detail
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
What I had back in my mind was to introduce eventually something like requestedClientGeometry(), requestedFrameGeometry(), and doSetGeometry() in AbstractClient. It would allow us to get rid of the force parameter, merge code that forces shaded geometry, and un-virtualize setFrameGeometry(), but code refactoring in this patch is also fine.
I have a few nitpicks, could you please address them before I click "Accept Revision"?
internal_client.cpp | ||
---|---|---|
309 | I don't like that the QRect type is erased. IMHO, it reduces readability. What about being explicit? setFrameGeometry(QRect(pos(), size.boundedTo(area.size()), force); It's a bit longer, but imho more readable. | |
x11client.cpp | ||
4183 | s/_frameGeometry/rect/ |
abstract_client.cpp | ||
---|---|---|
713 ↗ | (On Diff #78509) | I'd swap size() and area.size() so when the code is read by someone it's easier to understand what we do. |