Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(profileform): Add toxme username limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
Diadlo committed Apr 12, 2016
1 parent 1f7e23d commit 132f87c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widget/form/profileform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ ProfileForm::ProfileForm(QWidget *parent) :

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->setPixmap(QPixmap(":/img/contact_dark.svg"));
profilePicture->setContextMenuPolicy(Qt::CustomContextMenu);
Expand Down

0 comments on commit 132f87c

Please sign in to comment.