Use QString::compare with Qt::CaseInsensitive to reduce allocations

This commit is contained in:
Jonas Kvinge
2021-07-13 23:18:12 +02:00
parent a87863229f
commit 68dbc29f2c
16 changed files with 192 additions and 181 deletions

View File

@@ -296,7 +296,7 @@ void DiscogsCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id)
if (title_splitted.count() == 2) {
QString artist = title_splitted.first();
title = title_splitted.last();
if (artist.toLower() != search->artist.toLower() && title.toLower() != search->album.toLower()) continue;
if (artist.compare(search->artist, Qt::CaseInsensitive) != 0 && title.compare(search->album, Qt::CaseInsensitive) != 0) continue;
}
}