mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-17 21:37:43 +00:00
correct decode UPC_EAN_EXTENSION
This commit is contained in:
parent
5514f3f9b3
commit
16d5c26698
@ -403,7 +403,9 @@ QString QZXing::decodeImage(const QImage &image, int maxWidth, int maxHeight, bo
|
||||
|
||||
DecodeHints hints(static_cast<DecodeHintType>(enabledDecoders));
|
||||
|
||||
hints.setAllowedEanExtensions(allowedExtensions_);
|
||||
if (hints.containsFormat(BarcodeFormat::UPC_EAN_EXTENSION)) {
|
||||
hints.setAllowedEanExtensions(allowedExtensions_);
|
||||
}
|
||||
|
||||
lastDecodeOperationSucceded_ = false;
|
||||
try {
|
||||
@ -424,6 +426,7 @@ QString QZXing::decodeImage(const QImage &image, int maxWidth, int maxHeight, bo
|
||||
|
||||
if (!lastDecodeOperationSucceded_ &&
|
||||
hints.containsFormat(BarcodeFormat::UPC_EAN_EXTENSION) &&
|
||||
!allowedExtensions_.empty() &&
|
||||
!(hints & DecodeHints::PRODUCT_HINT).isEmpty() ) {
|
||||
hints.setAllowedEanExtensions(std::set<int>());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user