[Pkg-owncloud-commits] [owncloud-client] 288/484: Settings: Show first account page on startup #4036

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 9955b0756a0aab220d1002327dfbfd67cb4d1fbd
Author: Christian Kamm <mail at ckamm.de>
Date:   Tue Nov 10 12:20:08 2015 +0100

    Settings: Show first account page on startup #4036
---
 src/gui/settingsdialog.cpp | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp
index 7657a5b..0d983e8 100644
--- a/src/gui/settingsdialog.cpp
+++ b/src/gui/settingsdialog.cpp
@@ -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();
     }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list