mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(groupinviteform): Deleting made clearer
This commit is contained in:
parent
24efaf0594
commit
7b4118a1a3
@ -160,16 +160,9 @@ void GroupInviteForm::deleteInviteButtons(QWidget* widget)
|
|||||||
{
|
{
|
||||||
QList<QPushButton*> buttons = widget->findChildren<QPushButton*>();
|
QList<QPushButton*> buttons = widget->findChildren<QPushButton*>();
|
||||||
|
|
||||||
if (acceptButtons.contains(buttons.at(0)))
|
QSet<QPushButton*> set = QSet<QPushButton*>::fromList(buttons);
|
||||||
{
|
acceptButtons.subtract(set);
|
||||||
acceptButtons.remove(buttons.at(0));
|
rejectButtons.subtract(set);
|
||||||
rejectButtons.remove(buttons.at(1));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
acceptButtons.remove(buttons.at(1));
|
|
||||||
rejectButtons.remove(buttons.at(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<CroppingLabel*> labels = widget->findChildren<CroppingLabel*>();
|
QList<CroppingLabel*> labels = widget->findChildren<CroppingLabel*>();
|
||||||
groupLabels.remove(labels.at(0));
|
groupLabels.remove(labels.at(0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user