D6624: do not crash qaccessible by causing a resize in a resize event

Harald Sitter noreply at phabricator.kde.org
Tue Jul 11 10:53:57 UTC 2017


sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  When enabling accessibility qaccessible will automatically add a11y support
  constructs to core qt types such as qtableview.
  Unfortunately for qtableview specifically a change of the layout/size will
  discard the accessible objects modeling the individual cells in our table.
  Combined with the way we control layout through the model [I am not sure
  why we do this to begin with] this can result in call chains where
  qaccessible triggers a resizeEvent which we'll handle by rejiggering
  our model to get a new layout, resulting in qaccessible deleting the
  object which originally caused the event and ending in a segfault.
  
  To prevent this problem we delay the rejiggering of our model by running
  the call through the eventloop (i.e. the resize is executed once the stack
  unwinds again to the event loop).
  
  CHANGELOG: Fixed a crash when searching with accessibility support enabled
  BUG: 374933
  
  Also see https://bugreports.qt.io/browse/QTBUG-58153

TEST PLAN
  spent a good while searching and copy pasting and all that fun stuff. no more crashing.

REPOSITORY
  R236 KWidgetsAddons

BRANCH
  master

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

AFFECTED FILES
  src/kcharselect.cpp

To: sitter, gladhorn
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170711/58b9de5b/attachment.html>


More information about the Kde-frameworks-devel mailing list