Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/taskfilterproxymodel.cpp
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Line(s) | 227 | { | |||
---|---|---|---|---|---|
234 | } | 234 | } | ||
235 | } | 235 | } | ||
236 | 236 | | |||
237 | QModelIndex TaskFilterProxyModel::mapIfaceToSource(const QModelIndex &index) const | 237 | QModelIndex TaskFilterProxyModel::mapIfaceToSource(const QModelIndex &index) const | ||
238 | { | 238 | { | ||
239 | return mapToSource(index); | 239 | return mapToSource(index); | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | bool TaskFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const | 242 | bool TaskFilterProxyModel::acceptsRow(int sourceRow) const | ||
243 | { | 243 | { | ||
244 | Q_UNUSED(sourceParent) | | |||
245 | | ||||
246 | const QModelIndex &sourceIdx = sourceModel()->index(sourceRow, 0); | 244 | const QModelIndex &sourceIdx = sourceModel()->index(sourceRow, 0); | ||
247 | 245 | | |||
246 | if (!sourceIdx.isValid()) { | ||||
247 | return false; | ||||
248 | } | ||||
249 | | ||||
248 | // Filter tasks that are not to be shown on the task bar. | 250 | // Filter tasks that are not to be shown on the task bar. | ||
249 | if (d->filterSkipTaskbar && sourceIdx.data(AbstractTasksModel::SkipTaskbar).toBool()) { | 251 | if (d->filterSkipTaskbar && sourceIdx.data(AbstractTasksModel::SkipTaskbar).toBool()) { | ||
250 | return false; | 252 | return false; | ||
251 | } | 253 | } | ||
252 | 254 | | |||
253 | // Filter tasks that are not to be shown on the pager. | 255 | // Filter tasks that are not to be shown on the pager. | ||
254 | if (d->filterSkipPager && sourceIdx.data(AbstractTasksModel::SkipPager).toBool()) { | 256 | if (d->filterSkipPager && sourceIdx.data(AbstractTasksModel::SkipPager).toBool()) { | ||
255 | return false; | 257 | return false; | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 302 | if (d->filterNotMinimized) { | |||
303 | if (!isMinimized) { | 305 | if (!isMinimized) { | ||
304 | return false; | 306 | return false; | ||
305 | } | 307 | } | ||
306 | } | 308 | } | ||
307 | 309 | | |||
308 | return true; | 310 | return true; | ||
309 | } | 311 | } | ||
310 | 312 | | |||
313 | bool TaskFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const | ||||
314 | { | ||||
315 | Q_UNUSED(sourceParent) | ||||
316 | | ||||
317 | return acceptsRow(sourceRow); | ||||
318 | } | ||||
319 | | ||||
311 | } | 320 | } |