on xenial help sign in
Limit dateChanged only to property that actually changed in the mock.
69a45c9Mirco Müller
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+2−2
@@ -221,7 +221,7 @@ void MockLauncherModel::setProgress(const QString &appId, int progress)
221 if (index >= 0) {
221 if (index >= 0) {
222 m_list.at(index)->setProgress(progress);
222 m_list.at(index)->setProgress(progress);
223 QModelIndex modelIndex = this->index(index);
223 QModelIndex modelIndex = this->index(index);
224− Q_EMIT dataChanged(modelIndex, modelIndex);
224+ Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleProgress);
225 }
225 }
226}
226}
227
227
@@ -262,7 +262,7 @@ void MockLauncherModel::setCount(const QString &appId, int count)
262 if (index >= 0) {
262 if (index >= 0) {
263 m_list.at(index)->setCount(count);
263 m_list.at(index)->setCount(count);
264 QModelIndex modelIndex = this->index(index);
264 QModelIndex modelIndex = this->index(index);
265− Q_EMIT dataChanged(modelIndex, modelIndex);
265+ Q_EMIT dataChanged(modelIndex, modelIndex, QVector<int>() << RoleCount);
266 }
266 }
267}
267}
268
268