From fd25154102e14c74b771edb58570ba0829afc6a2 Mon Sep 17 00:00:00 2001 From: "Simon.Maddison" Date: Wed, 7 Feb 2018 17:07:23 +1100 Subject: [PATCH] Fixing Bug Was not returning the correct barcode format once decoded. Was because the Decoder Format is a bitshifted Enum --- src/QZXing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QZXing.cpp b/src/QZXing.cpp index ac96692..0da4f3b 100644 --- a/src/QZXing.cpp +++ b/src/QZXing.cpp @@ -379,7 +379,7 @@ QString QZXing::decodeImage(const QImage &image, int maxWidth, int maxHeight, bo QString string = QString(res->getText()->getText().c_str()); if (!string.isEmpty() && (string.length() > 0)) { int fmt = res->getBarcodeFormat().value; - foundedFmt = decoderFormatToString(fmt); + foundedFmt = decoderFormatToString(1<getCharSet()); if (!charSet_.isEmpty()) { QTextCodec *codec = QTextCodec::codecForName(res->getCharSet().c_str());