Skip to content

Commit

Permalink
refactor: replace QDateTime::toTime_t with QDateTime::toSecsSinceEpoch
Browse files Browse the repository at this point in the history
  • Loading branch information
fanquake committed Aug 15, 2021
1 parent 9428f84 commit bfcde3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qt/recentrequeststablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ bool RecentRequestEntryLessThan::operator()(const RecentRequestEntry& left, cons
switch(column)
{
case RecentRequestsTableModel::Date:
return pLeft->date.toTime_t() < pRight->date.toTime_t();
return pLeft->date.toSecsSinceEpoch() < pRight->date.toSecsSinceEpoch();
case RecentRequestsTableModel::Label:
return pLeft->recipient.label < pRight->recipient.label;
case RecentRequestsTableModel::Message:
Expand Down
2 changes: 1 addition & 1 deletion src/qt/recentrequeststablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RecentRequestEntry

SERIALIZE_METHODS(RecentRequestEntry, obj) {
unsigned int date_timet;
SER_WRITE(obj, date_timet = obj.date.toTime_t());
SER_WRITE(obj, date_timet = obj.date.toSecsSinceEpoch());
READWRITE(obj.nVersion, obj.id, date_timet, obj.recipient);
SER_READ(obj, obj.date = QDateTime::fromSecsSinceEpoch(date_timet));
}
Expand Down

0 comments on commit bfcde3e

Please sign in to comment.