Actually open the activity view on a click for more info

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-11-09 12:12:25 +01:00
parent 9c0e5c2b19
commit 7925c6c081
No known key found for this signature in database
GPG key ID: F941078878347C0C
4 changed files with 14 additions and 3 deletions

View file

@ -625,7 +625,7 @@ void AccountSettings::slotFolderListClicked(const QModelIndex &indx)
return;
}
if (FolderStatusDelegate::errorsListRect(tv->visualRect(indx)).contains(pos)) {
emit showIssuesList(_model->data(indx, FolderStatusDelegate::FolderAliasRole).toString());
emit showIssuesList(_accountState);
return;
}

View file

@ -61,7 +61,7 @@ public:
signals:
void folderChanged();
void openFolderAlias(const QString &);
void showIssuesList(const QString &folderAlias);
void showIssuesList(AccountState *account);
void requesetMnemonic();
public slots:

View file

@ -88,6 +88,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent)
connect(AccountManager::instance(), &AccountManager::accountRemoved,
this, &SettingsDialog::accountRemoved);
_actionGroup = new QActionGroup(this);
_actionGroup->setExclusive(true);
connect(_actionGroup, &QActionGroup::triggered, this, &SettingsDialog::slotSwitchPage);
@ -188,6 +189,15 @@ void SettingsDialog::showActivityPage()
}
}
void SettingsDialog::showIssuesList(AccountState *account) {
for (auto it = _actionGroupWidgets.begin(); it != _actionGroupWidgets.end(); ++it) {
if (it.value() == _activitySettings[account]) {
it.key()->activate(QAction::ActionEvent::Trigger);
break;
}
}
}
void SettingsDialog::activityAdded(AccountState *s){
_ui->stack->addWidget(_activitySettings[s]);
connect(_activitySettings[s], &ActivitySettings::guiLog, _gui,
@ -246,6 +256,7 @@ void SettingsDialog::accountAdded(AccountState *s)
connect(accountSettings, &AccountSettings::folderChanged, _gui, &ownCloudGui::slotFoldersChanged);
connect(accountSettings, &AccountSettings::openFolderAlias,
_gui, &ownCloudGui::slotFolderOpenAction);
connect(accountSettings, &AccountSettings::showIssuesList, this, &SettingsDialog::showIssuesList);
connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialog::slotAccountAvatarChanged);
connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialog::slotAccountDisplayNameChanged);

View file

@ -56,7 +56,7 @@ public:
public slots:
void showFirstPage();
void showActivityPage();
// void showIssuesList(const QString &folderAlias);
void showIssuesList(AccountState *account);
void slotSwitchPage(QAction *action);
void slotRefreshActivity(AccountState *accountState);
void slotRefreshActivityAccountStateSender();