Use QStringLiteral
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user