Settings: Show first account page on startup #4036

This commit is contained in:
Christian Kamm 2015-11-10 12:20:08 +01:00
parent 76d9b9c0e2
commit 9955b0756a

View file

@ -171,15 +171,9 @@ void SettingsDialog::slotSwitchPage(QAction *action)
void SettingsDialog::showFirstPage()
{
Q_FOREACH(QAction *action, _toolBar->actions()) {
if (QWidgetAction *wa = qobject_cast<QWidgetAction*>(action)) {
if (QToolButton *qtb = qobject_cast<QToolButton*>(wa->defaultWidget())) {
if (QAction *a2 = qtb->defaultAction()) {
a2->trigger();
break;
}
}
}
QList<QAction*> actions = _toolBar->actions();
if (!actions.empty()) {
actions.first()->trigger();
}
}