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

fix(profileform): Add toxme username limitation

This commit is contained in:
Polshakov Dmitry 2016-04-12 12:27:21 +03:00
parent 1f7e23d007
commit 132f87c05e

View File

@ -92,6 +92,10 @@ ProfileForm::ProfileForm(QWidget *parent) :
bodyUI->qrLabel->setWordWrap(true); bodyUI->qrLabel->setWordWrap(true);
QRegExp re("[^@ ]+");
QRegExpValidator* validator = new QRegExpValidator(re);
bodyUI->toxmeUsername->setValidator(validator);
profilePicture = new MaskablePixmapWidget(this, QSize(64, 64), ":/img/avatar_mask.svg"); profilePicture = new MaskablePixmapWidget(this, QSize(64, 64), ":/img/avatar_mask.svg");
profilePicture->setPixmap(QPixmap(":/img/contact_dark.svg")); profilePicture->setPixmap(QPixmap(":/img/contact_dark.svg"));
profilePicture->setContextMenuPolicy(Qt::CustomContextMenu); profilePicture->setContextMenuPolicy(Qt::CustomContextMenu);