Don't leak QTimer

Make sure it's parented so it eventually gets cleaned up.

Found using ASAN.
master
Aleix Pol 2020-08-14 16:49:33 +02:00
parent 8810bf3408
commit 61ab042d7a
1 changed files with 1 additions and 1 deletions

View File

@ -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);