From 98431babb3463aee50c9d103ffdb81a2b010ff16 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Tue, 2 Jun 2020 21:26:34 +0200 Subject: [PATCH] set maximum chars to 235 --- src/chatmodel.cpp | 8 ++++---- src/mainwindow.h | 2 +- src/mainwindow.ui | 2 +- src/requestdialog.ui | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/chatmodel.cpp b/src/chatmodel.cpp index 2358ae9..09e54f3 100644 --- a/src/chatmodel.cpp +++ b/src/chatmodel.cpp @@ -526,14 +526,14 @@ void MainWindow::sendChat() { return; } - int max = 512; + int max = 235; QString chattext = ui->memoTxtChat->toPlainText(); int size = chattext.size(); if (size > max){ QMessageBox msg(QMessageBox::Critical, tr("Your Message is too long"), - tr("You can only write messages with 512 character maximum \n") + tr("\n Please reduce your message to 512 character."), + tr("You can only write messages with 235 character maximum \n") + tr("\n Please reduce your message to 235 character."), QMessageBox::Ok, this); msg.exec(); @@ -790,7 +790,7 @@ void MainWindow::ContactRequest() { return; } - int max = 512; + int max = 235; QString chattext = contactRequest.getMemo();; int size = chattext.size(); @@ -799,7 +799,7 @@ void MainWindow::ContactRequest() { // auto addr = ""; // if (! Settings::isZAddress(AddressBook::addressFromAddressLabel(addr->text()))) { QMessageBox msg(QMessageBox::Critical, tr("Your Message is too long"), - tr("You can only write messages with 512 character maximum \n") + tr("\n Please reduce your message to 512 character."), + tr("You can only write messages with 235 character maximum \n") + tr("\n Please reduce your message to 235 character."), QMessageBox::Ok, this); msg.exec(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 8c63540..bb56d5b 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -211,7 +211,7 @@ public: void updateDisplayChat(); private: - int maxlenchat = 512; + int maxlenchat = 235; QLabel* lenDisplayLabelchat = nullptr; QPushButton* sendChatButton = nullptr; }; diff --git a/src/mainwindow.ui b/src/mainwindow.ui index a715861..33e2b16 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1697,7 +1697,7 @@ QFrame::Sunken - 0 / 512 + 0 / 235 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/requestdialog.ui b/src/requestdialog.ui index e52c475..f12e3e6 100644 --- a/src/requestdialog.ui +++ b/src/requestdialog.ui @@ -101,7 +101,7 @@ - 0 / 512 + 0 / 235 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter