D15347: Modify CloseDialogHelper in parttest

Tobias Deiminger noreply at phabricator.kde.org
Mon Jul 15 20:04:55 BST 2019


tobiasdeiminger added a comment.


  Interestingly, if we remove `QTest::mouseMove` and just keep `QTest::mouseClick` in above test, the test passes OK as expected.
  
  This holds some hints: Events can queue up right before a `QInputDialog` is spawned, and are then processed in sequence and interpreted incorrectly by `PageViewAnnotator`. In particular, I observed the following (if mouseMove + mouseClick is used):
  
  1. `QMouseEvent(MouseButtonPress, LeftButton, localPos=204,106, screenPos=1705,131)` is processed by `PageViewAnnotator`. It sets a locked item, but does not yet trigger `m_engine->end()`. That's correct.
  2. `QMouseEvent(MouseButtonRelease, LeftButton, localPos=204,106, screenPos=1705,131)` is processed by `PageViewAnnotator` and leads to `m_engine->end()`, which spawns a `QInputDialog`. That's correct.
  3. `QMouseEvent(MouseMove, localPos=204,106, screenPos=1705,131)` is processed by `PageViewAnnotator` and leads to `m_engine->end()`, which spawns a second `QInputDialog`. That's **NOT** correct.
  
  A further hint is that `MouseMove` got processed last, even if it was produced first.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D15347

To: tobiasdeiminger
Cc: sander, aacid, okular-devel, maguirre, fbampaloukas, joaonetto, kezik, tfella, ngraham, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190715/0cdd206c/attachment.html>


More information about the Okular-devel mailing list