Don't leak QTimer
Make sure it's parented so it eventually gets cleaned up. Found using ASAN.master
parent
8810bf3408
commit
61ab042d7a
|
@ -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 New Issue