Browse Source

refactor: more rigorous types for GroupInvite

reviewable/pr4597/r4
noavarice 8 years ago
parent
commit
fd1fbebae0
No known key found for this signature in database
GPG Key ID: 52A50775BE13DF17
  1. 6
      src/model/groupinvite.cpp
  2. 6
      src/model/groupinvite.h

6
src/model/groupinvite.cpp

@ -25,8 +25,8 @@ @@ -25,8 +25,8 @@
* @brief This class contains information needed to create a group invite
*/
GroupInvite::GroupInvite(int32_t friendID, uint8_t inviteType, const QByteArray& data)
: friendId{friendID}
GroupInvite::GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data)
: friendId{friendId}
, type{inviteType}
, invite{data}
, date{QDateTime::currentDateTime()}
@ -39,7 +39,7 @@ bool GroupInvite::operator==(const GroupInvite& other) const @@ -39,7 +39,7 @@ bool GroupInvite::operator==(const GroupInvite& other) const
&& date == other.date;
}
int32_t GroupInvite::getFriendId() const
uint32_t GroupInvite::getFriendId() const
{
return friendId;
}

6
src/model/groupinvite.h

@ -27,16 +27,16 @@ @@ -27,16 +27,16 @@
class GroupInvite
{
public:
GroupInvite(int32_t friendID, uint8_t inviteType, const QByteArray& data);
GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data);
bool operator==(const GroupInvite& other) const;
int32_t getFriendId() const;
uint32_t getFriendId() const;
uint8_t getType() const;
QByteArray getInvite() const;
QDateTime getInviteDate() const;
private:
int32_t friendId;
uint32_t friendId;
uint8_t type;
QByteArray invite;
QDateTime date;

Loading…
Cancel
Save