benlau / qsyncable

A solution of nested Json List Model
Apache License 2.0
118 stars 40 forks source link

When call JsonListModel::clear(), it dosen't work for source #4

Open AllanTroy opened 6 years ago

AllanTroy commented 6 years ago

QSListModel::clear() is inherited by QSJsonListModel, but isn't overwritten or synchronized. So it resets QSListModel::m_storage but dosen't work for QSJsonListModel::m_source. Ofcourse, I can see QSJsonListModel dosen't call sync() when QSListModel::m_storage change, you may have wanted it that way. By the way, I want QSJsonListModel::m_source has some way to be in sync with QSListModel::m_storage, for example overwrite and call QSListModel::submit().