aboutsummaryrefslogtreecommitdiff
path: root/src/qt/recentrequeststablemodel.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2020-05-20 10:16:41 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2020-05-20 10:16:41 -0700
commit65c589e45e8b8914698a0fd25cd5aafdda30869c (patch)
tree5b99c6e0e4419a1f1d51ee4262028ab681ba9a55 /src/qt/recentrequeststablemodel.h
parent448bdff26307981b7e32ba5610dad6674c1fe46d (diff)
Convert Qt to new serialization
Diffstat (limited to 'src/qt/recentrequeststablemodel.h')
-rw-r--r--src/qt/recentrequeststablemodel.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index addf5ad0ae..c0bd3461bb 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -24,19 +24,11 @@ public:
QDateTime date;
SendCoinsRecipient recipient;
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action) {
- unsigned int nDate = date.toTime_t();
-
- READWRITE(this->nVersion);
- READWRITE(id);
- READWRITE(nDate);
- READWRITE(recipient);
-
- if (ser_action.ForRead())
- date = QDateTime::fromTime_t(nDate);
+ SERIALIZE_METHODS(RecentRequestEntry, obj) {
+ unsigned int date_timet;
+ SER_WRITE(obj, date_timet = obj.date.toTime_t());
+ READWRITE(obj.nVersion, obj.id, date_timet, obj.recipient);
+ SER_READ(obj, obj.date = QDateTime::fromTime_t(date_timet));
}
};