<table><tr><td style="">kossebau created this revision.<br />Restricted Application added a subscriber: kdevelop-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6526" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The home listing widget of e.g. QtHelp and man documentation plugins is<br />
done with a QTreeView, handling the QTreeView::clicked signal by<br />
synchronously providing a new StandardDocumentationView instance<br />
to the viewer. The viewer then drops the current widget<br />
(thus the QTreeView), but with a deleterLater(), so e.g. the still<br />
on-going mousereleaseevent handler will not get into trouble.<br />
That good intention though is screwed over during setting up the<br />
new documentation page, still in sync processing, when setting<br />
a new custom QWebEnginePage:<br />
that results in destruction of the default one, which deep down<br />
in the destruction process inside ~QQuickRenderControl() results<br />
in some nested event loop. Which then also results in deletion<br />
of our QTreeView instance already. So when execution finally<br />
returns to the mousereleaseevent handler to continue... -> boom</p>

<p>Patch fixes this by setting the custom QWebEnginePage on setup,<br />
so no default instance is created (happens on first access to<br />
page()) and thus also no destructor is called.<br />
The delegation policy is controlled by keeping a pointer to the<br />
custom page and flipping the delegation flag as needed.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R33 KDevPlatform</div></div></div><br /><div><strong>BRANCH</strong><div><div>fixcrashondocumentationlistitemselection</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6526" rel="noreferrer">https://phabricator.kde.org/D6526</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>documentation/standarddocumentationview.cpp</div></div></div><br /><div><strong>To: </strong>kossebau, KDevelop<br /><strong>Cc: </strong>kdevelop-devel<br /></div>