[weather] Fix broken observation display for temperature of 0 °

Authored by kossebau on Nov 18 2018, 2:22 PM.

Description

[weather] Fix broken observation display for temperature of 0 °

Summary:
For that also deduplicate any data extraction & conversion logic
in helper methods for consistency

Test Plan:
Observation temperature of 0 ° no longer is shown as empty string,
all other data is shown as before (tested by hardcoding 0 as temperature in
the dataengine, to not have to wait for the next evening ;) ).

Reviewers: Plasma, broulik

Subscribers: davidedmundson, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D16977

Details