1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(group): Changed Group flags types to bool

This commit is contained in:
Diadlo 2016-08-30 02:11:33 +03:00
parent 8634e26694
commit eacdafff5f
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 10 additions and 9 deletions

View File

@ -148,22 +148,22 @@ bool Group::isSelfPeerNumber(int num) const
return num == selfPeerNum;
}
void Group::setEventFlag(int f)
void Group::setEventFlag(bool f)
{
hasNewMessages = f;
}
int Group::getEventFlag() const
bool Group::getEventFlag() const
{
return hasNewMessages;
}
void Group::setMentionedFlag(int f)
void Group::setMentionedFlag(bool f)
{
userWasMentioned = f;
}
int Group::getMentionedFlag() const
bool Group::getMentionedFlag() const
{
return userWasMentioned;
}

View File

@ -48,11 +48,11 @@ public:
GroupChatForm* getChatForm();
GroupWidget* getGroupWidget();
void setEventFlag(int f);
int getEventFlag() const;
void setEventFlag(bool f);
bool getEventFlag() const;
void setMentionedFlag(int f);
int getMentionedFlag() const;
void setMentionedFlag(bool f);
bool getMentionedFlag() const;
void updatePeer(int peerId, QString newName);
void setName(const QString& name);
@ -69,7 +69,8 @@ private:
GroupChatForm* chatForm;
QStringList peers;
QMap<QByteArray, QString> toxids;
int hasNewMessages, userWasMentioned;
bool hasNewMessages;
bool userWasMentioned;
int groupId;
int nPeers;
int selfPeerNum = -1;