mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-06 10:32:44 +00:00
Make model code compileable
This disables some application level logic, but I'm going to rewrite that using Lager anyway.
This commit is contained in:
parent
0358418926
commit
b9b08ab384
551 changed files with 8943 additions and 8809 deletions
|
@ -32,22 +32,23 @@
|
|||
namespace Jellyfin {
|
||||
namespace DTO {
|
||||
|
||||
CollectionCreationResult::CollectionCreationResult(QObject *parent) {}
|
||||
CollectionCreationResult::CollectionCreationResult() {}
|
||||
|
||||
CollectionCreationResult CollectionCreationResult::fromJson(QJsonObject source) {CollectionCreationResult instance;
|
||||
instance->setFromJson(source, false);
|
||||
CollectionCreationResult CollectionCreationResult::fromJson(QJsonObject source) {
|
||||
CollectionCreationResult instance;
|
||||
instance.setFromJson(source);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
void CollectionCreationResult::setFromJson(QJsonObject source) {
|
||||
m_jellyfinId = fromJsonValue<QUuid>(source["Id"]);
|
||||
m_jellyfinId = Jellyfin::Support::fromJsonValue<QUuid>(source["Id"]);
|
||||
|
||||
}
|
||||
|
||||
QJsonObject CollectionCreationResult::toJson() {
|
||||
QJsonObject result;
|
||||
result["Id"] = toJsonValue<QUuid>(m_jellyfinId);
|
||||
result["Id"] = Jellyfin::Support::toJsonValue<QUuid>(m_jellyfinId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -58,6 +59,17 @@ void CollectionCreationResult::setJellyfinId(QUuid newJellyfinId) {
|
|||
m_jellyfinId = newJellyfinId;
|
||||
}
|
||||
|
||||
} // NS DTO
|
||||
|
||||
namespace Support {
|
||||
|
||||
using CollectionCreationResult = Jellyfin::DTO::CollectionCreationResult;
|
||||
|
||||
template <>
|
||||
CollectionCreationResult fromJsonValue<CollectionCreationResult>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
return CollectionCreationResult::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
} // NS Jellyfin
|
||||
} // NS DTO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue