mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: remove unused functions detected by cppcheck
Note: Some more functions were detected, but this are the ones I'm pretty sure we don't need.
This commit is contained in:
parent
0da72e22d3
commit
229ca307cf
@ -1213,16 +1213,6 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool
|
|||||||
newFriendMessageAlert(friendId);
|
newFriendMessageAlert(friendId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::onReceiptRecieved(int friendId, ReceiptNum receipt)
|
|
||||||
{
|
|
||||||
Friend* f = FriendList::findFriend(friendId);
|
|
||||||
if (!f) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
chatForms[friendId]->getOfflineMsgEngine()->onReceiptReceived(receipt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Widget::addFriendDialog(const Friend* frnd, ContentDialog* dialog)
|
void Widget::addFriendDialog(const Friend* frnd, ContentDialog* dialog)
|
||||||
{
|
{
|
||||||
uint32_t friendId = frnd->getId();
|
uint32_t friendId = frnd->getId();
|
||||||
@ -1551,21 +1541,6 @@ void Widget::removeFriend(int friendId)
|
|||||||
removeFriend(FriendList::findFriend(friendId), false);
|
removeFriend(FriendList::findFriend(friendId), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::clearContactsList()
|
|
||||||
{
|
|
||||||
assert(QThread::currentThread() == qApp->thread());
|
|
||||||
|
|
||||||
QList<Friend*> friends = FriendList::getAllFriends();
|
|
||||||
for (Friend* f : friends) {
|
|
||||||
removeFriend(f, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<Group*> groups = GroupList::getAllGroups();
|
|
||||||
for (Group* g : groups) {
|
|
||||||
removeGroup(g, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Widget::onDialogShown(GenericChatroomWidget* widget)
|
void Widget::onDialogShown(GenericChatroomWidget* widget)
|
||||||
{
|
{
|
||||||
widget->resetEventFlags();
|
widget->resetEventFlags();
|
||||||
@ -2355,21 +2330,6 @@ void Widget::searchCircle(CircleWidget* circleWidget)
|
|||||||
circleWidget->search(text, true, filterOnline(filter), filterOffline(filter));
|
circleWidget->search(text, true, filterOnline(filter), filterOffline(filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::searchItem(GenericChatItemWidget* chatItem, GenericChatItemWidget::ItemType type)
|
|
||||||
{
|
|
||||||
bool hide;
|
|
||||||
FilterCriteria filter = getFilterCriteria();
|
|
||||||
switch (type) {
|
|
||||||
case GenericChatItemWidget::GroupItem:
|
|
||||||
hide = filterGroups(filter);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
hide = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
chatItem->searchName(ui->searchContactText->text(), hide);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Widget::groupsVisible() const
|
bool Widget::groupsVisible() const
|
||||||
{
|
{
|
||||||
FilterCriteria filter = getFilterCriteria();
|
FilterCriteria filter = getFilterCriteria();
|
||||||
|
@ -122,7 +122,6 @@ public:
|
|||||||
bool newGroupMessageAlert(int groupId, bool notify);
|
bool newGroupMessageAlert(int groupId, bool notify);
|
||||||
bool getIsWindowMinimized();
|
bool getIsWindowMinimized();
|
||||||
void updateIcons();
|
void updateIcons();
|
||||||
void clearContactsList();
|
|
||||||
|
|
||||||
static QString fromDialogType(DialogType type);
|
static QString fromDialogType(DialogType type);
|
||||||
ContentDialog* createContentDialog() const;
|
ContentDialog* createContentDialog() const;
|
||||||
@ -141,7 +140,6 @@ public:
|
|||||||
static Status getStatusFromString(QString status);
|
static Status getStatusFromString(QString status);
|
||||||
|
|
||||||
void searchCircle(CircleWidget* circleWidget);
|
void searchCircle(CircleWidget* circleWidget);
|
||||||
void searchItem(GenericChatItemWidget* chatItem, GenericChatItemWidget::ItemType type);
|
|
||||||
bool groupsVisible() const;
|
bool groupsVisible() const;
|
||||||
|
|
||||||
void resetIcon();
|
void resetIcon();
|
||||||
@ -170,7 +168,6 @@ public slots:
|
|||||||
void onFriendMessageReceived(int friendId, const QString& message, bool isAction);
|
void onFriendMessageReceived(int friendId, const QString& message, bool isAction);
|
||||||
void onFriendRequestReceived(const ToxPk& friendPk, const QString& message);
|
void onFriendRequestReceived(const ToxPk& friendPk, const QString& message);
|
||||||
void updateFriendActivity(const Friend* frnd);
|
void updateFriendActivity(const Friend* frnd);
|
||||||
void onReceiptRecieved(int friendId, ReceiptNum receipt);
|
|
||||||
void onEmptyGroupCreated(int groupId, const QString& title);
|
void onEmptyGroupCreated(int groupId, const QString& title);
|
||||||
void onGroupInviteReceived(const GroupInvite& inviteInfo);
|
void onGroupInviteReceived(const GroupInvite& inviteInfo);
|
||||||
void onGroupInviteAccepted(const GroupInvite& inviteInfo);
|
void onGroupInviteAccepted(const GroupInvite& inviteInfo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user