We don't need a class just for a single method.
Details
Diff Detail
- Repository
- R108 KWin
- Branch
- kill-kill-window
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 7955 Build 7973: arc lint + arc unit
One of the long time problem of KWin was that we had too many things in Workspace. Workspace just does too much - it's a god object.
Given that I'm not totally thrilled of moving more code into it which was nicely separated in a dedicated class. To me the better question would be whether we could move the remaining bits which were kept in workspace into the KillWindow class. E.g. remove the slot in Workspace and direct all usages into KillWindow.
Agreed.
Given that I'm not totally thrilled of moving more code into it which was nicely separated in a dedicated class.
To be honest, so am I, but I also think that having a dedicated class for a single method is wrong, there is no cohesion. The right way would be to go with an utility function.
To me the better question would be whether we could move the remaining bits which were kept in workspace into the KillWindow class. E.g. remove the slot in Workspace and direct all usages into KillWindow.
Yeah, I was also thinking about that. I came to conclusion that moving KillWindow::start to Workspace::slotKillWindow would be more simpler, though I won't insist on that and I'm okay to abandon this revision.