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

fix(widget): only change group title once

Before we were connecting the same signal to the same slot for each group we created.
This commit is contained in:
Anthony Bilinski 2019-09-13 14:23:06 -07:00
parent 602671c9dc
commit f7a2a7d648
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -691,6 +691,7 @@ void Widget::onCoreChanged(Core& core)
connect(this, &Widget::statusSet, &core, &Core::setStatus);
connect(this, &Widget::friendRequested, &core, &Core::requestFriendship);
connect(this, &Widget::friendRequestAccepted, &core, &Core::acceptFriendRequest);
connect(this, &Widget::changeGroupTitle, &core, &Core::changeGroupTitle);
sharedMessageProcessorParams.setPublicKey(core.getSelfPublicKey().toString());
}
@ -2141,7 +2142,6 @@ Group* Widget::createGroup(uint32_t groupnumber, const GroupId& groupId)
connect(widget, &GroupWidget::middleMouseClicked, this, [=]() { removeGroup(groupId); });
connect(widget, &GroupWidget::chatroomWidgetClicked, form, &ChatForm::focusInput);
connect(newgroup, &Group::titleChangedByUser, this, &Widget::titleChangedByUser);
connect(this, &Widget::changeGroupTitle, core, &Core::changeGroupTitle);
connect(core, &Core::usernameSet, newgroup, &Group::setSelfName);
FilterCriteria filter = getFilterCriteria();