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

Alias: remove unnecessary symbols + size limit

This commit is contained in:
apprb 2014-11-08 01:40:22 +09:00
parent 58eebcb2a6
commit c1ef9115d0
No known key found for this signature in database
GPG Key ID: B001911B5B22FB9B

View File

@ -227,6 +227,9 @@ void FriendWidget::setFriendAlias()
if (ok)
{
alias = alias.trimmed();
alias.remove(QRegExp("[\t\n\v\f\r]"));
alias = alias.left(128); // same as TOX_MAX_NAME_LENGTH
f->setAlias(alias);
Settings::getInstance().setFriendAlias(f->getToxID(), alias);
hide();