Browse Source

Merge pull request #3188 from glassez/datetime

Fix time_t 0 special meaning.
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
93bbda851a
  1. 6
      src/core/bittorrent/torrenthandle.cpp

6
src/core/bittorrent/torrenthandle.cpp

@ -916,12 +916,18 @@ int TorrentHandle::incompleteCount() const
QDateTime TorrentHandle::lastSeenComplete() const QDateTime TorrentHandle::lastSeenComplete() const
{ {
if (m_nativeStatus.last_seen_complete > 0)
return QDateTime::fromTime_t(m_nativeStatus.last_seen_complete); return QDateTime::fromTime_t(m_nativeStatus.last_seen_complete);
else
return QDateTime();
} }
QDateTime TorrentHandle::completedTime() const QDateTime TorrentHandle::completedTime() const
{ {
if (m_nativeStatus.completed_time > 0)
return QDateTime::fromTime_t(m_nativeStatus.completed_time); return QDateTime::fromTime_t(m_nativeStatus.completed_time);
else
return QDateTime();
} }
int TorrentHandle::timeSinceUpload() const int TorrentHandle::timeSinceUpload() const

Loading…
Cancel
Save