prevent to send message without contact #81

This commit is contained in:
DenioD
2020-06-05 23:55:31 +02:00
parent e65cc54e79
commit ec3afa57ce
2 changed files with 5 additions and 3 deletions

View File

@@ -540,7 +540,7 @@ void MainWindow::sendChat() {
QString Name = ui->contactNameMemo->text();
int sizename = Name.size();
qDebug()<< sizename;
if ((sizename < 1) || (ui->memoTxtChat->toPlainText().trimmed().isEmpty())) {
if ((ui->contactNameMemo->text().isEmpty()) || (ui->memoTxtChat->toPlainText().trimmed().isEmpty())) {
QMessageBox msg(QMessageBox::Critical, tr("You have to select a contact and insert a Memo"),
tr("You have selected no Contact from Contactlist,\n") + tr("\nor your Memo is empty"),