Commit 186f0f57 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Timeline: Fix timelinerenderer test



The events in question are overlapping and all match the given
timestamps exactly. As we stop the search whenever we find an exact
match, the results are valid.

Change-Id: I705bfbdfe9105927588cc356e29209bf893a9ed6
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent 14f3a86c
......@@ -137,16 +137,16 @@ void tst_TimelineRenderer::mouseEvents()
model.loadData();
testMouseEvents(&renderer, 1, 1);
QCOMPARE(renderer.selectedItem(), 3);
QCOMPARE(renderer.selectedItem(), 2);
QCOMPARE(renderer.selectionLocked(), true);
model.setExpanded(true);
testMouseEvents(&renderer, 1, 1);
QCOMPARE(renderer.selectedItem(), 3);
QCOMPARE(renderer.selectedItem(), 2);
QCOMPARE(renderer.selectionLocked(), true); // Don't toggle locked status by clicking same item
renderer.setSelectionLocked(false);
testMouseEvents(&renderer, 1, 1);
QCOMPARE(renderer.selectedItem(), 3);
QCOMPARE(renderer.selectedItem(), 2);
QCOMPARE(renderer.selectionLocked(), false);
renderer.setSelectionLocked(true);
testMouseEvents(&renderer, 1, 40);
......@@ -157,7 +157,7 @@ void tst_TimelineRenderer::mouseEvents()
QCOMPARE(renderer.selectedItem(), -1);
QCOMPARE(renderer.selectionLocked(), false);
testMouseEvents(&renderer, 10, 1);
QCOMPARE(renderer.selectedItem(), 19);
QCOMPARE(renderer.selectedItem(), 14);
QCOMPARE(renderer.selectionLocked(), false);
renderer.setSelectionLocked(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment