general: change BARCODE_RAW_TEXT to write to new zint_symbol

fields `raw_segs` and `raw_seg_count` instead of `text`, and to
  do so for all symbologies, using new common funcs `rt_cpy()` etc.
MICROPDF417: return ECC percentage in top byte of `option_1`
DBAR_EXP_STK: return `option_2`/`option_3` feedback
CLI: change warning text "ignoring" -> "**IGNORED**"
GUI: show feedback for DBAR_EXP_STK, MICROPDF417, UPNQR
ctest: fix recent inability to run tests via "ctest" on Windows
  (MSVC) by using cmake 3.22 feature `ENVIRONMENT_MODIFICATION`
manual: document feedback and RAW_TEXT in new "Feedback" section;
  rephrase some symbology descriptions
test suite: new general-use arg "-a"; add `func_name` to context;
  new "test_bwipp" test for testing BWIPP against ZXing-C++
This commit is contained in:
gitlost 2025-03-28 10:02:19 +00:00
parent d1bf02e156
commit a6c225447e
120 changed files with 10511 additions and 5620 deletions

View file

@ -3598,12 +3598,9 @@ void MainWindow::automatic_info_set()
if (symbology == BARCODE_AZTEC || symbology == BARCODE_HIBC_AZTEC) {
if ((txt = m_optionWidget->findChild<QLineEdit*>(QSL("txtAztecAutoInfo")))) {
if (!isError) {
static const QString eccStrs[6] = {
"3 words", "< 5% + 3 words", "10% + 3 words", "23% + 3 words", "36% + 3 words", "50% + 3 words"
};
const int w = m_bc.bc.encodedWidth();
const int z = m_bc.bc.encodedOption2();
const int ecc = m_bc.bc.encodedOption1();
const int ecc = m_bc.bc.encodedOption1() >> 8; // Percentage
QString sizeStr, eccStr;
if (z >= 1 && z <= 36) {
if (z <= 4) {
@ -3612,8 +3609,10 @@ void MainWindow::automatic_info_set()
sizeStr = QSL("%1 X %2 (%3 Layers) (Zint %4)").arg(w).arg(w).arg(z - 4).arg(z);
}
}
if (ecc >= -1 && ecc <= 4) { // -1 indicates min 3, 0 indicates < 5% + 3
eccStr = eccStrs[ecc + 1];
if (ecc > 0 && ecc < 100) {
eccStr = QSL("%1% + 3 words").arg(ecc);
} else {
eccStr = QSL("3 words");
}
if (get_rad_val("radAztecAuto") && !sizeStr.isEmpty() && !eccStr.isEmpty()) {
txt->setText(QSL("%1, ECC %2").arg(sizeStr).arg(eccStr));
@ -3701,6 +3700,15 @@ void MainWindow::automatic_info_set()
}
}
} else if (symbology == BARCODE_DBAR_EXPSTK) {
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbDBESCols")))) {
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2()) >= 1 && opt <= 11) {
cmb->setItemText(0, QSL("Automatic %1 (%2 segments)").arg(opt).arg(opt * 2));
} else {
cmb->setItemText(0, QSL("Automatic"));
}
}
} else if (symbology == BARCODE_MAILMARK_2D) {
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMailmark2DSize")))) {
if (!isError && cmb->currentIndex() == 0 && (opt = m_bc.bc.encodedOption2())
@ -3790,6 +3798,13 @@ void MainWindow::automatic_info_set()
cmb->setItemText(0, QSL("Automatic"));
}
}
if ((lbl = m_optionWidget->findChild<QLabel*>(QSL("lblMPDFECCMsg")))) {
if (!isError && (opt = (m_bc.bc.encodedOption1() >> 8)) >= 0 && opt <= 99) {
lbl->setText(QSL("%1%").arg(opt));
} else {
lbl->setText(QSEmpty);
}
}
} else if (symbology == BARCODE_MICROQR) {
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbMQRSize")))) {
@ -3902,6 +3917,15 @@ void MainWindow::automatic_info_set()
txt->setText(QSEmpty);
}
}
} else if (symbology == BARCODE_UPNQR) {
if ((cmb = m_optionWidget->findChild<QComboBox*>(QSL("cmbUPNQRMask")))) {
if (!isError && cmb->currentIndex() == 0 && (opt = (m_bc.bc.encodedOption3() >> 8)) >= 1 && opt <= 8) {
cmb->setItemText(0, QSL("Automatic %1").arg(opt - 1));
} else {
cmb->setItemText(0, QSL("Automatic"));
}
}
}
}