mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
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:
parent
d61c604bf4
commit
994704d353
37 changed files with 564 additions and 348 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include "dlg_tip_of_the_day.h"
|
||||
#include "dlg_update.h"
|
||||
#include "dlg_viewlog.h"
|
||||
#include "gettextwithmax.h"
|
||||
#include "localclient.h"
|
||||
#include "localserver.h"
|
||||
#include "localserverinterface.h"
|
||||
|
|
@ -426,10 +427,10 @@ void MainWindow::loginError(Response::ResponseCode r,
|
|||
break;
|
||||
case Response::RespAccountNotActivated: {
|
||||
bool ok = false;
|
||||
QString token = QInputDialog::getText(this, tr("Account activation"),
|
||||
tr("Your account has not been activated yet.\nYou need to provide "
|
||||
"the activation token received in the activation email."),
|
||||
QLineEdit::Normal, QString(), &ok);
|
||||
QString token = getTextWithMax(this, tr("Account activation"),
|
||||
tr("Your account has not been activated yet.\nYou need to provide "
|
||||
"the activation token received in the activation email."),
|
||||
QLineEdit::Normal, QString(), &ok);
|
||||
if (ok && !token.isEmpty()) {
|
||||
client->activateToServer(token);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue