diff --git a/src/chatmodel.cpp b/src/chatmodel.cpp index d88e95f..4bc12f5 100644 --- a/src/chatmodel.cpp +++ b/src/chatmodel.cpp @@ -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"), diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 73f2af4..c79dee4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1368,6 +1368,7 @@ void MainWindow::setupchatTab() { QObject::connect(ui->pushContact, &QPushButton::clicked, this , &MainWindow::renderContactRequest); ///////// Set selected Zaddr for Chat with Klick + ui->contactNameMemo->setText(""); QObject::connect(ui->listContactWidget, &QTableView::clicked, [=] () { @@ -1401,6 +1402,7 @@ void MainWindow::setupchatTab() { ui->listContactWidget->addAction(HushAction); ui->listContactWidget->addAction(requestHushAction); ui->listContactWidget->addAction(subatomicAction); + QObject::connect(requestHushAction, &QAction::triggered, [=]() { QModelIndex index = ui->listContactWidget->currentIndex(); QString label_contact = index.data(Qt::DisplayRole).toString(); @@ -1411,8 +1413,8 @@ void MainWindow::setupchatTab() { rpc->refresh(true); } - - MainWindow::showRequesthush(); + MainWindow::showRequesthush(); + }); QObject::connect(editAction, &QAction::triggered, [=]() {