https://bugs.kde.org/show_bug.cgi?id=386630
--- Comment #1 from Eike Hein <h...@kde.org> --- Git commit b40c0de099fc951dbe3423b99310e7c7f799c8c4 by Eike Hein. Committed on 13/11/2017 at 13:21. Pushed by hein into branch 'master'. When used by QML, only populate after component is complete Summary: This introduces the use of QQmlParserStatus to delay populating the model until all properties have been set, to avoid delegate churn. TasksModel is also meant to be used by C++. There's no good way to determine whether an object is being instanciated by QML during construction time, therefore this patch also introduces a delay in initial population of the model after construction via a single-shot timer. At the time the slot is invoked we know if we're used by QML (because QQmlParserStatus::classBegin has either been called or not by then) so we can decide to populate or wait more for QQmlParserStatus::componentComplete. I'm not super happy with this behavior change for C++ users, however as the model is usually used via QML currently, it's pragmatic to optimize performance for the common case, and it doesn't technically break QAbstractItemModel semantics, as model population isn't required to be sync. There's a decent change this fixes a recently-reported crash as a by-product: Reviewers: #plasma, davidedmundson, mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D8723 M +54 -13 libtaskmanager/tasksmodel.cpp M +6 -1 libtaskmanager/tasksmodel.h https://commits.kde.org/plasma-workspace/b40c0de099fc951dbe3423b99310e7c7f799c8c4 -- You are receiving this mail because: You are watching all bug changes.