From 71a838b53e75a239174a0de09988415f64325e36 Mon Sep 17 00:00:00 2001 From: Jerome Pinguet Date: Tue, 9 May 2017 07:28:31 +0200 Subject: [PATCH] fix(profile): set maxLength on userName QLineEdit Set maxLength of userName QLineEdit to TOX_MAX_NAME_LENGTH Fixes #4335 --- src/widget/form/profileform.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widget/form/profileform.cpp b/src/widget/form/profileform.cpp index 763255af9..f14f39465 100644 --- a/src/widget/form/profileform.cpp +++ b/src/widget/form/profileform.cpp @@ -56,6 +56,10 @@ ProfileForm::ProfileForm(QWidget* parent) bodyUI->setupUi(this); core = Core::getInstance(); + bodyUI->userNameLabel->setToolTip(tr("Tox user names cannot exceed %1 characters.") + .arg(TOX_MAX_NAME_LENGTH)); + bodyUI->userName->setMaxLength(TOX_MAX_NAME_LENGTH); + // tox toxId = new ClickableTE(); toxId->setReadOnly(true);