plug memory leak in tst_QAbstractScrollArea::task214488_layoutDirection()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-11-22 13:42:43 +02:00
parent ca638eaafd
commit 10d360043b

View file

@ -327,7 +327,8 @@ void tst_QAbstractScrollArea::task214488_layoutDirection()
scrollArea.setLayoutDirection(dir); scrollArea.setLayoutDirection(dir);
int refValue = hbar->value(); int refValue = hbar->value();
qApp->sendEvent(&scrollArea, new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier)); QKeyEvent event(QEvent::KeyPress, key, Qt::NoModifier);
qApp->sendEvent(&scrollArea, &event);
QVERIFY(lessThan ? (hbar->value() < refValue) : (hbar->value() > refValue)); QVERIFY(lessThan ? (hbar->value() < refValue) : (hbar->value() > refValue));
} }