[Notifications] Don't bind model inside headerItem
ClosedPublic

Authored by broulik on Oct 15 2019, 7:47 AM.

Details

Summary

Since Qt 5.12.5 and newer this causes infinite recursion in component creation as setting the model has ListView recreate its header item (among other things) since https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?h=5.12&id=692b2da77427259a3589cf8a1311075863f2f5ec

See also https://bugzilla.redhat.com/show_bug.cgi?id=1758263

Test Plan

5.12 only

  • Notifications work again and don't crash*
  • Turning on and off history works
  • Turning on and off notifications works

I failed to reproduce in a simple test case for submitting a bug report. I tried having a ListView with a header that sets the model and delegate but all I could get was "Cannot create new component instance before completing the previous" but none of the recursion havoc or aborting component creation as in the notification applet :(

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Oct 15 2019, 7:47 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 15 2019, 7:47 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Oct 15 2019, 7:47 AM
jgrulich accepted this revision.Oct 16 2019, 5:54 AM
This revision is now accepted and ready to land.Oct 16 2019, 5:54 AM
This revision was automatically updated to reflect the committed changes.