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:
parent
8634e26694
commit
eacdafff5f
|
@ -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;
|
||||
}
|
||||
|
|
11
src/group.h
11
src/group.h
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user