Fix various clazy warnings

This commit is contained in:
Jonas Kvinge
2021-03-21 04:47:11 +01:00
parent 20c1c1d4be
commit 78588d8cdf
92 changed files with 337 additions and 234 deletions

View File

@@ -118,18 +118,20 @@ void LyricsSettingsPage::CurrentItemChanged(QListWidgetItem *item_current, QList
ui_->providers_up->setEnabled(row != 0);
ui_->providers_down->setEnabled(row != ui_->providers->count() - 1);
LyricsProvider *provider = dialog()->app()->lyrics_providers()->ProviderByName(item_current->text());
if (provider && provider->AuthenticationRequired()) {
ui_->login_state->SetLoggedIn(provider->IsAuthenticated() ? LoginStateWidget::LoggedIn : LoginStateWidget::LoggedOut);
ui_->button_authenticate->setEnabled(true);
ui_->button_authenticate->show();
ui_->login_state->show();
ui_->label_auth_info->setText(QString("%1 needs authentication.").arg(provider->name()));
if (provider) {
if (provider->AuthenticationRequired()) {
ui_->login_state->SetLoggedIn(provider->IsAuthenticated() ? LoginStateWidget::LoggedIn : LoginStateWidget::LoggedOut);
ui_->button_authenticate->setEnabled(true);
ui_->button_authenticate->show();
ui_->login_state->show();
ui_->label_auth_info->setText(QString("%1 needs authentication.").arg(provider->name()));
}
else {
DisableAuthentication();
ui_->label_auth_info->setText(QString("%1 does not need authentication.").arg(provider->name()));
}
provider_selected_ = true;
}
else {
DisableAuthentication();
ui_->label_auth_info->setText(QString("%1 does not need authentication.").arg(provider->name()));
}
provider_selected_ = true;
}
else {
DisableAuthentication();