Changeset View
Changeset View
Standalone View
Standalone View
src/subscription/subscriptionlistview.cpp
Show All 20 Lines | 1 | /* | |||
---|---|---|---|---|---|
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, | ||
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. | ||
23 | */ | 23 | */ | ||
24 | 24 | | |||
25 | #include "subscriptionlistview.h" | 25 | #include "subscriptionlistview.h" | ||
26 | #include "subscriptionlistmodel.h" | 26 | #include "subscriptionlistmodel.h" | ||
27 | #include "subscriptionlistdelegate.h" | 27 | #include "subscriptionlistdelegate.h" | ||
28 | #include "akregatorconfig.h" | 28 | #include "akregatorconfig.h" | ||
29 | #include "akregator_debug.h" | ||||
29 | 30 | | |||
30 | #include <QHeaderView> | 31 | #include <QHeaderView> | ||
31 | #include <QStack> | 32 | #include <QStack> | ||
32 | #include <QPointer> | 33 | #include <QPointer> | ||
33 | 34 | | |||
34 | #include <QMenu> | 35 | #include <QMenu> | ||
35 | #include <KLocalizedString> | 36 | #include <KLocalizedString> | ||
36 | #include <KConfigGroup> | 37 | #include <KConfigGroup> | ||
▲ Show 20 Lines • Show All 345 Lines • ▼ Show 20 Line(s) | 379 | { | |||
382 | Q_EMIT userActionTakingPlace(); | 383 | Q_EMIT userActionTakingPlace(); | ||
383 | const QModelIndex current = currentIndex(); | 384 | const QModelIndex current = currentIndex(); | ||
384 | if (current.row() >= model()->rowCount(current.parent())) { | 385 | if (current.row() >= model()->rowCount(current.parent())) { | ||
385 | return; | 386 | return; | ||
386 | } | 387 | } | ||
387 | setCurrentIndex(current.sibling(current.row() + 1, current.column())); | 388 | setCurrentIndex(current.sibling(current.row() + 1, current.column())); | ||
388 | } | 389 | } | ||
389 | 390 | | |||
391 | void SubscriptionListView::slotSetHideReadFeeds(bool setting) | ||||
392 | { | ||||
393 | QAbstractItemModel *m = model(); | ||||
394 | if (!m) { | ||||
395 | return; | ||||
396 | } | ||||
397 | | ||||
398 | FilterUnreadProxyModel *filter = qobject_cast<FilterUnreadProxyModel*>(m); | ||||
399 | if (!filter) { | ||||
dvratil: `qCCritical(AKREGATOR_LOG)` | |||||
400 | qCCritical(AKREGATOR_LOG) << "Unable to cast model to FilterUnreadProxyModel*"; | ||||
401 | return; | ||||
402 | } | ||||
403 | | ||||
404 | Settings::setHideReadFeeds(setting); | ||||
405 | filter->setDoFilter(setting); | ||||
406 | } | ||||
407 | | ||||
390 | void Akregator::SubscriptionListView::ensureNodeVisible(Akregator::TreeNode *) | 408 | void Akregator::SubscriptionListView::ensureNodeVisible(Akregator::TreeNode *) | ||
391 | { | 409 | { | ||
392 | } | 410 | } | ||
393 | 411 | | |||
394 | void Akregator::SubscriptionListView::startNodeRenaming(Akregator::TreeNode *node) | 412 | void Akregator::SubscriptionListView::startNodeRenaming(Akregator::TreeNode *node) | ||
395 | { | 413 | { | ||
396 | Q_UNUSED(node); | 414 | Q_UNUSED(node); | ||
397 | const QModelIndex current = currentIndex(); | 415 | const QModelIndex current = currentIndex(); | ||
398 | if (!current.isValid()) { | 416 | if (!current.isValid()) { | ||
399 | return; | 417 | return; | ||
400 | } | 418 | } | ||
401 | edit(current); | 419 | edit(current); | ||
402 | } | 420 | } |
qCCritical(AKREGATOR_LOG)