Skip to content

Commit ea9480e

Browse files
committed
Don't set focusProxy in QgsCollapsibleGroupBoxBasic when compiled against Qt5.10+, it causes crashes
1 parent a7ca742 commit ea9480e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gui/qgscollapsiblegroupbox.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ void QgsCollapsibleGroupBoxBasic::init()
6565
// TODO set size (as well as margins) depending on theme, in updateStyle()
6666
mCollapseButton->setIconSize( QSize( 12, 12 ) );
6767
mCollapseButton->setIcon( mCollapseIcon );
68+
// FIXME: This appears to mess up parent-child relationships and causes double-frees of children when destroying in Qt5.10, needs further investigation
69+
// See also https://github.com/qgis/QGIS/pull/6301
70+
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
6871
setFocusProxy( mCollapseButton );
72+
#endif
6973
setFocusPolicy( Qt::StrongFocus );
7074

7175
connect( mCollapseButton, &QAbstractButton::clicked, this, &QgsCollapsibleGroupBoxBasic::toggleCollapsed );

0 commit comments

Comments
 (0)