1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-06 18:32:45 +00:00

WIP: HttpLoader seems to work, Model still borked

This commit is contained in:
Chris Josten 2021-03-28 04:00:00 +02:00
parent e421adf733
commit 729e343661
1412 changed files with 13967 additions and 33794 deletions

View file

@ -55,7 +55,7 @@ void QuickConnectDto::setFromJson(QJsonObject source) {
}
QJsonObject QuickConnectDto::toJson() {
QJsonObject QuickConnectDto::toJson() const {
QJsonObject result;
result["Token"] = Jellyfin::Support::toJsonValue<QString>(m_token);
@ -76,10 +76,15 @@ namespace Support {
using QuickConnectDto = Jellyfin::DTO::QuickConnectDto;
template <>
QuickConnectDto fromJsonValue<QuickConnectDto>(const QJsonValue &source) {
if (!source.isObject()) throw new ParseException("Expected JSON Object");
QuickConnectDto fromJsonValue(const QJsonValue &source, convertType<QuickConnectDto>) {
if (!source.isObject()) throw ParseException("Expected JSON Object");
return QuickConnectDto::fromJson(source.toObject());
}
template<>
QJsonValue toJsonValue(const QuickConnectDto &source, convertType<QuickConnectDto>) {
return source.toJson();
}
} // NS DTO
} // NS Jellyfin