mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3202
PKEv (1): fix(friendwidget):the limitation of the group's name in the shortcut menu
This commit is contained in:
commit
d9fd513a64
|
@ -89,7 +89,13 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
|
||||
for (Group* group : GroupList::getAllGroups())
|
||||
{
|
||||
QAction* groupAction = inviteMenu->addAction(tr("Invite to group '%1'").arg(group->getGroupWidget()->getName()));
|
||||
int maxNameLen = 30;
|
||||
QString name = group->getGroupWidget()->getName();
|
||||
if ( name.length() > maxNameLen )
|
||||
{
|
||||
name = name.left(maxNameLen).trimmed() + "..";
|
||||
}
|
||||
QAction* groupAction = inviteMenu->addAction(tr("Invite to group '%1'").arg(name));
|
||||
groupActions[groupAction] = group;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user