Use QStringLiteral

This commit is contained in:
Jonas Kvinge
2024-04-09 23:20:26 +02:00
parent 3cfffa5fbb
commit 58944993b8
233 changed files with 3885 additions and 3885 deletions

View File

@@ -40,23 +40,23 @@ QJsonObject JsonCoverProvider::ExtractJsonObj(const QByteArray &data) {
QJsonDocument json_doc = QJsonDocument::fromJson(data, &json_error);
if (json_error.error != QJsonParseError::NoError) {
Error(QString("Failed to parse json data: %1").arg(json_error.errorString()));
Error(QStringLiteral("Failed to parse json data: %1").arg(json_error.errorString()));
return QJsonObject();
}
if (json_doc.isEmpty()) {
Error("Received empty Json document.", data);
Error(QStringLiteral("Received empty Json document."), data);
return QJsonObject();
}
if (!json_doc.isObject()) {
Error("Json document is not an object.", json_doc);
Error(QStringLiteral("Json document is not an object."), json_doc);
return QJsonObject();
}
QJsonObject json_obj = json_doc.object();
if (json_obj.isEmpty()) {
Error("Received empty Json object.", json_doc);
Error(QStringLiteral("Received empty Json object."), json_doc);
return QJsonObject();
}