Replace QStringLiteral with QLatin1String
This commit is contained in:
@@ -212,7 +212,7 @@ void SetLevels(const QString &levels) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (class_name.isEmpty() || class_name == QStringLiteral("*")) {
|
||||
if (class_name.isEmpty() || class_name == QLatin1Char('*')) {
|
||||
sDefaultLevel = static_cast<Level>(level);
|
||||
}
|
||||
else {
|
||||
@@ -272,10 +272,10 @@ static T CreateLogger(Level level, const QString &class_name, int line, const ch
|
||||
|
||||
QString function_line = class_name;
|
||||
if (line != -1) {
|
||||
function_line += QStringLiteral(":") + QString::number(line);
|
||||
function_line += QLatin1Char(':') + QString::number(line);
|
||||
}
|
||||
if (category) {
|
||||
function_line += QStringLiteral("(") + QLatin1String(category) + QStringLiteral(")");
|
||||
function_line += QLatin1Char('(') + QLatin1String(category) + QLatin1Char(')');
|
||||
}
|
||||
|
||||
QtMsgType type = QtDebugMsg;
|
||||
|
||||
@@ -118,11 +118,11 @@ TagReaderBase::Cover TagReaderBase::LoadCoverFromRequest(const QString &song_fil
|
||||
if (cover_mime_type.isEmpty()) {
|
||||
cover_mime_type = QMimeDatabase().mimeTypeForData(cover_data).name();
|
||||
}
|
||||
if (cover_mime_type == QStringLiteral("image/jpeg")) {
|
||||
if (cover_mime_type == QLatin1String("image/jpeg")) {
|
||||
qLog(Debug) << "Using cover from JPEG data for" << song_filename;
|
||||
return Cover(cover_data, cover_mime_type);
|
||||
}
|
||||
if (cover_mime_type == QStringLiteral("image/png")) {
|
||||
if (cover_mime_type == QLatin1String("image/png")) {
|
||||
qLog(Debug) << "Using cover from PNG data for" << song_filename;
|
||||
return Cover(cover_data, cover_mime_type);
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ void TagReaderTagLib::ParseID3v2Tag(TagLib::ID3v2::Tag *tag, QString *disc, QStr
|
||||
for (uint i = 0; i < map["COMM"].size(); ++i) {
|
||||
const TagLib::ID3v2::CommentsFrame *frame = dynamic_cast<const TagLib::ID3v2::CommentsFrame*>(map["COMM"][i]);
|
||||
|
||||
if (frame && TStringToQString(frame->description()) != QStringLiteral("iTunNORM")) {
|
||||
if (frame && TStringToQString(frame->description()) != QLatin1String("iTunNORM")) {
|
||||
TStringToStdString(frame->text(), song->mutable_comment());
|
||||
break;
|
||||
}
|
||||
@@ -871,7 +871,7 @@ bool TagReaderTagLib::SaveFile(const spb::tagreader::SaveFileRequest &request) c
|
||||
save_tags_options << QStringLiteral("embedded cover");
|
||||
}
|
||||
|
||||
qLog(Debug) << "Saving" << save_tags_options.join(QStringLiteral(", ")) << "to" << filename;
|
||||
qLog(Debug) << "Saving" << save_tags_options.join(QLatin1String(", ")) << "to" << filename;
|
||||
|
||||
const Cover cover = LoadCoverFromRequest(request);
|
||||
|
||||
@@ -1341,10 +1341,10 @@ void TagReaderTagLib::SetEmbeddedArt(TagLib::MP4::File *aac_file, TagLib::MP4::T
|
||||
}
|
||||
else {
|
||||
TagLib::MP4::CoverArt::Format cover_format = TagLib::MP4::CoverArt::Format::JPEG;
|
||||
if (mime_type == QStringLiteral("image/jpeg")) {
|
||||
if (mime_type == QLatin1String("image/jpeg")) {
|
||||
cover_format = TagLib::MP4::CoverArt::Format::JPEG;
|
||||
}
|
||||
else if (mime_type == QStringLiteral("image/png")) {
|
||||
else if (mime_type == QLatin1String("image/png")) {
|
||||
cover_format = TagLib::MP4::CoverArt::Format::PNG;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user