notify user if email parsing failed

This commit is contained in:
leca 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."));

View File

@ -296,42 +296,52 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="193"/>
<location filename="../mainwindow.cpp" line="180"/>
<source>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.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="182"/>
<source>QR code was not found in E-Mail</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="202"/>
<source>Please, add check(s) to parse</source>
<translation>Please, add check(s) to parse</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="195"/>
<location filename="../mainwindow.cpp" line="204"/>
<source>No checks to parse</source>
<translation>No checks to parse</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="262"/>
<location filename="../mainwindow.cpp" line="271"/>
<source>Captcha was not solved correctly!</source>
<translation>Captcha was not solved correctly!</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="264"/>
<location filename="../mainwindow.cpp" line="273"/>
<source>Captcha is incorrect</source>
<translation>Captcha is incorrect</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="268"/>
<location filename="../mainwindow.cpp" line="277"/>
<source>Internal server error. Please, try again later.</source>
<translation>Internal server error. Please, try again later.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="270"/>
<location filename="../mainwindow.cpp" line="279"/>
<source>Internal server error</source>
<translation>Internal server error</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="274"/>
<location filename="../mainwindow.cpp" line="283"/>
<source>Check not found. Please, ensure correctness of entered data.</source>
<translation>Check not found. Please, ensure correctness of entered data.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="276"/>
<location filename="../mainwindow.cpp" line="285"/>
<source>Check was not found</source>
<translation>Check was not found</translation>
</message>

View File

@ -276,42 +276,52 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="193"/>
<location filename="../mainwindow.cpp" line="180"/>
<source>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.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="182"/>
<source>QR code was not found in E-Mail</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="202"/>
<source>Please, add check(s) to parse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="195"/>
<location filename="../mainwindow.cpp" line="204"/>
<source>No checks to parse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="262"/>
<location filename="../mainwindow.cpp" line="271"/>
<source>Captcha was not solved correctly!</source>
<translation>Капча была решена неверно!</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="264"/>
<location filename="../mainwindow.cpp" line="273"/>
<source>Captcha is incorrect</source>
<translation>Капча введена неверно</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="268"/>
<location filename="../mainwindow.cpp" line="277"/>
<source>Internal server error. Please, try again later.</source>
<translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="270"/>
<location filename="../mainwindow.cpp" line="279"/>
<source>Internal server error</source>
<translation>Внутренняя ошибка сервера</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="274"/>
<location filename="../mainwindow.cpp" line="283"/>
<source>Check not found. Please, ensure correctness of entered data.</source>
<translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="276"/>
<location filename="../mainwindow.cpp" line="285"/>
<source>Check was not found</source>
<translation>Чек не найден</translation>
</message>