D6526: Fix crash on selecting items in documentation plugins' home listings

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Thu Jul 6 14:29:41 UTC 2017

kossebau created this revision.
Restricted Application added a subscriber: kdevelop-devel.

  The home listing widget of e.g. QtHelp and man documentation plugins is
  done with a QTreeView, handling the QTreeView::clicked signal by
  synchronously providing a new StandardDocumentationView instance
  to the viewer. The viewer then drops the current widget
  (thus the QTreeView), but with a deleterLater(), so e.g. the still
  on-going mousereleaseevent handler will not get into trouble.
  That good intention though is screwed over during setting up the
  new documentation page, still in sync processing, when setting
  a new custom QWebEnginePage:
  that results in destruction of the default one, which deep down
  in the destruction process inside ~QQuickRenderControl() results
  in some nested event loop. Which then also results in deletion
  of our QTreeView instance already. So when execution finally
  returns to the mousereleaseevent handler to continue... -> boom
  Patch fixes this by setting the custom QWebEnginePage on setup,
  so no default instance is created (happens on first access to
  page()) and thus also no destructor is called.
  The delegation policy is controlled by keeping a pointer to the
  custom page and flipping the delegation flag as needed.

  R33 KDevPlatform




To: kossebau, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170706/e0b4dada/attachment.html>

More information about the KDevelop-devel mailing list