-struct UserId : public SignedId {
- inline UserId(int _id = 0) : SignedId(_id) {}
- //inline operator QVariant() const { return QVariant::fromValue<UserId>(*this); } // no automatic conversion!
+ inline bool operator==(const SignedId64& other) const { return id == other.id; }
+ inline bool operator!=(const SignedId64& other) const { return id != other.id; }
+ inline bool operator<(const SignedId64& other) const { return id < other.id; }
+ inline bool operator<=(const SignedId64& other) const { return id <= other.id; }
+ inline bool operator>(const SignedId64& other) const { return id > other.id; }
+ inline bool operator>=(const SignedId64& other) const { return id >= other.id; }
+ inline bool operator==(qint64 i) const { return id == i; }
+ inline bool operator!=(qint64 i) const { return id != i; }
+ inline bool operator<(qint64 i) const { return id < i; }
+ inline bool operator>(qint64 i) const { return id > i; }
+ inline bool operator<=(qint64 i) const { return id <= i; }
+
+ inline SignedId64 operator++(int)
+ {
+ id++;
+ return *this;
+ }
+ // inline operator int() const { return toQint64(); } // no automatic conversion!
+
+ friend QDataStream& operator>>(QDataStream& in, SignedId64& signedId);