on xenial help sign in
emit dataChanged(Running) correctly when the app appears/disappears
f127d7eLukáš Tinkl
plugins/Unity/Launcher/launchermodel.cpp+2−2
@@ -504,8 +504,8 @@ void LauncherModel::applicationAdded(const QModelIndex &parent, int row)
504 m_list.append(item);
504 m_list.append(item);
505 endInsertRows();
505 endInsertRows();
506 m_asAdapter->syncItems(m_list);
506 m_asAdapter->syncItems(m_list);
507− Q_EMIT dataChanged(index(itemIndex), index(itemIndex), {RoleRunning});
508 }
507 }
508+ Q_EMIT dataChanged(index(itemIndex), index(itemIndex), {RoleRunning});
509}
509}
510
510
511void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
511void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
@@ -533,7 +533,7 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
533 m_list.takeAt(appIndex)->deleteLater();
533 m_list.takeAt(appIndex)->deleteLater();
534 endRemoveRows();
534 endRemoveRows();
535 m_asAdapter->syncItems(m_list);
535 m_asAdapter->syncItems(m_list);
536− Q_EMIT dataChanged(index(appIndex), index(appIndex), {RolePinned});
536+ Q_EMIT dataChanged(index(appIndex), index(appIndex), {RolePinned, RoleRunning});
537 }
537 }
538 Q_EMIT dataChanged(index(appIndex), index(appIndex), {RoleRunning});
538 Q_EMIT dataChanged(index(appIndex), index(appIndex), {RoleRunning});
539}
539}