diff --git a/src/zxing/zxing/qrcode/encoder/Encoder.h b/src/zxing/zxing/qrcode/encoder/Encoder.h index 8086aad..db4308e 100644 --- a/src/zxing/zxing/qrcode/encoder/Encoder.h +++ b/src/zxing/zxing/qrcode/encoder/Encoder.h @@ -60,7 +60,7 @@ private: //static bool isOnlyDoubleByteKanji(const QString& content); static int chooseMaskPattern(Ref bits, - ErrorCorrectionLevel ecLevel, + ErrorCorrectionLevel& ecLevel, Ref version, Ref matrix); diff --git a/src/zxing/zxing/qrcode/encoder/QREncoder.cpp b/src/zxing/zxing/qrcode/encoder/QREncoder.cpp index 21c1eee..0dff400 100644 --- a/src/zxing/zxing/qrcode/encoder/QREncoder.cpp +++ b/src/zxing/zxing/qrcode/encoder/QREncoder.cpp @@ -97,7 +97,7 @@ Ref Encoder::encode(const QString& content, ErrorCorrectionLevel &ecLeve // Put data together into the overall payload headerAndDataBits.appendBitArray(dataBits); - zxing::qrcode::ECBlocks ecBlocks = version->getECBlocksForLevel(ecLevel); + zxing::qrcode::ECBlocks &ecBlocks = version->getECBlocksForLevel(ecLevel); int numDataBytes = version->getTotalCodewords() - ecBlocks.getTotalECCodewords(); // Terminate the bits properly. @@ -111,7 +111,7 @@ Ref Encoder::encode(const QString& content, ErrorCorrectionLevel &ecLeve Ref qrCode(new QRCode); - qrCode->setECLevel(Ref(&ecLevel)); + qrCode->setECLevel(Ref(new ErrorCorrectionLevel(ecLevel))); qrCode->setMode(mode); qrCode->setVersion(version); @@ -202,7 +202,7 @@ Mode Encoder::chooseMode(const QString& content, const QString& encoding) //} int Encoder::chooseMaskPattern(Ref bits, - ErrorCorrectionLevel ecLevel, + ErrorCorrectionLevel& ecLevel, Ref version, Ref matrix) {