implement max lengths for input dialogs that are sent to the server (#4522)

* implement max lengths for input dialogs that are sent to the server

* missed a double setMaxLength

* implement max string lengths server side

* add custom getText dialog with max length

* fix deck storage tab and miscellaneous server side

* add max size for deck uploads

* final pass on client side limits
This commit is contained in:
ebbit1q 2022-01-16 23:57:01 +01:00 committed by GitHub
parent d61c604bf4
commit 994704d353
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 564 additions and 348 deletions

View file

@ -1,6 +1,7 @@
#include "dlg_edit_user.h"
#include "settingscache.h"
#include "stringsizes.h"
#include <QDebug>
#include <QDialogButtonBox>
@ -12,6 +13,7 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, QString country, QStrin
{
emailLabel = new QLabel(tr("Email:"));
emailEdit = new QLineEdit();
emailEdit->setMaxLength(MAX_NAME_LENGTH);
emailLabel->setBuddy(emailEdit);
emailEdit->setText(email);
@ -33,6 +35,7 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, QString country, QStrin
realnameLabel = new QLabel(tr("Real name:"));
realnameEdit = new QLineEdit();
realnameEdit->setMaxLength(MAX_NAME_LENGTH);
realnameLabel->setBuddy(realnameEdit);
realnameEdit->setText(realName);