diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-02-28 17:43:18 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-03-01 11:52:24 +0300 |
commit | 83d238fcd7faabb2c74216a8d439b85bad0e9e7e (patch) | |
tree | 1670cfb32bbb02047cb12d70b03f21ebb20a8a5e /src/gui/activitywidget.cpp | |
parent | 14146c8d7dfb095a4d189b20d5381fcc6efe51f0 (diff) |
Fix shared pointer deletion before the slot was invoked
Fixes: #9367
Diffstat (limited to 'src/gui/activitywidget.cpp')
-rw-r--r-- | src/gui/activitywidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index ffc455827..18d4d4f53 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -90,7 +90,7 @@ ActivityWidget::ActivityWidget(QWidget *parent) connect(_model, &ActivityListModel::activityJobStatusCode, this, &ActivityWidget::slotAccountActivityStatus); - connect(AccountManager::instance(), &AccountManager::accountRemoved, this, [this](AccountState *ast) { + connect(AccountManager::instance(), &AccountManager::accountRemoved, this, [this](const AccountStatePtr &ast) { if (_accountsWithoutActivities.remove(ast->account()->displayName())) { showLabels(); } @@ -139,7 +139,7 @@ void ActivityWidget::slotRefreshNotifications(AccountState *ptr) } } -void ActivityWidget::slotRemoveAccount(AccountState *ptr) +void ActivityWidget::slotRemoveAccount(const AccountStatePtr &ptr) { _model->slotRemoveAccount(ptr); } @@ -556,7 +556,7 @@ void ActivitySettings::slotShowIssuesTab() _tab->setCurrentIndex(_syncIssueTabId); } -void ActivitySettings::slotRemoveAccount(AccountState *ptr) +void ActivitySettings::slotRemoveAccount(const AccountStatePtr &ptr) { _activityWidget->slotRemoveAccount(ptr); } |