Browse Source

Alias: remove unnecessary symbols + size limit

pull/662/head
apprb 11 years ago
parent
commit
c1ef9115d0
No known key found for this signature in database
GPG Key ID: B001911B5B22FB9B
  1. 3
      src/widget/friendwidget.cpp

3
src/widget/friendwidget.cpp

@ -227,6 +227,9 @@ void FriendWidget::setFriendAlias() @@ -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();

Loading…
Cancel
Save