Commit 75aa4ad8 authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/release/19.12'

parents 09cb524f d7e9be4f
Pipeline #13114 passed with stage
in 10 minutes and 14 seconds
......@@ -1590,14 +1590,6 @@ void PartTest::testAnnotWindow()
part.m_document->setViewportPage(0);
// wait for pixmap
QTRY_VERIFY(part.m_document->page(0)->hasPixmap(part.m_pageView));
const int width = part.m_pageView->horizontalScrollBar()->maximum() +
part.m_pageView->viewport()->width();
const int height = part.m_pageView->verticalScrollBar()->maximum() +
part.m_pageView->viewport()->height();
QMetaObject::invokeMethod(part.m_pageView, "slotSetMouseNormal");
QCOMPARE(part.m_document->currentPage(), 0u);
......@@ -1613,11 +1605,22 @@ void PartTest::testAnnotWindow()
// Add annot1 and annot2 to document
part.m_document->addPageAnnotation( 0, annot1 );
QTest::qWait(100);
part.m_document->addPageAnnotation( 0, annot2 );
QTest::qWait(100);
QVERIFY( part.m_document->page( 0 )->annotations().size() == 2 );
QTimer *delayResizeEventTimer = part.m_pageView->findChildren<QTimer *>("delayResizeEventTimer").at(0);
QVERIFY(delayResizeEventTimer->isActive());
QTest::qWait(delayResizeEventTimer->interval() * 2);
// wait for pixmap
QTRY_VERIFY(part.m_document->page(0)->hasPixmap(part.m_pageView));
const int width = part.m_pageView->horizontalScrollBar()->maximum() +
part.m_pageView->viewport()->width();
const int height = part.m_pageView->verticalScrollBar()->maximum() +
part.m_pageView->viewport()->height();
// Double click the first annotation to open its window (move mouse for visual feedback)
const NormalizedPoint annot1pt = annot1->boundingRectangle().center();
QTest::mouseMove(part.m_pageView->viewport(), QPoint(width * annot1pt.x, height * annot1pt.y));
......
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