|
|
|
@ -224,6 +224,11 @@ void GroupChatForm::updateUserNames()
@@ -224,6 +224,11 @@ void GroupChatForm::updateUserNames()
|
|
|
|
|
|
|
|
|
|
peerLabels.clear(); |
|
|
|
|
const int peersCount = group->getPeersCount(); |
|
|
|
|
|
|
|
|
|
// no need to do anything without a peer
|
|
|
|
|
if (peersCount == 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
peerLabels.reserve(peersCount); |
|
|
|
|
QVector<QLabel*> nickLabelList(peersCount); |
|
|
|
|
|
|
|
|
@ -262,6 +267,7 @@ void GroupChatForm::updateUserNames()
@@ -262,6 +267,7 @@ void GroupChatForm::updateUserNames()
|
|
|
|
|
{ |
|
|
|
|
return a->text().toLower() < b->text().toLower(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// remove comma from last sorted label
|
|
|
|
|
QLabel* const lastLabel = nickLabelList.last(); |
|
|
|
|
QString labelText = lastLabel->text(); |
|
|
|
|