mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Improve the recently added test testMouseClickActivation
The method to make sure that the first item is visible turned out to be less reliable than I thought. This could make the test hang forever. Moreover, this commit removes some trailing whitespace that had been added accidentally.
This commit is contained in:
parent
66af7c390c
commit
d82d92d7dd
1 changed files with 9 additions and 12 deletions
|
@ -521,11 +521,8 @@ void KItemListControllerTest::testMouseClickActivation()
|
|||
adjustGeometryForColumnCount(5);
|
||||
|
||||
// Make sure that the first item is visible in the view.
|
||||
QTest::keyClick(m_container, Qt::Key_End, Qt::NoModifier);
|
||||
QTest::keyClick(m_container, Qt::Key_Home, Qt::NoModifier);
|
||||
while (m_view->firstVisibleIndex() > 0) {
|
||||
QTest::qWait(50);
|
||||
}
|
||||
m_view->setScrollOffset(0);
|
||||
QCOMPARE(m_view->firstVisibleIndex(), 0);
|
||||
|
||||
const QPointF pos = m_view->itemContextRect(0).center();
|
||||
|
||||
|
|
Loading…
Reference in a new issue