MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / ImportFromJson

Method ImportFromJson

App/Client/Favorite/FavoriteDatabase.cpp:453–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453bool 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
465bool CFavoriteDatabase::ImportFromJson(int parentId, const QJsonArray &obj)
466{

Callers

nothing calls this directly

Calls 2

isEmptyMethod · 0.45

Tested by

no test coverage detected