Skip to content
Snippets Groups Projects
Commit a4f29f92 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Jean-Baptiste Kempf
Browse files

Revert "qml: fix segmentation fault on component destruction"

This reverts commit f3e0752f.
parent fb9d4021
No related branches found
No related tags found
1 merge request!3860Revert "qml: fix segmentation fault on component destruction"
Pipeline #361381 passed with stages
in 38 minutes and 32 seconds
......@@ -155,8 +155,6 @@ FocusScope {
availableRowWidthUpdater.enqueueUpdate()
}
Component.onDestruction: _qtAvoidSectionUpdate()
on_CurrentAvailableRowWidthChanged: if (_ready) availableRowWidthUpdater.enqueueUpdate()
// Functions
......@@ -184,31 +182,6 @@ FocusScope {
// Private
function _qtAvoidSectionUpdate() {
// Qt SEG. FAULT WORKAROUND
// There exists a Qt bug that tries to access null
// pointer while updating sections. Qt does not
// check if `QQmlEngine::contextForObject(sectionItem)->parentContext()`
// is null and when it's null which might be the case for
// views during destruction it causes segmentation fault.
// As a workaround, when section delegate is set to null
// during destruction, Qt does not proceed with updating
// the sections so null pointer access is avoided. Updating
// sections during destruction should not make sense anyway.
// Setting section delegate to null seems to has no
// negative impact and safely could be used as a fix.
// However, the problem lying beneath prevails and
// should be taken care of sooner than later.
// Affected Qt versions are 5.11.3, and 5.15.2 (not
// limited).
section.delegate = null
}
// Childs
Timer {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment