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

refactor(group): Replace signal groupTitleChanged on Group::titleChanged

This commit is contained in:
Diadlo 2017-08-05 10:12:30 +03:00
parent 4fee43cded
commit aaf1029667
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
4 changed files with 2 additions and 6 deletions

View File

@ -107,7 +107,7 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
connect(nameLabel, &CroppingLabel::editFinished, this, [=](const QString& newName) {
if (!newName.isEmpty()) {
nameLabel->setText(newName);
emit groupTitleChanged(group->getId(), newName.left(128));
chatGroup->setName(newName);
}
});

View File

@ -41,9 +41,6 @@ public:
void onUserListChanged();
void peerAudioPlaying(int peer);
signals:
void groupTitleChanged(int groupnum, const QString& name);
private slots:
void onSendTriggered();
void onMicMuteToggle();

View File

@ -66,7 +66,6 @@ void GroupWidget::setTitle(const QString& newName)
if (!newName.isEmpty()) {
Group* g = GroupList::findGroup(groupId);
g->setName(newName);
emit g->getChatForm()->groupTitleChanged(groupId, newName.left(128));
}
}

View File

@ -1829,7 +1829,7 @@ Group* Widget::createGroup(int groupId)
connect(widget, &GroupWidget::chatroomWidgetClicked, form, &ChatForm::focusInput);
connect(form, &GroupChatForm::sendMessage, core, &Core::sendGroupMessage);
connect(form, &GroupChatForm::sendAction, core, &Core::sendGroupAction);
connect(form, &GroupChatForm::groupTitleChanged, core, &Core::changeGroupTitle);
connect(newgroup, &Group::titleChanged, core, &Core::changeGroupTitle);
FilterCriteria filter = getFilterCriteria();
widget->searchName(ui->searchContactText->text(), filterGroups(filter));