Skip to content
Permalink
Browse files

Fix crash due to style cache issue in QT<5.12.4. Fixes #39693 #39725

  • Loading branch information
github-actions authored and nyalldawson committed Nov 12, 2020
1 parent c462fd8 commit 48e0882a9496cc4889b23eb45daa467b1f4095bd
@@ -97,6 +97,13 @@ Signal emitted when groupbox collapsed/expanded state is changed, and when first
void checkClicked( bool ckd );
void toggleCollapsed();

void setStyleSheet( const QString &style );
%Docstring
Overridden to prepare base call and avoid crash due to specific QT versions

.. versionadded:: 3.16
%End

protected:
void init();

@@ -300,6 +300,15 @@ void QgsCollapsibleGroupBoxBasic::toggleCollapsed()
clearModifiers();
}

void QgsCollapsibleGroupBoxBasic::setStyleSheet( const QString &style )
{
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 4)
// Fix crash on old Qt versions, see #39693
QGroupBox::setStyleSheet( QString() );
#endif
QGroupBox::setStyleSheet( style );
}

void QgsCollapsibleGroupBoxBasic::updateStyle()
{
setUpdatesEnabled( false );
@@ -131,6 +131,13 @@ class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox
void checkClicked( bool ckd );
void toggleCollapsed();

/**
* Overridden to prepare base call and avoid crash due to specific QT versions
*
* \since QGIS 3.16
*/
void setStyleSheet( const QString &style );

protected:
void init();

0 comments on commit 48e0882

Please sign in to comment.
You can’t perform that action at this time.