mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-01 08:52:45 +00:00
WIP: HttpLoader seems to work, Model still borked
This commit is contained in:
parent
e421adf733
commit
729e343661
1412 changed files with 13967 additions and 33794 deletions
|
@ -41,7 +41,7 @@ void {{className}}::setFromJson(QJsonObject source) {
|
|||
|
||||
}
|
||||
|
||||
QJsonObject {{className}}::toJson() {
|
||||
QJsonObject {{className}}::toJson() const {
|
||||
QJsonObject result;
|
||||
|
||||
{{#each properties as |property|}}
|
||||
|
@ -83,7 +83,12 @@ using {{className}} = Jellyfin::DTO::{{className}};
|
|||
|
||||
template <>
|
||||
|
||||
{{className}} fromJsonValue<{{className}}>(const QJsonValue &source) {
|
||||
if (!source.isObject()) throw new ParseException("Expected JSON Object");
|
||||
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>) {
|
||||
if (!source.isObject()) throw ParseException("Expected JSON Object");
|
||||
return {{className}}::fromJson(source.toObject());
|
||||
}
|
||||
|
||||
template<>
|
||||
QJsonValue toJsonValue(const {{className}} &source, convertType<{{className}}>) {
|
||||
return source.toJson();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue