smurfy / fahrplan

QT Application for Public transportation
GNU General Public License v2.0
58 stars 33 forks source link

Allow empty replies from Resrobot server #272

Open f03el opened 5 years ago

f03el commented 5 years ago

Sometimes, the server reply can be empty and still valid. This is for example the case with time table replies when there are no departures from a station (or at least not any departures matching the selected direction).

In order to do this change, I had to modify the signature of parseJson() to return a QVariant instead of a QVariantMap, so callers can check if the parsing succeeded in a better way than looking whether the returned map is empty. For symmetry, I also changed serializeToJson() correspondingly.

The other two backends using parseJson() (Matka and NineTwo) have been left with unchanged behaviour, since I'd rather not fix them unless broken.

Should solve #267.

@smurfy Please review.

f03el commented 5 years ago

@smurfy Bump. Do you think it's possible to merge this? As mentioned above, I hope to close issue #267.

smurfy commented 5 years ago

hi, sorry, i'm busy with other stuff and also need to reinstall all my QT versions. To test. If you like i can grant you write permission to the repo

f03el commented 5 years ago

No worries. I totally understand if you are busy and know it can be difficult to find the time for spare time projects like this. If you think it's feasible, I would be honoured to get write access to the repository.