Move disguising of tab widget into separate method

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-08-23 19:01:05 +08:00
parent c57a5820d0
commit d4fb1e7dad
No known key found for this signature in database
GPG key ID: C839200C384636B0
2 changed files with 11 additions and 4 deletions

View file

@ -196,10 +196,7 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
#if defined(BUILD_FILE_PROVIDER_MODULE)
#else
// Ensure all elements of the tab widget are hidden.
// Document mode lets the child view take up the whole view.
_ui->tabWidget->setDocumentMode(true);
_ui->tabWidget->tabBar()->hide();
disguiseTabWidget();
#endif
const auto mouseCursorChanger = new MouseCursorChanger(this);
@ -1697,6 +1694,14 @@ void AccountSettings::initializeE2eEncryptionSettingsMessage()
connect(actionEnableE2e, &QAction::triggered, this, &AccountSettings::slotE2eEncryptionGenerateKeys);
}
void AccountSettings::disguiseTabWidget() const
{
// Ensure all elements of the tab widget are hidden.
// Document mode lets the child view take up the whole view.
_ui->tabWidget->setDocumentMode(true);
_ui->tabWidget->tabBar()->hide();
}
} // namespace OCC
#include "accountsettings.moc"

View file

@ -137,6 +137,8 @@ private:
/// Returns the alias of the selected folder, empty string if none
[[nodiscard]] QString selectedFolderAlias() const;
void disguiseTabWidget() const;
Ui::AccountSettings *_ui;
FolderStatusModel *_model;