Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Workspace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
64
Merge Requests
64
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma Workspace
Commits
f3432b54
Commit
f3432b54
authored
Jan 04, 2018
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QDateTime::fromTime_t -> QDateTime::fromSecsSinceEpoch
parent
a4feb54d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dataengines/weather/ions/wetter.com/ion_wettercom.cpp
dataengines/weather/ions/wetter.com/ion_wettercom.cpp
+3
-3
No files found.
dataengines/weather/ions/wetter.com/ion_wettercom.cpp
View file @
f3432b54
...
...
@@ -556,7 +556,7 @@ void WetterComIon::parseWeatherForecast(const QString& source, QXmlStreamReader&
if
(
elementName
==
QLatin1String
(
"date"
))
{
// we have parsed a complete day
forecastPeriod
->
period
=
QDateTime
::
from
Time_t
(
summaryUtc
Time
);
forecastPeriod
->
period
=
QDateTime
::
from
SecsSinceEpoch
(
summaryUtcTime
,
Qt
::
Local
Time
);
QString
weatherString
=
QString
::
number
(
summaryWeather
);
forecastPeriod
->
iconName
=
getWeatherIcon
(
dayIcons
(),
weatherString
);
...
...
@@ -579,13 +579,13 @@ void WetterComIon::parseWeatherForecast(const QString& source, QXmlStreamReader&
// yep, that field is written to more often than needed...
m_weatherData
[
source
].
timeDifference
=
localTime
-
utcTime
;
forecast
->
period
=
QDateTime
::
from
Time_t
(
utc
Time
);
forecast
->
period
=
QDateTime
::
from
SecsSinceEpoch
(
utcTime
,
Qt
::
Local
Time
);
QString
weatherString
=
QString
::
number
(
weather
);
forecast
->
tempHigh
=
tempMax
;
forecast
->
tempLow
=
tempMin
;
forecast
->
probability
=
probability
;
QTime
localWeatherTime
=
QDateTime
::
from
Time_t
(
utc
Time
).
time
();
QTime
localWeatherTime
=
QDateTime
::
from
SecsSinceEpoch
(
utcTime
,
Qt
::
Local
Time
).
time
();
localWeatherTime
=
localWeatherTime
.
addSecs
(
m_weatherData
[
source
].
timeDifference
);
qCDebug
(
IONENGINE_WETTERCOM
)
<<
"localWeatherTime ="
<<
localWeatherTime
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment