Fix wrong variable initialization in tst_QScrollBar::task_209492

Change-Id: Icf1f6da46caa7fb7f3bd308eaaf4e037af814d17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2021-05-25 12:26:16 +02:00
parent 55765898fe
commit d4cff8c537

View File

@ -119,7 +119,7 @@ void tst_QScrollBar::task_209492()
// Simulate a mouse click on the "scroll down button".
const QPoint pressPoint(verticalScrollBar->width() / 2, verticalScrollBar->height() - 10);
const QPoint globalPressPoint = verticalScrollBar->mapToGlobal(globalPressPoint);
const QPoint globalPressPoint = verticalScrollBar->mapToGlobal(pressPoint);
QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint,
Qt::LeftButton, Qt::LeftButton, {});
QApplication::sendEvent(verticalScrollBar, &mousePressEvent);