mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Replace obsoleted QDateTime::toTime_t()
This commit is contained in:
parent
cfe83275d3
commit
2346bc8f7c
2 changed files with 6 additions and 6 deletions
|
@ -106,8 +106,8 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
|||
{KEY_TORRENT_SUPER_SEEDING, torrent.superSeeding()},
|
||||
{KEY_TORRENT_FORCE_START, torrent.isForced()},
|
||||
{KEY_TORRENT_SAVE_PATH, Utils::Fs::toNativePath(torrent.savePath())},
|
||||
{KEY_TORRENT_ADDED_ON, torrent.addedTime().toTime_t()},
|
||||
{KEY_TORRENT_COMPLETION_ON, torrent.completedTime().toTime_t()},
|
||||
{KEY_TORRENT_ADDED_ON, torrent.addedTime().toSecsSinceEpoch()},
|
||||
{KEY_TORRENT_COMPLETION_ON, torrent.completedTime().toSecsSinceEpoch()},
|
||||
{KEY_TORRENT_TRACKER, torrent.currentTracker()},
|
||||
{KEY_TORRENT_DL_LIMIT, torrent.downloadLimit()},
|
||||
{KEY_TORRENT_UP_LIMIT, torrent.uploadLimit()},
|
||||
|
@ -121,7 +121,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
|||
{KEY_TORRENT_MAX_SEEDING_TIME, torrent.maxSeedingTime()},
|
||||
{KEY_TORRENT_RATIO_LIMIT, torrent.ratioLimit()},
|
||||
{KEY_TORRENT_SEEDING_TIME_LIMIT, torrent.seedingTimeLimit()},
|
||||
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, torrent.lastSeenComplete().toTime_t()},
|
||||
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, torrent.lastSeenComplete().toSecsSinceEpoch()},
|
||||
{KEY_TORRENT_AUTO_TORRENT_MANAGEMENT, torrent.isAutoTMMEnabled()},
|
||||
{KEY_TORRENT_TIME_ACTIVE, torrent.activeTime()},
|
||||
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
||||
|
@ -138,7 +138,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
|||
else {
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
dt = dt.addSecs(-torrent.timeSinceActivity());
|
||||
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = dt.toTime_t();
|
||||
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = dt.toSecsSinceEpoch();
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue