Don't leak QTimer
Make sure it's parented so it eventually gets cleaned up. Found using ASAN.
This commit is contained in:
parent
8810bf3408
commit
61ab042d7a
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ namespace KWin
|
|||
|
||||
KeyboardRepeat::KeyboardRepeat(Xkb *xkb)
|
||||
: QObject()
|
||||
, m_timer(new QTimer)
|
||||
, m_timer(new QTimer(this))
|
||||
, m_xkb(xkb)
|
||||
{
|
||||
connect(m_timer, &QTimer::timeout, this, &KeyboardRepeat::handleKeyRepeat);
|
||||
|
|
Loading…
Reference in a new issue