mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-24 05:25:37 +00:00
Replace obsoleted QDateTime::fromTime_t()
This commit is contained in:
parent
3f962ba336
commit
56434fc8b9
@ -617,7 +617,7 @@ void TorrentHandle::removeAllTags()
|
|||||||
|
|
||||||
QDateTime TorrentHandle::addedTime() const
|
QDateTime TorrentHandle::addedTime() const
|
||||||
{
|
{
|
||||||
return QDateTime::fromTime_t(m_nativeStatus.added_time);
|
return QDateTime::fromSecsSinceEpoch(m_nativeStatus.added_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal TorrentHandle::ratioLimit() const
|
qreal TorrentHandle::ratioLimit() const
|
||||||
@ -1086,7 +1086,7 @@ int TorrentHandle::incompleteCount() const
|
|||||||
QDateTime TorrentHandle::lastSeenComplete() const
|
QDateTime TorrentHandle::lastSeenComplete() const
|
||||||
{
|
{
|
||||||
if (m_nativeStatus.last_seen_complete > 0)
|
if (m_nativeStatus.last_seen_complete > 0)
|
||||||
return QDateTime::fromTime_t(m_nativeStatus.last_seen_complete);
|
return QDateTime::fromSecsSinceEpoch(m_nativeStatus.last_seen_complete);
|
||||||
else
|
else
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@ -1094,7 +1094,7 @@ QDateTime TorrentHandle::lastSeenComplete() const
|
|||||||
QDateTime TorrentHandle::completedTime() const
|
QDateTime TorrentHandle::completedTime() const
|
||||||
{
|
{
|
||||||
if (m_nativeStatus.completed_time > 0)
|
if (m_nativeStatus.completed_time > 0)
|
||||||
return QDateTime::fromTime_t(m_nativeStatus.completed_time);
|
return QDateTime::fromSecsSinceEpoch(m_nativeStatus.completed_time);
|
||||||
else
|
else
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ bool GeoIPDatabase::parseMetadata(const QVariantHash &metadata, QString &error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHECK_METADATA_REQ(build_epoch, ULongLong);
|
CHECK_METADATA_REQ(build_epoch, ULongLong);
|
||||||
m_buildEpoch = QDateTime::fromTime_t(metadata.value("build_epoch").toULongLong());
|
m_buildEpoch = QDateTime::fromSecsSinceEpoch(metadata.value("build_epoch").toULongLong());
|
||||||
|
|
||||||
CHECK_METADATA_OPT(languages, QVariantList);
|
CHECK_METADATA_OPT(languages, QVariantList);
|
||||||
CHECK_METADATA_OPT(description, QVariantHash);
|
CHECK_METADATA_OPT(description, QVariantHash);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user