Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#define BACKGROUND_PALETTE "alternate-base"
#else
// ...and "alternate-base" looks too bright on macOS only. On Linux/Plasma either one looked fine ...
#define BACKGROUND_PALETTE "light"

Check failure on line 63 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace this macro by "const", "constexpr" or an "enum".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ2USESh6HbvGlU&open=AZ7bAhZ2USESh6HbvGlU&pullRequest=10212
#endif

namespace {
Expand All @@ -71,7 +71,7 @@

[[nodiscard]] QSize sizeHint() const override
{
if (const auto *widget = currentWidget()) {

Check warning on line 74 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "widget" of type "const class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlY&open=AZ7bAhZ3USESh6HbvGlY&pullRequest=10212
return widget->sizeHint();
}
return QStackedWidget::sizeHint();
Expand All @@ -79,7 +79,7 @@

[[nodiscard]] QSize minimumSizeHint() const override
{
if (const auto *widget = currentWidget()) {

Check warning on line 82 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "widget" of type "const class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlZ&open=AZ7bAhZ3USESh6HbvGlZ&pullRequest=10212
return widget->minimumSizeHint();
}
return QStackedWidget::minimumSizeHint();
Expand All @@ -87,15 +87,15 @@

[[nodiscard]] bool hasHeightForWidth() const override
{
if (const auto *widget = currentWidget()) {

Check warning on line 90 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "widget" of type "const class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGla&open=AZ7bAhZ3USESh6HbvGla&pullRequest=10212
return widget->hasHeightForWidth();
}
return QStackedWidget::hasHeightForWidth();
}

[[nodiscard]] int heightForWidth(int width) const override

Check warning on line 96 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "width" of type "int" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlb&open=AZ7bAhZ3USESh6HbvGlb&pullRequest=10212
{
if (const auto *widget = currentWidget()) {

Check warning on line 98 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "widget" of type "const class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlc&open=AZ7bAhZ3USESh6HbvGlc&pullRequest=10212
return widget->hasHeightForWidth() ? widget->heightForWidth(width) : widget->sizeHint().height();
}
return QStackedWidget::heightForWidth(width);
Expand All @@ -110,10 +110,10 @@
"QToolBar QToolButton:checked { background: palette(highlight); color: palette(highlighted-text); }"
);

const float buttonSizeRatio = 1.618f; // golden ratio

Check warning on line 113 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace constant with "std::numbers::phi_v<float>".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGld&open=AZ7bAhZ3USESh6HbvGld&pullRequest=10212
constexpr auto settingsDialogDefaultWidth = 950;
constexpr auto settingsDialogDefaultHeight = 500;
const auto settingsNavigationIconTextSpacing = QLatin1String(" ");

Check warning on line 116 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this identifier to be shorter or equal to 31 characters.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGle&open=AZ7bAhZ3USESh6HbvGle&pullRequest=10212

/** display name with two lines that is displayed in the settings
* If width is bigger than 0, the string will be ellided so it does not exceed that width
Expand Down Expand Up @@ -176,7 +176,7 @@
accountAdded(account.data());
}

auto *accountSpacer = new QWidget(this);

Check warning on line 179 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "accountSpacer" of type "class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlf&open=AZ7bAhZ3USESh6HbvGlf&pullRequest=10212
accountSpacer->setFixedHeight(16);
_firstNonAccountAction = _toolBar->addWidget(accountSpacer);

Expand Down Expand Up @@ -216,7 +216,7 @@
cfg.restoreGeometry(this);
}

SettingsDialog::~SettingsDialog()

Check failure on line 219 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "=default" instead of the default implementation of this special member functions.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlg&open=AZ7bAhZ3USESh6HbvGlg&pullRequest=10212
{
}

Expand All @@ -239,7 +239,7 @@
QDialog::accept();
}

void SettingsDialog::showEvent(QShowEvent *event)

Check warning on line 242 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this method "showEvent" to simply inherit it.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlh&open=AZ7bAhZ3USESh6HbvGlh&pullRequest=10212

Check warning on line 242 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "event" of type "class QShowEvent *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGli&open=AZ7bAhZ3USESh6HbvGli&pullRequest=10212
{
QDialog::showEvent(event);

Expand All @@ -258,7 +258,7 @@
switch (e->type()) {
case QEvent::StyleChange:
case QEvent::PaletteChange:
case QEvent::ThemeChange:

Check warning on line 261 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Reduce this switch case number of lines from 8 to at most 5, for example by extracting code into methods.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlj&open=AZ7bAhZ3USESh6HbvGlj&pullRequest=10212
customizeStyle();

// Notify the other widgets (Dark-/Light-Mode switching)
Expand All @@ -285,7 +285,7 @@
{
_stack->setCurrentWidget(_actionGroupWidgets.value(action));
_stack->updateGeometry();
if (auto *contentContainer = _stack->parentWidget()) {

Check warning on line 288 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "contentContainer" of type "class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlk&open=AZ7bAhZ3USESh6HbvGlk&pullRequest=10212
contentContainer->updateGeometry();
}
}
Expand All @@ -298,7 +298,7 @@
return;
}
const QList<QAction *> actions = _toolBar->actions();
for (auto *action : actions) {

Check warning on line 301 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "action" of type "class QAction *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGll&open=AZ7bAhZ3USESh6HbvGll&pullRequest=10212
if (_actionGroupWidgets.contains(action)) {
action->trigger();
return;
Expand All @@ -306,14 +306,14 @@
}
}

void SettingsDialog::setInitialAccount(AccountState *account)

Check warning on line 309 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "account" of type "class OCC::AccountState *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlm&open=AZ7bAhZ3USESh6HbvGlm&pullRequest=10212
{
_initialAccount = account;
}

void SettingsDialog::showAccount(AccountState *account)

Check warning on line 314 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "account" of type "class OCC::AccountState *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlp&open=AZ7bAhZ3USESh6HbvGlp&pullRequest=10212

Check warning on line 314 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "account" is "class OCC::AccountState *".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlo&open=AZ7bAhZ3USESh6HbvGlo&pullRequest=10212

Check warning on line 314 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

This function should be declared "const".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGln&open=AZ7bAhZ3USESh6HbvGln&pullRequest=10212
{
auto *action = _actionForAccount.value(account->account().data());

Check warning on line 316 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "action" of type "class QAction *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlq&open=AZ7bAhZ3USESh6HbvGlq&pullRequest=10212
if (action) {
action->trigger();
}
Expand All @@ -324,7 +324,7 @@
const auto userModel = UserModel::instance();
const auto id = userModel->findUserIdForAccount(account);
UserModel::instance()->setCurrentUserId(id);
Systray::instance()->showWindow();
Systray::instance()->showQMLWindow();
}

void SettingsDialog::accountAdded(AccountState *s)
Expand Down Expand Up @@ -379,14 +379,14 @@

void SettingsDialog::slotAccountAvatarChanged()
{
auto *account = dynamic_cast<Account *>(sender());

Check warning on line 382 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this variable a pointer-to-const. The current type of "account" is "class OCC::Account *".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlr&open=AZ7bAhZ3USESh6HbvGlr&pullRequest=10212
if (!account) {
return;
}
updateAccountAvatar(account);
}

void SettingsDialog::updateAccountAvatar(const Account *account)

Check warning on line 389 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "account" of type "const class OCC::Account *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGls&open=AZ7bAhZ3USESh6HbvGls&pullRequest=10212
{
if (!account || !_actionForAccount.contains(account)) {
return;
Expand Down Expand Up @@ -450,9 +450,9 @@
}
}

void SettingsDialog::addSettingsPage(const QString &iconPath, const QString &title, QWidget *settingsPage, [[maybe_unused]] bool updateChannelAware)

Check warning on line 453 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "updateChannelAware" of type "_Bool" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlu&open=AZ7bAhZ3USESh6HbvGlu&pullRequest=10212

Check warning on line 453 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "settingsPage" of type "class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlt&open=AZ7bAhZ3USESh6HbvGlt&pullRequest=10212
{
auto *settingsAction = createColorAwareAction(iconPath, title);

Check warning on line 455 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "settingsAction" of type "class QAction *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlv&open=AZ7bAhZ3USESh6HbvGlv&pullRequest=10212
_actionGroup->addAction(settingsAction);
_toolBar->addAction(settingsAction);

Expand All @@ -461,11 +461,11 @@
settingsPage->setObjectName(objectName);
_stack->addWidget(settingsPage);

if (auto *generalSettingsPage = qobject_cast<GeneralSettings *>(settingsPage)) {

Check warning on line 464 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "generalSettingsPage" of type "class OCC::GeneralSettings *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlx&open=AZ7bAhZ3USESh6HbvGlx&pullRequest=10212

Check warning on line 464 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this variable a pointer-to-const. The current type of "generalSettingsPage" is "class OCC::GeneralSettings *".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlw&open=AZ7bAhZ3USESh6HbvGlw&pullRequest=10212
connect(this, &SettingsDialog::styleChanged, generalSettingsPage, &GeneralSettings::slotStyleChanged);
} else if (auto *advancedSettingsPage = qobject_cast<AdvancedSettings *>(settingsPage)) {

Check warning on line 466 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "advancedSettingsPage" of type "class OCC::AdvancedSettings *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlz&open=AZ7bAhZ3USESh6HbvGlz&pullRequest=10212

Check warning on line 466 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this variable a pointer-to-const. The current type of "advancedSettingsPage" is "class OCC::AdvancedSettings *".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGly&open=AZ7bAhZ3USESh6HbvGly&pullRequest=10212
connect(this, &SettingsDialog::styleChanged, advancedSettingsPage, &AdvancedSettings::slotStyleChanged);
} else if (auto *infoSettingsPage = qobject_cast<InfoSettings *>(settingsPage)) {

Check warning on line 468 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "infoSettingsPage" of type "class OCC::InfoSettings *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl1&open=AZ7bAhZ3USESh6HbvGl1&pullRequest=10212

Check warning on line 468 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this variable a pointer-to-const. The current type of "infoSettingsPage" is "class OCC::InfoSettings *".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl0&open=AZ7bAhZ3USESh6HbvGl0&pullRequest=10212
connect(this, &SettingsDialog::styleChanged, infoSettingsPage, &InfoSettings::slotStyleChanged);

#if defined(BUILD_UPDATER)
Expand All @@ -486,7 +486,7 @@
return;
}

const QScopedValueRollback<bool> updatingStyle(_updatingStyle, true);

Check warning on line 489 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Avoid explicitly specifying the template arguments by relying on the class template argument deduction.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl2&open=AZ7bAhZ3USESh6HbvGl2&pullRequest=10212
_toolBar->setStyleSheet(TOOLBAR_CSS);

auto separatorColor = palette().color(QPalette::Mid);
Expand All @@ -500,14 +500,14 @@
setStyleSheet(QStringLiteral(
"#Settings { background: palette(window); border-radius: 0; }"

/* Navigation */

Check warning on line 503 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Edit this comment to use the C++ format, i.e. "//".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlV&open=AZ7bAhZ3USESh6HbvGlV&pullRequest=10212
"#settings_navigation_scroll { background: palette(" BACKGROUND_PALETTE "); border-radius: 12px; padding: 4px; }"
"#settings_navigation { background: transparent; border: none; padding: 0px; }"

/* Content area */

Check warning on line 507 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Edit this comment to use the C++ format, i.e. "//".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlW&open=AZ7bAhZ3USESh6HbvGlW&pullRequest=10212
"#settings_content, #settings_content_scroll { background: palette(window); border-radius: 12px; }"

/* Panels */

Check warning on line 510 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Edit this comment to use the C++ format, i.e. "//".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGlX&open=AZ7bAhZ3USESh6HbvGlX&pullRequest=10212
"#generalGroupBox, #notificationsGroupBox, #advancedGroupBox, #syncBehaviorGroupBox,"
"#advancedActionsGroupBox, #aboutAndUpdatesGroupBox, #updatesGroupBox {"
" background: palette(" BACKGROUND_PALETTE ");"
Expand Down Expand Up @@ -581,7 +581,7 @@
using QToolButton::QToolButton;

protected:
void paintEvent(QPaintEvent *event) override

Check warning on line 584 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "event" of type "class QPaintEvent *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl3&open=AZ7bAhZ3USESh6HbvGl3&pullRequest=10212
{
Q_UNUSED(event)

Expand All @@ -593,7 +593,7 @@
}

private:
void initStyleOption(QStyleOptionToolButton *option) const override

Check warning on line 596 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "option" of type "class QStyleOptionToolButton *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl4&open=AZ7bAhZ3USESh6HbvGl4&pullRequest=10212
{
QToolButton::initStyleOption(option);
if (!option->text.isEmpty()) {
Expand All @@ -603,7 +603,7 @@
}
};

auto *btn = new SettingsNavigationButton(parent);

Check warning on line 606 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "btn" of type "class SettingsNavigationButton *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl5&open=AZ7bAhZ3USESh6HbvGl5&pullRequest=10212
QString objectName = QLatin1String("settingsdialog_toolbutton_");
objectName += text();
btn->setObjectName(objectName);
Expand Down Expand Up @@ -638,7 +638,7 @@
setGeometry(0, 0, settingsDialogDefaultWidth, settingsDialogDefaultHeight);
setMinimumSize(settingsDialogDefaultWidth, settingsDialogDefaultHeight);

auto *mainLayout = new QHBoxLayout(this);

Check warning on line 641 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "mainLayout" of type "class QHBoxLayout *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl6&open=AZ7bAhZ3USESh6HbvGl6&pullRequest=10212
mainLayout->setContentsMargins(12, 12, 12, 12);
mainLayout->setSpacing(12);
setLayout(mainLayout);
Expand All @@ -651,17 +651,17 @@
_toolBar->setMinimumWidth(220);
_toolBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);

auto *navigationContainer = new QWidget(this);

Check warning on line 654 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "navigationContainer" of type "class QWidget *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl7&open=AZ7bAhZ3USESh6HbvGl7&pullRequest=10212
navigationContainer->setObjectName("settings_navigation"_L1);
navigationContainer->setAttribute(Qt::WA_StyledBackground);

auto *navigationLayout = new QVBoxLayout(navigationContainer);

Check warning on line 658 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "navigationLayout" of type "class QVBoxLayout *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl8&open=AZ7bAhZ3USESh6HbvGl8&pullRequest=10212
navigationLayout->setContentsMargins(0, 0, 0, 0);
navigationLayout->setSpacing(0);
navigationLayout->addWidget(_toolBar);
navigationLayout->addStretch(1);

auto *navigationScroll = new QScrollArea(this);

Check warning on line 664 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "navigationScroll" of type "class QScrollArea *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl9&open=AZ7bAhZ3USESh6HbvGl9&pullRequest=10212
navigationScroll->setObjectName("settings_navigation_scroll"_L1);
navigationScroll->setWidgetResizable(true);
navigationScroll->setAlignment(Qt::AlignTop | Qt::AlignLeft);
Expand All @@ -674,7 +674,7 @@
_stack = new CurrentPageSizeStackedWidget(this);
_stack->setObjectName(u"settings_content"_s);

auto *contentScroll = new QScrollArea(this);

Check warning on line 677 in src/gui/settingsdialog.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unmodified variable "contentScroll" of type "class QScrollArea *" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7bAhZ3USESh6HbvGl-&open=AZ7bAhZ3USESh6HbvGl-&pullRequest=10212
contentScroll->setObjectName("settings_content_scroll"_L1);
contentScroll->setWidgetResizable(true);
contentScroll->setAlignment(Qt::AlignTop | Qt::AlignLeft);
Expand Down
Loading