Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
libktorrent
Commits
329f3664
Commit
329f3664
authored
Jul 24, 2022
by
Nicolas Fella
Browse files
Port away from deprecated QDateTime API
parent
690cbf71
Pipeline
#208532
failed with stage
in 2 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/torrent/torrentcontrol.cpp
View file @
329f3664
...
...
@@ -941,7 +941,7 @@ void TorrentControl::saveStats()
stats_file
->
write
(
"DISPLAY_NAME"
,
display_name
);
stats_file
->
write
(
"URL"
,
url
.
toDisplayString
());
stats_file
->
write
(
"TIME_ADDED"
,
QString
(
"%1"
).
arg
(
stats
.
time_added
.
to
Time_t
()));
stats_file
->
write
(
"TIME_ADDED"
,
QString
(
"%1"
).
arg
(
stats
.
time_added
.
to
SecsSinceEpoch
()));
stats_file
->
write
(
"SUPERSEEDING"
,
stats
.
superseeding
?
"1"
:
"0"
);
stats_file
->
sync
();
...
...
@@ -1030,7 +1030,7 @@ void TorrentControl::loadStats()
url
=
QUrl
(
stats_file
->
readString
(
"URL"
));
if
(
stats_file
->
hasKey
(
"TIME_ADDED"
))
stats
.
time_added
.
set
Time_t
(
stats_file
->
readULong
(
"TIME_ADDED"
));
stats
.
time_added
.
set
SecsSinceEpoch
(
stats_file
->
readULong
(
"TIME_ADDED"
));
else
stats
.
time_added
=
QDateTime
::
currentDateTime
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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