Commit fac5c2c3 authored by David Edmundson's avatar David Edmundson
Browse files

Don't call update inside the application constructor

update calls a virtual method to filter for valid cgroups, it is important
this is not called during the constructor.

Deferring this also helps speed up loading this model. Any view already
handles data being updated afterwards.


(cherry picked from commit b1e85d57)
parent f7892573
......@@ -368,7 +368,7 @@ void CGroupDataModel::setRoot(const QString &root)
d->m_root = root;
d->m_rootGroup.reset(new CGroup(root));
emit rootChanged();
update();
QMetaObject::invokeMethod(this, [this] {update();}, Qt::QueuedConnection);
}
void CGroupDataModel::update()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment