D24735: Gracefully replace outputModel

2019-10-17 Thread Kai Uwe Broulik
This revision was automatically updated to reflect the committed changes. Closed by commit R104:2ab4c2f136c5: Gracefully replace outputModel (authored by broulik). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D24735?vs=68145&id=68149#toc REPOSITORY R104 KScreen CHANGES SINCE LAST UPD

D24735: Gracefully replace outputModel

2019-10-17 Thread Roman Gilg
romangg added a comment. 5.17 REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24735 To: broulik, #plasma, romangg, davidedmundson Cc: ngraham, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, alexeymin, himcesjf, lesliezhai,

D24735: Gracefully replace outputModel

2019-10-17 Thread Roman Gilg
romangg accepted this revision. romangg added a comment. This revision is now accepted and ready to land. In D24735#549048 , @broulik wrote: > I call `release()` instead of `get()` so I reset the pointer to null so that when I signal `outputModel

D24735: Gracefully replace outputModel

2019-10-17 Thread Kai Uwe Broulik
broulik added a comment. I call `release()` instead of `get()` so I reset the pointer to null so that when I signal `outputModelChanged` it returns `null` and QtQuick resets everything and only then I delete it. REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24735

D24735: Gracefully replace outputModel

2019-10-17 Thread Kai Uwe Broulik
broulik updated this revision to Diff 68145. broulik added a comment. - Delete the old model REPOSITORY R104 KScreen CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24735?vs=68141&id=68145 REVISION DETAIL https://phabricator.kde.org/D24735 AFFECTED FILES kcm/kcm.cpp To: brou

D24735: Gracefully replace outputModel

2019-10-17 Thread Nathaniel Graham
ngraham added a comment. For me this fixes the crash when unplugging a screen with the KCM open, FWIW. REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24735 To: broulik, #plasma, romangg, davidedmundson Cc: ngraham, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh

D24735: Gracefully replace outputModel

2019-10-17 Thread Kai Uwe Broulik
broulik added a comment. Oh I'm an idiot, I forgot to delete the model. REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24735 To: broulik, #plasma, romangg, davidedmundson Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot,

D24735: Gracefully replace outputModel

2019-10-17 Thread David Edmundson
davidedmundson added a comment. Urgh, so the order of events is: KCMKScreen::~KCMKScreen() <-- deletes the config and exposed properties KCModuleQML::~KCModuleQML() <-- tears down the UI, which now references dangling things. I think thats's a sign of a more generic that it would b

D24735: Gracefully replace outputModel

2019-10-17 Thread Kai Uwe Broulik
broulik added a comment. > But just destroying and recreating is much simpler. ;) And causes crashes by leaving things on the QML side in an inconsistent state. Not sure `deleteLater` will help you since `GetConfigOperation()` could take longer than that. We could perhaps delete the

D24735: Gracefully replace outputModel

2019-10-17 Thread Roman Gilg
romangg added a comment. But just destroying and recreating is much simpler. ;) Regarding the change: if we release without delete afterwards we leak memory. Maybe deleteLater? REPOSITORY R104 KScreen REVISION DETAIL https://phabricator.kde.org/D24735 To: broulik, #plasma, romangg,

D24735: Gracefully replace outputModel

2019-10-17 Thread Kai Uwe Broulik
broulik created this revision. broulik added reviewers: Plasma, romangg, davidedmundson. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. broulik requested review of this revision. REVISION SUMMARY This patch has it signal the disappearance of the `outputModel` and only t