get rid of some unnecessary const_casts
This commit is contained in:
parent
dc4c463ca3
commit
4541501ccc
6 changed files with 6 additions and 6 deletions
|
@ -551,7 +551,7 @@ void Workspace::switchToOutput(Output *output)
|
|||
|
||||
void Workspace::gotFocusIn(const Window *window)
|
||||
{
|
||||
if (should_get_focus.contains(const_cast<Window *>(window))) {
|
||||
if (should_get_focus.contains(window)) {
|
||||
// remove also all sooner elements that should have got FocusIn,
|
||||
// but didn't for some reason (and also won't anymore, because they were sooner)
|
||||
while (should_get_focus.first() != window) {
|
||||
|
|
|
@ -1117,7 +1117,7 @@ bool X11Window::buttonReleaseEvent(xcb_window_t w, int button, int state, int x,
|
|||
return true;
|
||||
}
|
||||
if (w == frameId() && workspace()->userActionsMenu() && workspace()->userActionsMenu()->isShown()) {
|
||||
const_cast<UserActionsMenu *>(workspace()->userActionsMenu())->grabInput();
|
||||
workspace()->userActionsMenu()->grabInput();
|
||||
}
|
||||
x = this->x(); // translate from grab window to local coords
|
||||
y = this->y();
|
||||
|
|
|
@ -363,7 +363,7 @@ inline WindowRules::WindowRules()
|
|||
|
||||
inline bool WindowRules::contains(const Rules *rule) const
|
||||
{
|
||||
return rules.contains(const_cast<Rules *>(rule));
|
||||
return rules.contains(rule);
|
||||
}
|
||||
|
||||
inline void WindowRules::remove(Rules *rule)
|
||||
|
|
|
@ -394,7 +394,7 @@ TileManager *Tile::manager() const
|
|||
int Tile::row() const
|
||||
{
|
||||
if (m_parentTile) {
|
||||
return m_parentTile->m_children.indexOf(const_cast<Tile *>(this));
|
||||
return m_parentTile->m_children.indexOf(this);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
@ -306,7 +306,7 @@ public:
|
|||
* it's not already.
|
||||
*/
|
||||
void showWindowMenu(const QRect &pos, Window *cl);
|
||||
const UserActionsMenu *userActionsMenu() const
|
||||
UserActionsMenu *userActionsMenu() const
|
||||
{
|
||||
return m_userActionsMenu;
|
||||
}
|
||||
|
|
|
@ -3404,7 +3404,7 @@ bool X11Window::hasTransientInternal(const X11Window *cl, bool indirect, QList<c
|
|||
return false;
|
||||
}
|
||||
// cl is group transient, search from top
|
||||
if (transients().contains(const_cast<X11Window *>(cl))) {
|
||||
if (transients().contains(cl)) {
|
||||
return true;
|
||||
}
|
||||
if (!indirect) {
|
||||
|
|
Loading…
Reference in a new issue