mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(group): Remove GroupWidget from Group
This commit is contained in:
parent
6c650f8b24
commit
070e33a46b
@ -48,7 +48,6 @@ Group::Group(int groupId, const QString& name, bool isAvGroupchat)
|
||||
Group::~Group()
|
||||
{
|
||||
delete chatForm;
|
||||
widget->deleteLater();
|
||||
}
|
||||
|
||||
void Group::updatePeer(int peerId, QString name)
|
||||
@ -135,16 +134,6 @@ GroupChatForm* Group::getChatForm()
|
||||
return chatForm;
|
||||
}
|
||||
|
||||
void Group::setGroupWidget(GroupWidget* widget)
|
||||
{
|
||||
this->widget = widget;
|
||||
}
|
||||
|
||||
GroupWidget* Group::getGroupWidget()
|
||||
{
|
||||
return widget;
|
||||
}
|
||||
|
||||
QStringList Group::getPeerList() const
|
||||
{
|
||||
return peers;
|
||||
|
@ -28,7 +28,6 @@
|
||||
#define RETRY_PEER_INFO_INTERVAL 500
|
||||
|
||||
class Friend;
|
||||
class GroupWidget;
|
||||
class GroupChatForm;
|
||||
class ToxPk;
|
||||
|
||||
@ -48,9 +47,6 @@ public:
|
||||
|
||||
GroupChatForm* getChatForm();
|
||||
|
||||
void setGroupWidget(GroupWidget* widget);
|
||||
GroupWidget* getGroupWidget();
|
||||
|
||||
void setEventFlag(bool f) override;
|
||||
bool getEventFlag() const override;
|
||||
|
||||
@ -70,7 +66,6 @@ signals:
|
||||
|
||||
private:
|
||||
QString title;
|
||||
GroupWidget* widget;
|
||||
GroupChatForm* chatForm;
|
||||
QStringList peers;
|
||||
QMap<QByteArray, QString> toxids;
|
||||
|
@ -1824,7 +1824,6 @@ Group* Widget::createGroup(int groupId)
|
||||
bool compact = Settings::getInstance().getCompactLayout();
|
||||
GroupWidget* widget = new GroupWidget(groupId, groupName, compact);
|
||||
groupWidgets[groupId] = widget;
|
||||
newgroup->setGroupWidget(widget);
|
||||
|
||||
contactListWidget->addGroupWidget(widget);
|
||||
widget->updateStatusLight();
|
||||
|
Loading…
x
Reference in New Issue
Block a user