Code review comment for lp://staging/~aacid/dee-qt/more_tests

Revision history for this message
Paweł Stołowski (stolowski) wrote :

41 - m_parent->beginResetModel();
42 m_count = dee_model_get_n_rows(m_deeModel);
43 - m_parent->endResetModel();
44 Q_EMIT m_parent->countChanged();
45 }
46 else
47 @@ -156,6 +155,7 @@
48 g_signal_connect(m_deeModel, "notify::synchronized", G_CALLBACK(onSynchronizedChanged), m_parent);
49 m_listeningSynchronized = true;
50 }
51 + m_parent->endResetModel();

One observation: with that change we emit countChanged inside beginResetModel() -- endResetModel(), however if the backend dee model is not synchronized yet, we emit countChanged in onSynchronizedChanged() and it's outside of beginResetModel() -- endResetModel() there. I'm not sure if this is can have any side effects (probably not), but just mentioning it; perhaps it makes sense to make it consistent?

« Back to merge proposal