1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-10-29 06:12:31 +00:00

MAXICODE: improve primary/SCM error messages

GUI: enable SCM Prefix Version default (96) as special value -1 &
  improve some SCM Prefix tooltips;
qzint.cpp: adjust CLI Equivalent to use bare "--scmvv" if default
general: fix some copyright dates, line wraps
This commit is contained in:
gitlost
2026-10-22 11:21:42 +01:00
parent c20bd251f0
commit 9dd9791c43
13 changed files with 68 additions and 36 deletions
+2 -1
View File
@@ -85,7 +85,8 @@ INTERNAL int zint_codabar(struct zint_symbol *symbol, unsigned char source[], in
/* And must not use A, B, C or D otherwise (BS EN 798:1995 4.3.2) */
if ((i = z_not_sane(CALCIUM_INNER_F, source + 1, length - 2))) {
return z_errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 363,
"Invalid character at position %d in input (cannot contain \"A\", \"B\", \"C\" or \"D\")", i + 1);
"Invalid character at position %d in input (cannot contain \"A\", \"B\", \"C\" or \"D\")",
i + 1);
}
/* Add check character: 1 don't show to HRT, 2 do show to HRT
+1 -1
View File
@@ -1,7 +1,7 @@
/* gif.c - Handles output to gif file */
/*
libzint - the open source barcode library
Copyright (C) 2009-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+8 -7
View File
@@ -1,7 +1,7 @@
/* maxicode.c - Handles MaxiCode */
/*
libzint - the open source barcode library
Copyright (C) 2010-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2010-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -564,7 +564,7 @@ INTERNAL int zint_maxicode(struct zint_symbol *symbol, struct zint_seg segs[], c
lp = (int) strlen(symbol->primary);
if (lp == 0) {
if (mode == 0) { /* Require primary message to auto-determine between 2 and 3 */
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 554, "Primary Message empty");
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 554, "Primary (Structured Carrier Message) empty");
}
mode = 4;
} else {
@@ -592,10 +592,10 @@ INTERNAL int zint_maxicode(struct zint_symbol *symbol, struct zint_seg segs[], c
}
if (lp < 7 || lp > 15) { /* 1 to 9 character postcode + 3 digit country code + 3 digit service class */
if (lp == 0) {
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 548, "Primary Message empty");
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 548, "Primary (Structured Carrier Message) empty");
}
return z_errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 551,
"Primary Message length %d wrong (7 to 15 characters required)", lp);
"Primary (Structured Carrier Message) length %d wrong (7 to 15 characters required)", lp);
}
postcode_len = lp - 6;
@@ -604,7 +604,7 @@ INTERNAL int zint_maxicode(struct zint_symbol *symbol, struct zint_seg segs[], c
if (countrycode == -1 || service == -1) { /* Check that country code and service are numeric */
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 552,
"Non-numeric country code or service class in Primary Message");
"Non-numeric country code or service class in primary (Structured Carrier Message)");
}
memcpy(postcode, symbol->primary, postcode_len);
@@ -618,7 +618,8 @@ INTERNAL int zint_maxicode(struct zint_symbol *symbol, struct zint_seg segs[], c
break;
}
if (!z_isdigit(postcode[i])) {
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 555, "Non-numeric postcode in Primary Message");
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 555,
"Non-numeric postcode in primary (Structured Carrier Message)");
}
}
if (countrycode == 840 && postcode_len == 5) {
@@ -640,7 +641,7 @@ INTERNAL int zint_maxicode(struct zint_symbol *symbol, struct zint_seg segs[], c
/* Don't allow control chars (CR FS GS RS for Code Set A) */
if (postcode[i] < ' ' || !(maxiCodeSet[postcode[i]] & MX_OP_SETA)) {
return z_errtxt(ZINT_ERROR_INVALID_DATA, symbol, 556,
"Invalid character in postcode in Primary Message");
"Invalid character in postcode in primary (Structured Carrier Message)");
}
}
mx_do_primary_3(codewords, postcode, countrycode, service);
+1 -1
View File
@@ -1,7 +1,7 @@
/* output.h - Common routines for raster/vector */
/*
libzint - the open source barcode library
Copyright (C) 2020-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2020-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+1 -1
View File
@@ -1,7 +1,7 @@
/* ps.c - Post Script output */
/*
libzint - the open source barcode library
Copyright (C) 2009-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+2 -1
View File
@@ -304,7 +304,8 @@ INTERNAL int zint_dbar_stk_set_height(struct zint_symbol *symbol, const int firs
symbol->row_height[second_row] = 0.7f; /* 0.7f is actually 0.699999988 (0x3F333333) */
} else {
symbol->row_height[second_row] = z_stripf(symbol->height - fixed_height - symbol->row_height[first_row]);
/* (h - 1) * 5/12 >= 0.5 -> h - 1 >= 0.5 * 12/5 -> h >= 2.2 -> rh[sr] >= (2.2 - 1 - 0.5) -> rh[sr] >= 0.7 */
/* (h - 1) * 5/12 >= 0.5 -> h - 1 >= 0.5 * 12/5 -> h >= 2.2 -> rh[sr] >= (2.2 - 1 - 0.5)
-> rh[sr] >= 0.7 */
assert(symbol->row_height[second_row] >= 0.7f);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
/*
libzint - the open source barcode library
Copyright (C) 2020-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2020-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+1 -1
View File
@@ -1,6 +1,6 @@
/*
libzint - the open source barcode library
Copyright (C) 2020-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2020-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+10 -10
View File
@@ -202,19 +202,19 @@ static void test_input(const testCtx *const p_ctx) {
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
static const struct item data[] = {
/* 0*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 01 21 21 21 21 21 21 21 21 08 0E 19 2B 20 0C 24 06 32 1C 21 21 21 21 21 21 21 21", 4, 0, 1, 1, "" },
/* 1*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 548: Primary Message empty", 2, 0, 1, 1, "" },
/* 2*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "A123456", ZINT_ERROR_INVALID_DATA, 0, "Error 555: Non-numeric postcode in Primary Message", 2, 0, 1, 1, "" },
/* 1*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 548: Primary (Structured Carrier Message) empty", 2, 0, 1, 1, "" },
/* 2*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "A123456", ZINT_ERROR_INVALID_DATA, 0, "Error 555: Non-numeric postcode in primary (Structured Carrier Message)", 2, 0, 1, 1, "" },
/* 3*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "1-digit postcode" },
/* 4*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1 123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", 2, 0, 1, 0, "1-digit postcode; ZXing-C++ test can't handle space" },
/* 5*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "9-digit postcode" },
/* 6*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Primary Message length 16 wrong (7 to 15 characters required)", 2, 0, 1, 1, "10-digit postcode" },
/* 6*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Primary (Structured Carrier Message) length 16 wrong (7 to 15 characters required)", 2, 0, 1, 1, "10-digit postcode" },
/* 7*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "1-digit postcode" },
/* 8*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "9-digit postcode" },
/* 9*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Primary Message length 16 wrong (7 to 15 characters required)", -1, 0, 1, 1, "10-digit postcode" },
/* 10*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Primary Message length 6 wrong (7 to 15 characters required)", -1, 0, 1, 1, "0-digit postcode" },
/* 9*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Primary (Structured Carrier Message) length 16 wrong (7 to 15 characters required)", -1, 0, 1, 1, "10-digit postcode" },
/* 10*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Primary (Structured Carrier Message) length 6 wrong (7 to 15 characters required)", -1, 0, 1, 1, "0-digit postcode" },
/* 11*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "12345678123456", 0, 30, "(144) 22 13 21 31 0B 00 32 1E 20 1C 04 14 07 30 10 07 08 28 1D 09 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "8-digit postcode" },
/* 12*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "12345678123456", 0, 30, "(144) 22 13 21 31 0B 00 32 1E 20 1C 04 14 07 30 10 07 08 28 1D 09 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "8-digit postcode" },
/* 13*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 548: Primary Message empty", 3, 0, 1, 1, "" },
/* 13*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 548: Primary (Structured Carrier Message) empty", 3, 0, 1, 1, "" },
/* 14*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", 3, 0, 1, 1, "1-alphanumeric postcode" },
/* 15*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "1123456", 0, 30, "(144) 03 08 08 08 08 18 3C 1E 20 1C 13 37 07 2C 26 2D 18 29 3F 2C 01 21 21 21 21 21 21 21", 3, 0, 1, 0, "1-digit postcode; ZXing-C++ test can't handle padding" },
/* 16*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", 3, 0, 1, 1, "1-alphanumeric postcode" },
@@ -223,12 +223,12 @@ static void test_input(const testCtx *const p_ctx) {
/* 19*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "ABCDE123456", 0, 30, "(144) 03 18 01 31 20 10 30 1E 20 1C 0F 38 38 1A 39 10 2F 37 22 12 01 21 21 21 21 21 21 21", 3, 0, 1, 1, "5-alphanumeric postcode" },
/* 20*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AAAAAA 840001", 0, 30, "(144) 13 10 10 10 10 10 00 12 07 00 17 36 2E 38 04 29 16 0D 27 16 01 21 21 21 21 21 21 21", 3, 0, 1, 0, "6-alphanumeric postcode with padding; ZXing-C++ test can't handle padding" },
/* 21*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AAAAA A840001", 0, 30, "(144) 03 18 10 10 10 10 00 12 07 00 19 07 29 31 26 01 23 2C 2E 07 01 21 21 21 21 21 21 21", 3, 0, 1, 0, "7-alphanumeric with embedded padding truncated; ZXing-C++ test can't handle truncation" },
/* 22*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AA\015AAA840001", ZINT_ERROR_INVALID_DATA, 0, "Error 556: Invalid character in postcode in Primary Message", -1, 0, 1, 1, "Alphanumeric postcode with CR" },
/* 22*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AA\015AAA840001", ZINT_ERROR_INVALID_DATA, 0, "Error 556: Invalid character in postcode in primary (Structured Carrier Message)", -1, 0, 1, 1, "Alphanumeric postcode with CR" },
/* 23*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "A#%-/A840001", 0, 30, "(144) 13 30 1B 1B 39 18 00 12 07 00 3F 1E 25 07 2A 1E 14 3C 28 2D 01 21 21 21 21 21 21 21", 3, 0, 1, 1, "Alphanumeric postcode with non-control Code A chars" },
/* 24*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1A23456", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", -1, 0, 1, 1, "Non-numeric country code" },
/* 25*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "12345678912345A", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", -1, 0, 1, 1, "Non-numeric service class" },
/* 24*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1A23456", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in primary (Structured Carrier Message)", -1, 0, 1, 1, "Non-numeric country code" },
/* 25*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "12345678912345A", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in primary (Structured Carrier Message)", -1, 0, 1, 1, "Non-numeric service class" },
/* 26*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", 2, 0, 1, 1, "Auto-determine mode 2" },
/* 27*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 554: Primary Message empty", 0, 0, 1, 1, "Auto-determine mode 2/3 requires primary message" },
/* 27*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 554: Primary (Structured Carrier Message) empty", 0, 0, 1, 1, "Auto-determine mode 2/3 requires primary message" },
/* 28*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "A23456123456", 0, 30, "(144) 23 1D 0D 3D 2C 1C 30 1E 20 1C 24 35 30 31 2A 0D 17 14 16 3D 01 21 21 21 21 21 21 21", 3, 0, 1, 1, "Auto-determine mode 3" },
/* 29*/ { UNICODE_MODE, -1, -1, 100, { 0, 0, "" }, "A", -1, "123456123456", 0, 30, "(144) 02 10 22 07 00 20 31 1E 20 1C 0E 29 13 1B 0D 26 36 25 3B 22 3B 2A 29 3B 28 1E 30 31", 2, 100, 1, 1, "SCM prefix version" },
/* 30*/ { UNICODE_MODE, -1, -1, 101, { 0, 0, "" }, "A", -1, "123456123456", ZINT_ERROR_INVALID_OPTION, 0, "Error 557: SCM prefix version '101' out of range (1 to 100)", -1, 101, 1, 1, "SCM prefix version" },
+5 -1
View File
@@ -1529,7 +1529,11 @@ namespace Zint {
}
if (m_symbol == BARCODE_MAXICODE) {
arg_int(cmd, "--scmvv=", option2() - 1, true /*allowZero*/);
if (option2() == 96 + 1) { // Default 96 (ASC MH10/SC 8)
arg_bool(cmd, "--scmvv", true);
} else {
arg_int(cmd, "--scmvv=", option2() - 1, true /*allowZero*/);
}
}
if (m_symbol == BARCODE_PDF417 || m_symbol == BARCODE_PDF417COMP || m_symbol == BARCODE_HIBC_PDF
+21 -2
View File
@@ -1481,9 +1481,28 @@ private slots:
<< false << false << false << WARN_DEFAULT << false // readerInit-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 57 -d '1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY"
"\\R\\E' --esc --primary='152382802840001' --quietzones --scale=2.5 --scmvv=96"
"\\R\\E' --esc --primary='152382802840001' --quietzones --scale=2.5 --scmvv"
<< "zint.exe -b 57 -d \"1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY"
"\\R\\E\" --esc --primary=\"152382802840001\" --quietzones --scale=2.5 --scmvv=96"
"\\R\\E\" --esc --primary=\"152382802840001\" --quietzones --scale=2.5 --scmvv"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_MAXICODE") << true << 0.0f << ""
<< BARCODE_MAXICODE << (UNICODE_MODE | ESCAPE_MODE) // symbology-inputMode
<< "152382802840001"
<< "1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY\\R\\E" // text-primary
<< 0.0f << -1 << (0 + 1) << 0 // height-scale
<< 2.5f << 0.0f << false << 0.8f << 1.0f // dpmm-textGap
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << true << false << true << 0 // showText-rotateAngle
<< 0 << false << false << false << false // eci-gs1SyntaxEngine
<< false << false << false << WARN_DEFAULT << false // readerInit-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 57 -d '1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY"
"\\R\\E' --esc --primary='152382802840001' --quietzones --scale=2.5 --scmvv=0"
<< "zint.exe -b 57 -d \"1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY"
"\\R\\E\" --esc --primary=\"152382802840001\" --quietzones --scale=2.5 --scmvv=0"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_MICROQR") << false << 0.0f << ""
+11 -6
View File
@@ -102,7 +102,7 @@ Mode 6 sets the scanner (Reader Initialisation/Programming)</string>
</property>
<property name="toolTip">
<string>Postcode of up to 9 digits for Mode 2 or
6 alphanumerics for Mode 3 (will truncate)
6 alphanumerics for Mode 3 (will truncate).
Mode 3 postcodes less than maximum
length will be padded with spaces
(ignored if disabled)</string>
@@ -257,8 +257,8 @@ Value ranges from 000 to 999
</property>
<property name="toolTip">
<string>Prefix Structured Carrier Message with &quot;[)&gt;\R01\Gvv&quot;
(ANS MH10.8.2 Format 01) where &quot;vv&quot; is version
specified as follows
(ISO/IEC 15434 Format "01") where &quot;vv&quot; is version
specified in &quot;SCM Prefix Version&quot;
(ignored if disabled)</string>
</property>
<property name="text">
@@ -285,7 +285,8 @@ specified as follows
<bool>false</bool>
</property>
<property name="toolTip">
<string>Version &quot;vv&quot; to place at end of SCM prefix (default 96)
<string>Version &quot;vv&quot; to place at end of SCM prefix
(default 96 for ASC MH10/SC 8)
(ignored if disabled)</string>
</property>
<property name="text">
@@ -305,7 +306,8 @@ specified as follows
<bool>false</bool>
</property>
<property name="toolTip">
<string>Version &quot;vv&quot; to place at end of SCM prefix (default 96)
<string>Version &quot;vv&quot; to place at end of SCM prefix
(default 96 for ASC MH10/SC 8)
(ignored if disabled)</string>
</property>
<property name="suffix">
@@ -315,7 +317,7 @@ specified as follows
<string/>
</property>
<property name="minimum">
<number>0</number>
<number>-1</number>
</property>
<property name="maximum">
<number>99</number>
@@ -323,6 +325,9 @@ specified as follows
<property name="value">
<number>96</number>
</property>
<property name="specialValueText">
<string>Default (96)</string>
</property>
</widget>
</item>
</layout>
+4 -3
View File
@@ -3343,7 +3343,8 @@ void MainWindow::update_preview()
get_spn_val(QSL("spnMaxiSCMCountry")), get_spn_val(QSL("spnMaxiSCMService"))));
QCheckBox *chkMaxiSCMVV = get_chk(QSL("chkMaxiSCMVV"));
if (chkMaxiSCMVV && chkMaxiSCMVV->isEnabled() && chkMaxiSCMVV->isChecked()) {
m_bc.bc.setOption2(get_spn_val(QSL("spnMaxiSCMVV")) + 1);
item_val = get_spn_val(QSL("spnMaxiSCMVV"));
m_bc.bc.setOption2((item_val == -1 ? 96 : item_val) + 1);
}
} else {
m_bc.bc.setOption1(get_cmb_index(QSL("cmbMaxiMode")) + 3);
@@ -5178,8 +5179,8 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
set_spn_from_setting(settings, QSL("studio/bc/maxicode/scm_country"), QSL("spnMaxiSCMCountry"), 0);
set_spn_from_setting(settings, QSL("studio/bc/maxicode/scm_service"), QSL("spnMaxiSCMService"), 0);
set_chk_from_setting(settings, QSL("studio/bc/maxicode/chk_scm_vv"), QSL("chkMaxiSCMVV"));
// 96 is ASC MH10/SC 8
set_spn_from_setting(settings, QSL("studio/bc/maxicode/spn_scm_vv"), QSL("spnMaxiSCMVV"), 96);
// -1 defaults to 96 (ASC MH10/SC 8)
set_spn_from_setting(settings, QSL("studio/bc/maxicode/spn_scm_vv"), QSL("spnMaxiSCMVV"), -1);
set_cmb_from_setting(settings, QSL("studio/bc/maxicode/structapp_count"), QSL("cmbMaxiStructAppCount"));
set_cmb_from_setting(settings, QSL("studio/bc/maxicode/structapp_index"), QSL("cmbMaxiStructAppIndex"));
break;