notify user if email parsing failed

This commit is contained in:
2025-06-11 01:39:40 +03:00
parent 0a7018d13a
commit 55d75f413c
3 changed files with 45 additions and 16 deletions

View File

@@ -175,6 +175,15 @@ void MainWindow::on_parse_email_button_clicked() {
EmailParser email_parser;
std::map<std::string, std::string> paramsMap = email_parser.parse_file(filename.toStdString());
if (paramsMap.empty()) {
QMessageBox infoDialog;
infoDialog.setText(tr("QR code in this E-Mail was not found. If you are sure that the e-mail you supplied has qr code, please, contact the developer and send him the .eml file."));
infoDialog.setIcon(QMessageBox::Critical);
infoDialog.setWindowTitle(tr("QR code was not found in E-Mail"));
infoDialog.exec();
return;
}
set_check_params(paramsMap);
// QMessageBox infoDialog;
// infoDialog.setText(tr("This feature is under development. Wait it to appear in next updates."));