mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Simplify code
This commit is contained in:
@@ -136,9 +136,9 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
|||||||
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = 0;
|
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QDateTime dt = QDateTime::currentDateTime();
|
const qint64 dt = (QDateTime::currentDateTime().toSecsSinceEpoch()
|
||||||
dt = dt.addSecs(-torrent.timeSinceActivity());
|
- torrent.timeSinceActivity());
|
||||||
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = dt.toSecsSinceEpoch();
|
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user