| 451 | } |
| 452 | |
| 453 | bool CFavoriteDatabase::ImportFromJson(const QJsonObject &obj) |
| 454 | { |
| 455 | QJsonArray favorites = obj["favorite"].toArray(); |
| 456 | if(favorites.isEmpty()) { |
| 457 | SetError(tr("The file format is error. Json without \"favorite\"")); |
| 458 | qCritical(log) << GetError(); |
| 459 | return false; |
| 460 | } |
| 461 | |
| 462 | return ImportFromJson(0, favorites); |
| 463 | } |
| 464 | |
| 465 | bool CFavoriteDatabase::ImportFromJson(int parentId, const QJsonArray &obj) |
| 466 | { |
nothing calls this directly
no test coverage detected