Fixing Bug

Was not returning the correct barcode format once decoded. Was because the Decoder Format is a bitshifted Enum
This commit is contained in:
Simon.Maddison 2018-02-07 17:07:23 +11:00
parent f4740d6e44
commit fd25154102
1 changed files with 1 additions and 1 deletions

View File

@ -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<<fmt);
charSet_ = QString::fromStdString(res->getCharSet());
if (!charSet_.isEmpty()) {
QTextCodec *codec = QTextCodec::codecForName(res->getCharSet().c_str());