Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Verbruggen <erik@verbruggen.consulting>2022-02-24 20:38:25 +0300
committerHannah von Reth <vonreth@kde.org>2022-03-11 17:35:40 +0300
commit2fc0c11ec5543ee74d34e1b38f7605d674f53230 (patch)
treef898489673beafe3037f4338060c3c553bd5d8c7 /src/gui/activitywidget.cpp
parent9e084d0660ccaed0be494dc205ce6512a5648836 (diff)
Fix account filtering in Server Activity tab
The `Models::addFilterMenuItems` method is used in 2 cases, once in the `ActivityWidget`, and once in the `ProtocolWidget`. Both have their own item model, so both need their own role passed in for filtering on. The bug was that `ProtocolItemModel::ProtocolItemRole::Account` was used forall cases, even when a `ActivityListModel::ActivityRole::Account` should have been passed in. Fixes: https://github.com/owncloud/client/issues/9425
Diffstat (limited to 'src/gui/activitywidget.cpp')
-rw-r--r--src/gui/activitywidget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp
index 68acd75dd..270d2aa97 100644
--- a/src/gui/activitywidget.cpp
+++ b/src/gui/activitywidget.cpp
@@ -69,10 +69,6 @@ ActivityWidget::ActivityWidget(QWidget *parent)
header->setSectionResizeMode(QHeaderView::Interactive);
header->setSortIndicator(static_cast<int>(ActivityListModel::ActivityRole::PointInTime), Qt::DescendingOrder);
- connect(_ui->_filterButton, &QAbstractButton::clicked, this, [this] {
- ProtocolWidget::showFilterMenu(_ui->_filterButton, _sortModel);
- });
-
_ui->_notifyLabel->hide();
_ui->_notifyScroll->hide();
@@ -106,10 +102,14 @@ ActivityWidget::ActivityWidget(QWidget *parent)
connect(_ui->_activityList, &QListView::customContextMenuRequested, this, &ActivityWidget::slotItemContextMenu);
header->setContextMenuPolicy(Qt::CustomContextMenu);
connect(header, &QListView::customContextMenuRequested, header, [header, this] {
- auto menu = ProtocolWidget::showFilterMenu(header, _sortModel);
+ auto menu = ProtocolWidget::showFilterMenu(header, _sortModel, static_cast<int>(ActivityListModel::ActivityRole::Account), tr("Account"));
header->addResetActionToMenu(menu);
});
+ connect(_ui->_filterButton, &QAbstractButton::clicked, this, [this] {
+ ProtocolWidget::showFilterMenu(_ui->_filterButton, _sortModel, static_cast<int>(ActivityListModel::ActivityRole::Account), tr("Account"));
+ });
+
connect(&_removeTimer, &QTimer::timeout, this, &ActivityWidget::slotCheckToCleanWidgets);
_removeTimer.setInterval(1000);
}