forked from blue/squawk
some refactoring, some improvements
This commit is contained in:
parent
be466fbad1
commit
e31ef78e71
13 changed files with 188 additions and 147 deletions
|
@ -136,6 +136,14 @@ enum class Support {
|
|||
};
|
||||
Q_ENUM_NS(Support)
|
||||
|
||||
enum class Possible {
|
||||
unknown,
|
||||
discovering,
|
||||
present,
|
||||
abscent
|
||||
};
|
||||
Q_ENUM_NS(Possible)
|
||||
|
||||
enum class TrustLevel {
|
||||
/// The key's trust is not decided.
|
||||
undecided,
|
||||
|
|
|
@ -268,7 +268,9 @@ QDataStream& operator<<(QDataStream& out, const Shared::Message& info) {
|
|||
out << info.rTo;
|
||||
out << info.id;
|
||||
out << info.body;
|
||||
out << info.time;
|
||||
quint64 msecs = info.time.toMSecsSinceEpoch();
|
||||
out << msecs;
|
||||
|
||||
out << info.thread;
|
||||
out << (quint8)info.type;
|
||||
out << info.outgoing;
|
||||
|
@ -297,7 +299,11 @@ QDataStream & operator>>(QDataStream& in, Shared::Message& info) {
|
|||
in >> info.rTo;
|
||||
in >> info.id;
|
||||
in >> info.body;
|
||||
in >> info.time;
|
||||
|
||||
quint64 msecs;
|
||||
in >> msecs;
|
||||
info.time = QDateTime::fromMSecsSinceEpoch(msecs);
|
||||
|
||||
in >> info.thread;
|
||||
quint8 t;
|
||||
in >> t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue