Remove empty action in the settings toolbar
authorKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 10 Dec 2020 10:12:11 +0000 (11:12 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:59:24 +0000 (10:59 +0100)
This was causing an unwanted line in the middle of the bar.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/settingsdialog.cpp
src/gui/settingsdialog.h

index fcc371e35d2e9b9145d1337a3920ca913bd50798..511d19b8b185d7a6b2273388ba554f2d82eefb13 100644 (file)
@@ -112,9 +112,6 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent)
     _actionGroup->setExclusive(true);
     connect(_actionGroup, &QActionGroup::triggered, this, &SettingsDialog::slotSwitchPage);
 
-    _actionBefore = new QAction(this);
-    _toolBar->addAction(_actionBefore);
-
     // Adds space between users + activities and general + network actions
     auto *spacer = new QWidget();
     spacer->setMinimumWidth(10);
@@ -252,7 +249,7 @@ void SettingsDialog::accountAdded(AccountState *s)
         accountAction->setIconText(shortDisplayNameForSettings(s->account().data(), height * buttonSizeRatio));
     }
 
-    _toolBar->insertAction(_actionBefore, accountAction);
+    _toolBar->insertAction(_toolBar->actions().at(0), accountAction);
     auto accountSettings = new AccountSettings(s, this);
     QString objectName = QLatin1String("accountSettings_");
     objectName += s->account()->displayName();
index 5cb18d03cfc21f31cec7f1138cd6899334433cc8..f46208d533a735d3c1aa8bc61c6d9879659defce 100644 (file)
@@ -82,7 +82,6 @@ private:
     Ui::SettingsDialog *const _ui;
 
     QActionGroup *_actionGroup;
-    QAction *_actionBefore;
     // Maps the actions from the action group to the corresponding widgets
     QHash<QAction *, QWidget *> _actionGroupWidgets;