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

refactor(group): Move UI code out of Group::setName

This commit is contained in:
Diadlo 2017-08-02 23:38:05 +03:00
parent 14c2a30f4c
commit 9495a411cb
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 9 additions and 7 deletions

View File

@ -70,11 +70,6 @@ void Group::updatePeer(int peerId, QString name)
void Group::setName(const QString& name)
{
chatForm->setName(name);
if (widget->isActive())
GUI::setWindowTitle(name);
emit titleChanged(this->getGroupWidget());
}

View File

@ -1737,10 +1737,17 @@ void Widget::onGroupTitleChanged(int groupnumber, const QString& author, const Q
g->getChatForm()->addSystemInfoMessage(message, ChatMessage::INFO, curTime);
}
contactListWidget->renameGroupWidget(g->getGroupWidget(), title);
GroupWidget* widget = g->getGroupWidget();
contactListWidget->renameGroupWidget(widget, title);
g->getChatForm()->setName(title);
if (widget->isActive()) {
GUI::setWindowTitle(title);
}
g->setName(title);
FilterCriteria filter = getFilterCriteria();
g->getGroupWidget()->searchName(ui->searchContactText->text(), filterGroups(filter));
widget->searchName(ui->searchContactText->text(), filterGroups(filter));
}
void Widget::onGroupPeerAudioPlaying(int groupnumber, int peernumber)