Replace QStringLiteral with QLatin1String
This commit is contained in:
@@ -94,9 +94,9 @@ BehaviourSettingsPage::BehaviourSettingsPage(SettingsDialog *dialog, QWidget *pa
|
||||
|
||||
QString code = re_match.captured(1);
|
||||
QString lookup_code = QString(code)
|
||||
.replace(QStringLiteral("@latin"), QStringLiteral("_Latn"))
|
||||
.replace(QStringLiteral("_CN"), QStringLiteral("_Hans_CN"))
|
||||
.replace(QStringLiteral("_TW"), QStringLiteral("_Hant_TW"));
|
||||
.replace(QLatin1String("@latin"), QLatin1String("_Latn"))
|
||||
.replace(QLatin1String("_CN"), QLatin1String("_Hans_CN"))
|
||||
.replace(QLatin1String("_TW"), QLatin1String("_Hant_TW"));
|
||||
|
||||
QString language_name = QLocale::languageToString(QLocale(lookup_code).language());
|
||||
QString native_name = QLocale(lookup_code).nativeLanguageName();
|
||||
|
||||
@@ -156,7 +156,7 @@ void CollectionSettingsPage::Load() {
|
||||
ui_->expire_unavailable_songs_days->setValue(s.value("expire_unavailable_songs", 60).toInt());
|
||||
|
||||
QStringList filters = s.value("cover_art_patterns", QStringList() << QStringLiteral("front") << QStringLiteral("cover")).toStringList();
|
||||
ui_->cover_art_patterns->setText(filters.join(QStringLiteral(",")));
|
||||
ui_->cover_art_patterns->setText(filters.join(QLatin1Char(',')));
|
||||
|
||||
ui_->spinbox_cache_size->setValue(s.value(kSettingsCacheSize, kSettingsCacheSizeDefault).toInt());
|
||||
ui_->combobox_cache_size->setCurrentIndex(ui_->combobox_cache_size->findData(s.value(kSettingsCacheSizeUnit, static_cast<int>(CacheSizeUnit::MB)).toInt()));
|
||||
|
||||
@@ -222,11 +222,11 @@ void CoversSettingsPage::ProvidersCurrentItemChanged(QListWidgetItem *item_curre
|
||||
CoverProvider *provider = dialog()->app()->cover_providers()->ProviderByName(item_current->text());
|
||||
if (provider) {
|
||||
if (provider->AuthenticationRequired()) {
|
||||
if (provider->name() == QStringLiteral("Tidal") && !provider->IsAuthenticated()) {
|
||||
if (provider->name() == QLatin1String("Tidal") && !provider->IsAuthenticated()) {
|
||||
DisableAuthentication();
|
||||
ui_->label_auth_info->setText(tr("Use Tidal settings to authenticate."));
|
||||
}
|
||||
else if (provider->name() == QStringLiteral("Qobuz") && !provider->IsAuthenticated()) {
|
||||
else if (provider->name() == QLatin1String("Qobuz") && !provider->IsAuthenticated()) {
|
||||
DisableAuthentication();
|
||||
ui_->label_auth_info->setText(tr("Use Qobuz settings to authenticate."));
|
||||
}
|
||||
@@ -335,11 +335,11 @@ void CoversSettingsPage::LogoutClicked() {
|
||||
if (!provider) return;
|
||||
provider->Deauthenticate();
|
||||
|
||||
if (provider->name() == QStringLiteral("Tidal")) {
|
||||
if (provider->name() == QLatin1String("Tidal")) {
|
||||
DisableAuthentication();
|
||||
ui_->label_auth_info->setText(tr("Use Tidal settings to authenticate."));
|
||||
}
|
||||
else if (provider->name() == QStringLiteral("Qobuz")) {
|
||||
else if (provider->name() == QLatin1String("Qobuz")) {
|
||||
DisableAuthentication();
|
||||
ui_->label_auth_info->setText(tr("Use Qobuz settings to authenticate."));
|
||||
}
|
||||
@@ -371,7 +371,7 @@ void CoversSettingsPage::AuthenticationFailure(const QStringList &errors) {
|
||||
|
||||
if (!isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
||||
|
||||
QMessageBox::warning(this, tr("Authentication failed"), errors.join(QStringLiteral("\n")));
|
||||
QMessageBox::warning(this, tr("Authentication failed"), errors.join(QLatin1Char('\n')));
|
||||
|
||||
ui_->login_state->SetLoggedIn(LoginStateWidget::State::LoggedOut);
|
||||
ui_->button_authenticate->setEnabled(true);
|
||||
@@ -421,16 +421,16 @@ void CoversSettingsPage::AddAlbumCoverArtType(const QString &name, const QString
|
||||
|
||||
QString CoversSettingsPage::AlbumCoverArtTypeDescription(const QString &type) const {
|
||||
|
||||
if (type == QStringLiteral("art_unset")) {
|
||||
if (type == QLatin1String("art_unset")) {
|
||||
return tr("Manually unset (%1)").arg(type);
|
||||
}
|
||||
if (type == QStringLiteral("art_manual")) {
|
||||
if (type == QLatin1String("art_manual")) {
|
||||
return tr("Set through album cover search (%1)").arg(type);
|
||||
}
|
||||
if (type == QStringLiteral("art_automatic")) {
|
||||
if (type == QLatin1String("art_automatic")) {
|
||||
return tr("Automatically picked up from album directory (%1)").arg(type);
|
||||
}
|
||||
if (type == QStringLiteral("art_embedded")) {
|
||||
if (type == QLatin1String("art_embedded")) {
|
||||
return tr("Embedded album cover art (%1)").arg(type);
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ void LyricsSettingsPage::AuthenticationFailure(const QStringList &errors) {
|
||||
|
||||
if (!isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
||||
|
||||
QMessageBox::warning(this, tr("Authentication failed"), errors.join(QStringLiteral("\n")));
|
||||
QMessageBox::warning(this, tr("Authentication failed"), errors.join(QLatin1Char('\n')));
|
||||
|
||||
ui_->login_state->SetLoggedIn(LoginStateWidget::State::LoggedOut);
|
||||
ui_->button_authenticate->setEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user