tabbox: Do not leak QKeyEvents
Allocate in the stack so it gets cleaned up after using
This commit is contained in:
parent
992753c24a
commit
1ada1c0652
1 changed files with 2 additions and 2 deletions
|
@ -1437,8 +1437,8 @@ void TabBox::keyPress(int keyQt)
|
|||
// if Escape is part of the shortcut, don't cancel
|
||||
close(true);
|
||||
} else if (direction == Steady) {
|
||||
QKeyEvent *event = new QKeyEvent(QEvent::KeyPress, keyQt & ~Qt::KeyboardModifierMask, Qt::NoModifier);
|
||||
grabbedKeyEvent(event);
|
||||
QKeyEvent event(QEvent::KeyPress, keyQt & ~Qt::KeyboardModifierMask, Qt::NoModifier);
|
||||
grabbedKeyEvent(&event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue