mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-26 17:25:13 +01:00
Fix itunes search.
Using the [] operator on a non-const QJsonObject inserts an item. The test for an error message was always positive. Use the contains method instead.
This commit is contained in:
parent
415e4aa2ec
commit
a5db937d23
@ -88,7 +88,7 @@ void ITunesSearchPage::SearchFinished(QNetworkReply* reply) {
|
||||
QJsonObject json_data = json_document.object();
|
||||
|
||||
// Was there an error message in the JSON?
|
||||
if (!json_data["errorMessage"].isUndefined()) {
|
||||
if (json_data.contains("errorMessage")) {
|
||||
QMessageBox::warning(this, tr("Failed to fetch podcasts"),
|
||||
json_data["errorMessage"].toString());
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user