Skip to content

Disconnect configChanged() signal from *Settings in QWidget-based dtors

Because the QWidget dtor will delete its children first, it is the responsability of any subclass to disconnect any signal that might be emitted as a result of a child's destruction. Otherwise, that signal could end up attempting to invoke a method on the now-destroyed parent.

The ChoqokTabBar, QuickPost and TextEdit dtors put various settings in AppearanceSettings or BehaviorSettings, which may end up triggering a configChanged() signal. Therefore, all QWidget subclasses that have connected this signal should disconnect it in their dtor.

(Technically, this is only required of parents of the above classes, so it could be omitted from TextEdit. Still, better safe than sorry.)

BUG: 418312

Merge request reports