emit countChanged when we get a new source model

the source model is set asyncronously so onComponentcomplete count is 0, and when the proper source is set the notify is not emitted. furthermore the source canchange at runtime, so count needs to be reevaluated every time this happens
wilder-portage-prov
Marco Martin 6 years ago
parent cbeae8e16e
commit 6b10bf2826
  1. 2
      libtaskmanager/tasksmodel.cpp

@ -1024,6 +1024,8 @@ TasksModel::TasksModel(QObject *parent)
// Start sorting.
sort(0);
connect(this, &TasksModel::sourceModelChanged, this, &TasksModel::countChanged);
// Private::updateGroupInline() sets our source model, populating the model. We
// delay running this until the QML runtime had a chance to call our implementation
// of QQmlParserStatus::classBegin(), setting Private::usedByQml to true. If used

Loading…
Cancel
Save