on xenial help sign in
Limit dateChanged only to property that actually changed in the mock.
commit69a45c953044340b181d2d337da6f192aa3df51a authorMirco Müller <mirco.mueller@canonical.com> dateThu 23 Jul 2015, 13:12 (11 years ago) parenta63f337
1 file changed+2−2
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+2−2
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+2−2
@@ -221,7 +221,7 @@ void MockLauncherModel::setProgress(const QString &appId, int progress)
221221 if (index >= 0) {
222222 m_list.at(index)->setProgress(progress);
223223 QModelIndex modelIndex = this->index(index);
224− Q_EMIT dataChanged(modelIndex, modelIndex);
224+ Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleProgress);
225225 }
226226}
227227
@@ -262,7 +262,7 @@ void MockLauncherModel::setCount(const QString &appId, int count)
262262 if (index >= 0) {
263263 m_list.at(index)->setCount(count);
264264 QModelIndex modelIndex = this->index(index);
265− Q_EMIT dataChanged(modelIndex, modelIndex);
265+ Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleCount);
266266 }
267267}
268268