Replace QStringLiteral with QLatin1String
This commit is contained in:
@@ -117,7 +117,7 @@ PlaylistBackend::PlaylistList PlaylistBackend::GetPlaylists(const GetPlaylistsFl
|
||||
}
|
||||
QString condition;
|
||||
if (!condition_list.isEmpty()) {
|
||||
condition = QStringLiteral(" WHERE ") + condition_list.join(QStringLiteral(" OR "));
|
||||
condition = QLatin1String(" WHERE ") + condition_list.join(QLatin1String(" OR "));
|
||||
}
|
||||
|
||||
SqlQuery q(db);
|
||||
|
||||
@@ -124,7 +124,7 @@ PlaylistContainer::PlaylistContainer(QWidget *parent)
|
||||
QObject::connect(ui_->playlist, &PlaylistView::FocusOnFilterSignal, this, &PlaylistContainer::FocusOnFilter);
|
||||
ui_->search_field->installEventFilter(this);
|
||||
|
||||
QString available_fields = PlaylistFilter().column_names().keys().join(QStringLiteral(", "));
|
||||
QString available_fields = PlaylistFilter().column_names().keys().join(QLatin1String(", "));
|
||||
ui_->search_field->setToolTip(
|
||||
QStringLiteral("<html><head/><body><p>") +
|
||||
tr("Prefix a search term with a field name to limit the search to that field, e.g.:") +
|
||||
@@ -136,7 +136,7 @@ PlaylistContainer::PlaylistContainer(QWidget *parent)
|
||||
QStringLiteral("</p><p>") +
|
||||
|
||||
tr("Search terms for numerical fields can be prefixed with %1 or %2 to refine the search, e.g.: ")
|
||||
.arg(QStringLiteral(" =, !=, <, >, <="), QStringLiteral(">=")) +
|
||||
.arg(QLatin1String(" =, !=, <, >, <="), QStringLiteral(">=")) +
|
||||
QStringLiteral("<span style=\"font-weight:600;\">") +
|
||||
tr("rating") +
|
||||
QStringLiteral("</span>") +
|
||||
@@ -145,7 +145,7 @@ PlaylistContainer::PlaylistContainer(QWidget *parent)
|
||||
QStringLiteral("</p><p>") +
|
||||
|
||||
tr("Multiple search terms can also be combined with \"%1\" (default) and \"%2\", as well as grouped with parentheses. ")
|
||||
.arg(QStringLiteral("AND"), QStringLiteral("OR")) +
|
||||
.arg(QLatin1String("AND"), QLatin1String("OR")) +
|
||||
|
||||
QStringLiteral("</p><p><span style=\"font-weight:600;\">") +
|
||||
tr("Available fields") +
|
||||
|
||||
@@ -68,7 +68,7 @@ QString PlaylistListModel::ItemPath(const QStandardItem *item) {
|
||||
current = current->parent();
|
||||
}
|
||||
|
||||
return components.join(QStringLiteral("/"));
|
||||
return components.join(QLatin1Char('/'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ void PlaylistTabBar::RemoveTab(const int id) {
|
||||
void PlaylistTabBar::set_text_by_id(const int id, const QString &text) {
|
||||
|
||||
QString new_text = text;
|
||||
new_text = new_text.replace(QLatin1String("&"), QLatin1String("&&"));
|
||||
new_text = new_text.replace(QLatin1Char('&'), QLatin1String("&&"));
|
||||
setTabText(index_of(id), new_text);
|
||||
setTabToolTip(index_of(id), text);
|
||||
|
||||
|
||||
@@ -1399,7 +1399,7 @@ void PlaylistView::CopyCurrentSongToClipboard() const {
|
||||
|
||||
QMimeData *mime_data = new QMimeData;
|
||||
mime_data->setUrls(QList<QUrl>() << url);
|
||||
mime_data->setText(columns.join(QStringLiteral(" - ")));
|
||||
mime_data->setText(columns.join(QLatin1String(" - ")));
|
||||
|
||||
QApplication::clipboard()->setMimeData(mime_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user