Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/tasksmodel.cpp
Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Line(s) | 147 | { | |||
---|---|---|---|---|---|
389 | 389 | | |||
390 | QObject::connect(filterProxyModel, &QAbstractItemModel::rowsRemoved, q, | 390 | QObject::connect(filterProxyModel, &QAbstractItemModel::rowsRemoved, q, | ||
391 | [this](const QModelIndex &parent, int first, int last) { | 391 | [this](const QModelIndex &parent, int first, int last) { | ||
392 | Q_UNUSED(parent) | 392 | Q_UNUSED(parent) | ||
393 | Q_UNUSED(first) | 393 | Q_UNUSED(first) | ||
394 | Q_UNUSED(last) | 394 | Q_UNUSED(last) | ||
395 | 395 | | |||
396 | if (launcherCheckNeeded) { | 396 | if (launcherCheckNeeded) { | ||
397 | QMetaObject::invokeMethod(launcherTasksModel, "dataChanged", | 397 | for (int i = 0; i < filterProxyModel->rowCount(); ++i) { | ||
398 | Q_ARG(QModelIndex, launcherTasksModel->index(0, 0)), | 398 | const QModelIndex &idx = filterProxyModel->index(i, 0); | ||
399 | Q_ARG(QModelIndex, launcherTasksModel->index(launcherTasksModel->rowCount() - 1, 0))); | 399 | | ||
400 | if (idx.data(AbstractTasksModel::IsLauncher).toBool()) { | ||||
401 | filterProxyModel->dataChanged(idx, idx); | ||||
402 | } | ||||
403 | } | ||||
400 | 404 | | |||
401 | launcherCheckNeeded = false; | 405 | launcherCheckNeeded = false; | ||
402 | } | 406 | } | ||
403 | } | 407 | } | ||
404 | ); | 408 | ); | ||
405 | 409 | | |||
406 | // Update anyTaskDemandsAttention on source data changes. | 410 | // Update anyTaskDemandsAttention on source data changes. | ||
407 | QObject::connect(groupingProxyModel, &QAbstractItemModel::dataChanged, q, | 411 | QObject::connect(groupingProxyModel, &QAbstractItemModel::dataChanged, q, | ||
▲ Show 20 Lines • Show All 1218 Lines • Show Last 20 Lines |