Mercurial > minori
diff src/core/date.cpp @ 10:4b198a111713
Update
things actually compile now btw
qttest wants to fuck over the model but that might be my fault so /shrug
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sat, 16 Sep 2023 02:06:01 -0400 |
parents | 5c0397762b53 |
children | fc1bf97c528b |
line wrap: on
line diff
--- a/src/core/date.cpp Sun Sep 10 03:59:16 2023 -0400 +++ b/src/core/date.cpp Sat Sep 16 02:06:01 2023 -0400 @@ -103,7 +103,10 @@ } QDate Date::GetAsQDate() const { - return QDate(*year, *month, *day); + /* QDates don't (yet) support "missing" values */ + if (year.get() && month.get() && day.get()) + return QDate(*year, *month, *day); + else return QDate(); } nlohmann::json Date::GetAsAniListJson() const {