From 7eb571c2ae39333cf3fc7da2766a32c49d87c6fe Mon Sep 17 00:00:00 2001 From: Nikolaos Ftylitakis Date: Fri, 6 Aug 2021 21:40:19 +0300 Subject: [PATCH] fixing compilation errors --- src/CameraImageWrapper.cpp | 20 +++---- src/CameraImageWrapper.h | 4 +- src/zxing/zxing/InvertedLuminanceSource.cpp | 6 +-- src/zxing/zxing/LuminanceSource.cpp | 2 +- src/zxing/zxing/Result.cpp | 2 +- .../zxing/aztec/detector/AztecDetector.cpp | 2 +- src/zxing/zxing/common/BitArray.cpp | 2 +- src/zxing/zxing/common/BitArray.h | 8 +-- src/zxing/zxing/common/BitMatrix.cpp | 2 +- src/zxing/zxing/common/BitMatrix.h | 4 +- src/zxing/zxing/common/Counted.cpp | 54 +++++++++---------- src/zxing/zxing/common/DecoderResult.cpp | 2 +- src/zxing/zxing/common/DecoderResult.h | 4 +- .../zxing/common/GlobalHistogramBinarizer.cpp | 2 +- .../zxing/common/GreyscaleLuminanceSource.cpp | 2 +- .../GreyscaleRotatedLuminanceSource.cpp | 10 ++-- src/zxing/zxing/common/HybridBinarizer.cpp | 20 +++---- .../zxing/common/PerspectiveTransform.cpp | 8 +-- src/zxing/zxing/common/Str.cpp | 2 +- .../detector/MonochromeRectangleDetector.cpp | 2 +- .../detector/WhiteRectangleDetector.cpp | 2 +- .../zxing/common/reedsolomon/GenericGF.cpp | 2 +- .../common/reedsolomon/GenericGFPoly.cpp | 2 +- .../common/reedsolomon/ReedSolomonDecoder.cpp | 2 +- .../datamatrix/decoder/DataMatrixDecoder.cpp | 2 +- .../detector/DataMatrixDetector.cpp | 2 +- .../multi/GenericMultipleBarcodeReader.cpp | 2 +- .../detector/MultiFinderPatternFinder.cpp | 2 +- src/zxing/zxing/oned/CodaBarReader.cpp | 2 +- src/zxing/zxing/oned/Code128Reader.cpp | 2 +- src/zxing/zxing/oned/Code39Reader.cpp | 2 +- src/zxing/zxing/oned/Code93Reader.cpp | 2 +- src/zxing/zxing/oned/EAN8Reader.cpp | 2 +- src/zxing/zxing/oned/UPCAReader.cpp | 2 +- src/zxing/zxing/oned/UPCEReader.cpp | 2 +- .../pdf417/decoder/PDF417BitMatrixParser.cpp | 2 +- .../decoder/PDF417DecodedBitStreamParser.cpp | 2 +- .../zxing/pdf417/decoder/PDF417Decoder.cpp | 2 +- .../pdf417/decoder/ec/ErrorCorrection.cpp | 2 +- .../zxing/pdf417/decoder/ec/ModulusGF.cpp | 2 +- .../zxing/pdf417/detector/LinesSampler.cpp | 2 +- .../zxing/pdf417/detector/PDF417Detector.cpp | 2 +- .../qrcode/detector/QRAlignmentPattern.cpp | 2 +- .../zxing/qrcode/detector/QRDetector.cpp | 2 +- tests/src/QZXingTests/TestCase.h | 6 +-- .../zxing/qrcode/encoder/QRCodeTests.cpp | 2 +- 46 files changed, 107 insertions(+), 107 deletions(-) diff --git a/src/CameraImageWrapper.cpp b/src/CameraImageWrapper.cpp index 0782683..7c7294b 100644 --- a/src/CameraImageWrapper.cpp +++ b/src/CameraImageWrapper.cpp @@ -101,7 +101,7 @@ CameraImageWrapper *CameraImageWrapper::Factory(const QImage &sourceImage, int m return new CameraImageWrapper(sourceImage); } -QSharedPointer> > CameraImageWrapper::getOriginalImage() +QSharedPointer>>> CameraImageWrapper::getOriginalImage() { return imageBytesPerRow; } @@ -167,11 +167,11 @@ QSharedPointer> CameraImageWrapper::getRowP(int y, QSha int width = getWidth(); if (row->size() != width) - row.reset(QSharedPointer>(width)); + row.reset(new std::vector(width)); Q_ASSERT(y >= 0 && y < getHeight()); - return imageBytesPerRow[y]; + return (*imageBytesPerRow)[y]; } QSharedPointer> CameraImageWrapper::getMatrixP() const @@ -195,13 +195,13 @@ void CameraImageWrapper::updateImageAsGrayscale(const QImage &origin) const int width = getWidth(); const int height = getHeight(); - imageBytes = QSharedPointer>(height*width); - imageBytesPerRow = QSharedPointer>>(height); - zxing::byte* m = &imageBytes[0]; + imageBytes = QSharedPointer>(new std::vector(height*width)); + imageBytesPerRow = QSharedPointer>>>(new std::vector>>(height)); + zxing::byte* m = &(*imageBytes)[0]; for(int j=0; j> line(width); + QSharedPointer> line(new std::vector(width)); for(int i=0; i 199711L - memcpy(m, line->values().data(), width); + memcpy(m, (*line).data(), width); ///the below line is also usable #else memcpy(m, &line[0], width); #endif diff --git a/src/CameraImageWrapper.h b/src/CameraImageWrapper.h index f8add30..4fb1f97 100644 --- a/src/CameraImageWrapper.h +++ b/src/CameraImageWrapper.h @@ -33,7 +33,7 @@ public: static CameraImageWrapper* Factory(const QImage& image, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation=false); - QSharedPointer> > getOriginalImage(); + QSharedPointer> > > getOriginalImage(); QSharedPointer getDelegate() { return delegate; } QSharedPointer> getRow(int y, QSharedPointer> row) const; @@ -53,7 +53,7 @@ private: void updateImageAsGrayscale(const QImage &origin); QSharedPointer delegate; - QSharedPointer>> imageBytesPerRow; + QSharedPointer>>> imageBytesPerRow; QSharedPointer> imageBytes; static const zxing::byte B_TO_GREYSCALE[256]; diff --git a/src/zxing/zxing/InvertedLuminanceSource.cpp b/src/zxing/zxing/InvertedLuminanceSource.cpp index 9d45f4c..3ad074a 100644 --- a/src/zxing/zxing/InvertedLuminanceSource.cpp +++ b/src/zxing/zxing/InvertedLuminanceSource.cpp @@ -33,7 +33,7 @@ namespace zxing int width = getWidth(); for (int i = 0; i < width; i++) { - row[i] = 0xFF - row[i]; + (*row)[i] = 0xFF - (*row)[i]; } return row; } @@ -42,10 +42,10 @@ namespace zxing { QSharedPointer> matrix = delegate->getMatrix(); int length = getWidth() * getHeight(); - QSharedPointer> invertedMatrix(length); + QSharedPointer> invertedMatrix(new std::vector(length)); for (int i = 0; i < length; i++) { - invertedMatrix[i] = 0xFF - matrix[i]; + (*invertedMatrix)[i] = 0xFF - (*matrix)[i]; } return invertedMatrix; } diff --git a/src/zxing/zxing/LuminanceSource.cpp b/src/zxing/zxing/LuminanceSource.cpp index 976df14..80d3696 100644 --- a/src/zxing/zxing/LuminanceSource.cpp +++ b/src/zxing/zxing/LuminanceSource.cpp @@ -63,7 +63,7 @@ LuminanceSource::operator std::string() const row = getRow(y, row); for (int x = 0; x < getWidth(); x++) { - int luminance = row[x]; // & 0xFF; + int luminance = (*row)[x]; // & 0xFF; char c; if (luminance < 0x40) { diff --git a/src/zxing/zxing/Result.cpp b/src/zxing/zxing/Result.cpp index 4641fe4..523aaf4 100644 --- a/src/zxing/zxing/Result.cpp +++ b/src/zxing/zxing/Result.cpp @@ -22,7 +22,7 @@ #include using zxing::Result; -using zxing::Ref; + using zxing::String; using zxing::ResultPoint; diff --git a/src/zxing/zxing/aztec/detector/AztecDetector.cpp b/src/zxing/zxing/aztec/detector/AztecDetector.cpp index a987817..f45c571 100644 --- a/src/zxing/zxing/aztec/detector/AztecDetector.cpp +++ b/src/zxing/zxing/aztec/detector/AztecDetector.cpp @@ -33,7 +33,7 @@ using std::vector; using zxing::aztec::Detector; using zxing::aztec::Point; using zxing::aztec::AztecDetectorResult; -using zxing::Ref; + using zxing::ResultPoint; using zxing::BitArray; diff --git a/src/zxing/zxing/common/BitArray.cpp b/src/zxing/zxing/common/BitArray.cpp index ce79117..6690697 100644 --- a/src/zxing/zxing/common/BitArray.cpp +++ b/src/zxing/zxing/common/BitArray.cpp @@ -25,7 +25,7 @@ using zxing::BitArray; // VC++ -using zxing::Ref; + namespace zxing { diff --git a/src/zxing/zxing/common/BitArray.h b/src/zxing/zxing/common/BitArray.h index 1ce5ea4..813e225 100644 --- a/src/zxing/zxing/common/BitArray.h +++ b/src/zxing/zxing/common/BitArray.h @@ -47,15 +47,15 @@ public: int getSizeInBytes() const; bool get(int i) const { - return (bits[i / 32] & (1 << (i & 0x1F))) != 0; + return ((*bits)[i / 32] & (1 << (i & 0x1F))) != 0; } void set(int i) { - bits[i / 32] |= 1 << (i & 0x1F); + (*bits)[i / 32] |= 1 << (i & 0x1F); } void flip(int i) { - bits[i / 32] ^= 1 << (i & 0x1F); + (*bits)[i / 32] ^= 1 << (i & 0x1F); } int getNextSet(int from); @@ -79,7 +79,7 @@ public: std::string toString() const; static QSharedPointer> makeArray(int size) { - return QSharedPointer>((size + 31) / 32); + return QSharedPointer>(new std::vector((size + 31) / 32)); } void reverse(); diff --git a/src/zxing/zxing/common/BitMatrix.cpp b/src/zxing/zxing/common/BitMatrix.cpp index f97790c..37956b5 100644 --- a/src/zxing/zxing/common/BitMatrix.cpp +++ b/src/zxing/zxing/common/BitMatrix.cpp @@ -28,7 +28,7 @@ using std::ostringstream; using zxing::BitMatrix; using zxing::BitArray; -using zxing::Ref; + void BitMatrix::init(int width, int height) { if (width < 1 || height < 1) { diff --git a/src/zxing/zxing/common/BitMatrix.h b/src/zxing/zxing/common/BitMatrix.h index fbfd267..6f3febc 100644 --- a/src/zxing/zxing/common/BitMatrix.h +++ b/src/zxing/zxing/common/BitMatrix.h @@ -46,12 +46,12 @@ public: bool get(int x, int y) const { int offset = y * rowSize + (x >> 5); - return ((((unsigned)bits[offset]) >> (x & 0x1f)) & 1) != 0; + return ((((unsigned)(*bits)[offset]) >> (x & 0x1f)) & 1) != 0; } void set(int x, int y) { int offset = y * rowSize + (x >> 5); - bits[offset] |= 1 << (x & 0x1f); + (*bits)[offset] |= 1 << (x & 0x1f); } void flip(int x, int y); diff --git a/src/zxing/zxing/common/Counted.cpp b/src/zxing/zxing/common/Counted.cpp index 0d32aee..1198f2f 100644 --- a/src/zxing/zxing/common/Counted.cpp +++ b/src/zxing/zxing/common/Counted.cpp @@ -1,36 +1,36 @@ -#include "Counted.h" +//#include "Counted.h" -namespace zxing { +//namespace zxing { -Counted::Counted() : - count_(0) -{ -} +//Counted::Counted() : +// count_(0) +//{ +//} -Counted::~Counted() -{ -} +//Counted::~Counted() +//{ +//} -Counted *Counted::retain() -{ - count_++; - return this; -} +//Counted *Counted::retain() +//{ +// count_++; +// return this; +//} -void Counted::release() -{ - count_--; - if (count_ == 0) { - count_ = 0xDEADF001; - delete this; - } -} +//void Counted::release() +//{ +// count_--; +// if (count_ == 0) { +// count_ = 0xDEADF001; +// delete this; +// } +//} -size_t Counted::count() const -{ - return count_; -} +//size_t Counted::count() const +//{ +// return count_; +//} -} +//} diff --git a/src/zxing/zxing/common/DecoderResult.cpp b/src/zxing/zxing/common/DecoderResult.cpp index e0ac60d..bf57de4 100644 --- a/src/zxing/zxing/common/DecoderResult.cpp +++ b/src/zxing/zxing/common/DecoderResult.cpp @@ -26,7 +26,7 @@ using namespace zxing; DecoderResult::DecoderResult(QSharedPointer> rawBytes, QSharedPointer text, - QSharedPointer> >& byteSegments, + QSharedPointer>>>& byteSegments, string const& ecLevel, string charSet) : rawBytes_(rawBytes), text_(text), diff --git a/src/zxing/zxing/common/DecoderResult.h b/src/zxing/zxing/common/DecoderResult.h index 0995222..e02001a 100644 --- a/src/zxing/zxing/common/DecoderResult.h +++ b/src/zxing/zxing/common/DecoderResult.h @@ -32,14 +32,14 @@ class DecoderResult { private: QSharedPointer> rawBytes_; QSharedPointer text_; - QSharedPointer> > byteSegments_; + QSharedPointer>>> byteSegments_; std::string ecLevel_; std::string charSet_; public: DecoderResult(QSharedPointer> rawBytes, QSharedPointer text, - QSharedPointer> >& byteSegments, + QSharedPointer>>>& byteSegments, std::string const& ecLevel, std::string charSet = ""); diff --git a/src/zxing/zxing/common/GlobalHistogramBinarizer.cpp b/src/zxing/zxing/common/GlobalHistogramBinarizer.cpp index b47e28b..da67fcd 100644 --- a/src/zxing/zxing/common/GlobalHistogramBinarizer.cpp +++ b/src/zxing/zxing/common/GlobalHistogramBinarizer.cpp @@ -24,7 +24,7 @@ using zxing::Binarizer; -using zxing::Ref; + using zxing::BitArray; using zxing::BitMatrix; diff --git a/src/zxing/zxing/common/GreyscaleLuminanceSource.cpp b/src/zxing/zxing/common/GreyscaleLuminanceSource.cpp index e39820d..20265bd 100644 --- a/src/zxing/zxing/common/GreyscaleLuminanceSource.cpp +++ b/src/zxing/zxing/common/GreyscaleLuminanceSource.cpp @@ -22,7 +22,7 @@ #include #include -using zxing::Ref; + using zxing::LuminanceSource; diff --git a/src/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp b/src/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp index a4bc091..0f12519 100644 --- a/src/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp +++ b/src/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp @@ -51,7 +51,7 @@ GreyscaleRotatedLuminanceSource::getRow(int y, QSharedPointersize() < getWidth()) { - row = QSharedPointer>(getWidth()); + row.reset(new std::vector(getWidth())); } int offset = (left_ * dataWidth_) + (dataWidth_ - 1 - (y + top_)); using namespace std; @@ -62,19 +62,19 @@ GreyscaleRotatedLuminanceSource::getRow(int y, QSharedPointer> GreyscaleRotatedLuminanceSource::getMatrix() const { - QSharedPointer> result (getWidth() * getHeight()); + QSharedPointer> result (new std::vector(getWidth() * getHeight())); for (int y = 0; y < getHeight(); y++) { - zxing::byte* row = &result[y * getWidth()]; + zxing::byte* row = &(*result)[y * getWidth()]; int offset = (left_ * dataWidth_) + (dataWidth_ - 1 - (y + top_)); for (int x = 0; x < getWidth(); x++) { - row[x] = greyData_[offset]; + row[x] = (*greyData_)[offset]; offset += dataWidth_; } } diff --git a/src/zxing/zxing/common/HybridBinarizer.cpp b/src/zxing/zxing/common/HybridBinarizer.cpp index c5cebec..8a0c489 100644 --- a/src/zxing/zxing/common/HybridBinarizer.cpp +++ b/src/zxing/zxing/common/HybridBinarizer.cpp @@ -117,7 +117,7 @@ HybridBinarizer::calculateThresholdForBlock(QSharedPointer> lu y < BLOCK_SIZE; y++, offset += stride) { for (int x = 0; x < BLOCK_SIZE; x++) { - int pixel = luminances[offset + x] & 0xff; + int pixel = (*luminances)[offset + x] & 0xff; if (pixel <= threshold) { matrix->set(xoffset + x, yoffset + y); } @@ -150,9 +150,9 @@ void HybridBinarizer::thresholdBlock(QSharedPointer> lu namespace { inline int getBlackPointFromNeighbors(QSharedPointer> blackPoints, int subWidth, int x, int y) { - return (blackPoints[(y-1)*subWidth+x] + - 2*blackPoints[y*subWidth+x-1] + - blackPoints[(y-1)*subWidth+x-1]) >> 2; + return ((*blackPoints)[(y-1)*subWidth+x] + + 2*(*blackPoints)[y*subWidth+x-1] + + (*blackPoints)[(y-1)*subWidth+x-1]) >> 2; } } @@ -164,7 +164,7 @@ QSharedPointer> HybridBinarizer::calculateBlackPoints(QSharedPo int height) { const int minDynamicRange = 24; - QSharedPointer> blackPoints (subHeight * subWidth); + QSharedPointer> blackPoints (new std::vector(subHeight * subWidth)); for (int y = 0; y < subHeight; y++) { int yoffset = y << BLOCK_SIZE_POWER; int maxYOffset = height - BLOCK_SIZE; @@ -184,7 +184,7 @@ QSharedPointer> HybridBinarizer::calculateBlackPoints(QSharedPo yy < BLOCK_SIZE; yy++, offset += width) { for (int xx = 0; xx < BLOCK_SIZE; xx++) { - int pixel = luminances[offset + xx] & 0xFF; + int pixel = (*luminances)[offset + xx] & 0xFF; sum += pixel; // still looking for good contrast if (pixel < min) { @@ -200,8 +200,8 @@ QSharedPointer> HybridBinarizer::calculateBlackPoints(QSharedPo // finish the rest of the rows quickly for (yy++, offset += width; yy < BLOCK_SIZE; yy++, offset += width) { for (int xx = 0; xx < BLOCK_SIZE; xx += 2) { - sum += luminances[offset + xx] & 0xFF; - sum += luminances[offset + xx + 1] & 0xFF; + sum += (*luminances)[offset + xx] & 0xFF; + sum += (*luminances)[offset + xx + 1] & 0xFF; } } } @@ -218,7 +218,7 @@ QSharedPointer> HybridBinarizer::calculateBlackPoints(QSharedPo } } } - blackPoints[y * subWidth + x] = average; + (*blackPoints)[y * subWidth + x] = average; } } return blackPoints; diff --git a/src/zxing/zxing/common/PerspectiveTransform.cpp b/src/zxing/zxing/common/PerspectiveTransform.cpp index fd90f09..dd3f467 100644 --- a/src/zxing/zxing/common/PerspectiveTransform.cpp +++ b/src/zxing/zxing/common/PerspectiveTransform.cpp @@ -46,8 +46,8 @@ QSharedPointer PerspectiveTransform::squareToQuadrilateral float dy3 = y0 - y1 + y2 - y3; QSharedPointer result; if (dx3 == 0.0f && dy3 == 0.0f) { - result = new PerspectiveTransform(x1 - x0, x2 - x1, x0, y1 - y0, y2 - y1, y0, 0.0f, - 0.0f, 1.0f); + result.reset(new PerspectiveTransform(x1 - x0, x2 - x1, x0, y1 - y0, y2 - y1, y0, 0.0f, + 0.0f, 1.0f)); } else { @@ -58,8 +58,8 @@ QSharedPointer PerspectiveTransform::squareToQuadrilateral float denominator = dx1 * dy2 - dx2 * dy1; float a13 = (dx3 * dy2 - dx2 * dy3) / denominator; float a23 = (dx1 * dy3 - dx3 * dy1) / denominator; - result = new PerspectiveTransform(x1 - x0 + a13 * x1, x3 - x0 + a23 * x3, x0, y1 - y0 - + a13 * y1, y3 - y0 + a23 * y3, y0, a13, a23, 1.0f); + result.reset(new PerspectiveTransform(x1 - x0 + a13 * x1, x3 - x0 + a23 * x3, x0, y1 - y0 + + a13 * y1, y3 - y0 + a23 * y3, y0, a13, a23, 1.0f)); } return result; diff --git a/src/zxing/zxing/common/Str.cpp b/src/zxing/zxing/common/Str.cpp index 083f823..c7cebb6 100644 --- a/src/zxing/zxing/common/Str.cpp +++ b/src/zxing/zxing/common/Str.cpp @@ -23,7 +23,7 @@ using std::string; using zxing::String; -using zxing::Ref; + String::String(const std::string &text) : text_(text) { diff --git a/src/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp b/src/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp index 14d8a3b..7eeb340 100644 --- a/src/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp +++ b/src/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp @@ -25,7 +25,7 @@ #include using std::vector; -using zxing::Ref; + using zxing::ResultPoint; using zxing::TwoInts; using zxing::MonochromeRectangleDetector; diff --git a/src/zxing/zxing/common/detector/WhiteRectangleDetector.cpp b/src/zxing/zxing/common/detector/WhiteRectangleDetector.cpp index 001914c..96f468b 100644 --- a/src/zxing/zxing/common/detector/WhiteRectangleDetector.cpp +++ b/src/zxing/zxing/common/detector/WhiteRectangleDetector.cpp @@ -25,7 +25,7 @@ #include using std::vector; -using zxing::Ref; + using zxing::ResultPoint; using zxing::WhiteRectangleDetector; using zxing::common::detector::MathUtils; diff --git a/src/zxing/zxing/common/reedsolomon/GenericGF.cpp b/src/zxing/zxing/common/reedsolomon/GenericGF.cpp index 04d8b09..2e551a2 100644 --- a/src/zxing/zxing/common/reedsolomon/GenericGF.cpp +++ b/src/zxing/zxing/common/reedsolomon/GenericGF.cpp @@ -26,7 +26,7 @@ using zxing::GenericGF; using zxing::GenericGFPoly; -using zxing::Ref; + QSharedPointer GenericGF::AZTEC_DATA_12(new GenericGF(0x1069, 4096, 1)); QSharedPointer GenericGF::AZTEC_DATA_10(new GenericGF(0x409, 1024, 1)); diff --git a/src/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp b/src/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp index 5ee56ab..cf20128 100644 --- a/src/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp +++ b/src/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp @@ -26,7 +26,7 @@ using zxing::GenericGFPoly; -using zxing::Ref; + // VC++ using zxing::GenericGF; diff --git a/src/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp b/src/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp index ed49ad5..891df1c 100644 --- a/src/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp +++ b/src/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp @@ -25,7 +25,7 @@ #include using std::vector; -using zxing::Ref; + using zxing::ReedSolomonDecoder; using zxing::GenericGFPoly; diff --git a/src/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp b/src/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp index db23995..a0311bb 100644 --- a/src/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp +++ b/src/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp @@ -27,7 +27,7 @@ #include #include -using zxing::Ref; + using zxing::DecoderResult; //using zxing::datamatrix::Decoder; //using zxing::datamatrix::DataBlock; diff --git a/src/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp b/src/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp index cb341ef..2879dc8 100644 --- a/src/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp +++ b/src/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp @@ -30,7 +30,7 @@ #include using std::abs; -using zxing::Ref; + using zxing::BitMatrix; using zxing::ResultPoint; using zxing::DetectorResult; diff --git a/src/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp b/src/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp index 8edf95b..5248a98 100644 --- a/src/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp +++ b/src/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp @@ -20,7 +20,7 @@ #include using std::vector; -using zxing::Ref; + using zxing::Result; using zxing::multi::GenericMultipleBarcodeReader; diff --git a/src/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp b/src/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp index c6729ca..0bb5000 100644 --- a/src/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp +++ b/src/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp @@ -25,7 +25,7 @@ using std::abs; using std::min; using std::sort; using std::vector; -using zxing::Ref; + using zxing::BitMatrix; using zxing::ReaderException; using zxing::qrcode::FinderPattern; diff --git a/src/zxing/zxing/oned/CodaBarReader.cpp b/src/zxing/zxing/oned/CodaBarReader.cpp index 3239de6..40b643f 100644 --- a/src/zxing/zxing/oned/CodaBarReader.cpp +++ b/src/zxing/zxing/oned/CodaBarReader.cpp @@ -31,7 +31,7 @@ using std::string; using zxing::NotFoundException; using zxing::FormatException; using zxing::ChecksumException; -using zxing::Ref; + using zxing::Result; using zxing::oned::CodaBarReader; diff --git a/src/zxing/zxing/oned/Code128Reader.cpp b/src/zxing/zxing/oned/Code128Reader.cpp index c06a991..36242f3 100644 --- a/src/zxing/zxing/oned/Code128Reader.cpp +++ b/src/zxing/zxing/oned/Code128Reader.cpp @@ -35,7 +35,7 @@ using std::string; using zxing::NotFoundException; using zxing::FormatException; using zxing::ChecksumException; -using zxing::Ref; + using zxing::Result; using zxing::oned::Code128Reader; diff --git a/src/zxing/zxing/oned/Code39Reader.cpp b/src/zxing/zxing/oned/Code39Reader.cpp index b7622e0..ac0aa17 100644 --- a/src/zxing/zxing/oned/Code39Reader.cpp +++ b/src/zxing/zxing/oned/Code39Reader.cpp @@ -26,7 +26,7 @@ #include using std::vector; -using zxing::Ref; + using zxing::Result; using zxing::String; using zxing::NotFoundException; diff --git a/src/zxing/zxing/oned/Code93Reader.cpp b/src/zxing/zxing/oned/Code93Reader.cpp index 2e1b641..ec1c5e1 100644 --- a/src/zxing/zxing/oned/Code93Reader.cpp +++ b/src/zxing/zxing/oned/Code93Reader.cpp @@ -27,7 +27,7 @@ using std::vector; using std::string; -using zxing::Ref; + using zxing::Result; using zxing::String; using zxing::NotFoundException; diff --git a/src/zxing/zxing/oned/EAN8Reader.cpp b/src/zxing/zxing/oned/EAN8Reader.cpp index 60bfe14..1525dcd 100644 --- a/src/zxing/zxing/oned/EAN8Reader.cpp +++ b/src/zxing/zxing/oned/EAN8Reader.cpp @@ -22,7 +22,7 @@ using std::vector; using zxing::oned::EAN8Reader; // VC++ -using zxing::Ref; + using zxing::BitArray; EAN8Reader::EAN8Reader() : decodeMiddleCounters(4, 0) {} diff --git a/src/zxing/zxing/oned/UPCAReader.cpp b/src/zxing/zxing/oned/UPCAReader.cpp index b12d0d6..e28776b 100644 --- a/src/zxing/zxing/oned/UPCAReader.cpp +++ b/src/zxing/zxing/oned/UPCAReader.cpp @@ -22,7 +22,7 @@ #include using zxing::oned::UPCAReader; -using zxing::Ref; + using zxing::Result; // VC++ diff --git a/src/zxing/zxing/oned/UPCEReader.cpp b/src/zxing/zxing/oned/UPCEReader.cpp index e140416..5f5cd49 100644 --- a/src/zxing/zxing/oned/UPCEReader.cpp +++ b/src/zxing/zxing/oned/UPCEReader.cpp @@ -21,7 +21,7 @@ using std::string; using std::vector; -using zxing::Ref; + using zxing::String; using zxing::oned::UPCEReader; diff --git a/src/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp b/src/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp index 329a11f..130d692 100644 --- a/src/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp +++ b/src/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp @@ -30,7 +30,7 @@ using zxing::pdf417::decoder::BitMatrixParser; // VC++ -using zxing::Ref; + using zxing::BitMatrix; const int BitMatrixParser::MAX_ROWS = 90; diff --git a/src/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp b/src/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp index 721de87..ff1dd76 100644 --- a/src/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp +++ b/src/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp @@ -24,7 +24,7 @@ using std::string; using zxing::pdf417::DecodedBitStreamParser; -using zxing::Ref; + using zxing::DecoderResult; using zxing::String; diff --git a/src/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp b/src/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp index a93a763..dbec626 100644 --- a/src/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp +++ b/src/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp @@ -28,7 +28,7 @@ using zxing::pdf417::decoder::Decoder; using zxing::pdf417::decoder::ec::ErrorCorrection; -using zxing::Ref; + using zxing::DecoderResult; // VC++ diff --git a/src/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp b/src/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp index 38a0906..3566d23 100644 --- a/src/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp +++ b/src/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp @@ -22,7 +22,7 @@ #include using std::vector; -using zxing::Ref; + using zxing::pdf417::decoder::ec::ErrorCorrection; using zxing::pdf417::decoder::ec::ModulusPoly; diff --git a/src/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp b/src/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp index 41b6648..5d808b7 100644 --- a/src/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp +++ b/src/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp @@ -20,7 +20,7 @@ #include #include -using zxing::Ref; + using zxing::pdf417::decoder::ec::ModulusGF; using zxing::pdf417::decoder::ec::ModulusPoly; diff --git a/src/zxing/zxing/pdf417/detector/LinesSampler.cpp b/src/zxing/zxing/pdf417/detector/LinesSampler.cpp index 7f4f027..ea9e858 100644 --- a/src/zxing/zxing/pdf417/detector/LinesSampler.cpp +++ b/src/zxing/zxing/pdf417/detector/LinesSampler.cpp @@ -29,7 +29,7 @@ using std::min; using std::abs; using zxing::pdf417::detector::LinesSampler; using zxing::pdf417::decoder::BitMatrixParser; -using zxing::Ref; + using zxing::BitMatrix; using zxing::NotFoundException; using zxing::Point; diff --git a/src/zxing/zxing/pdf417/detector/PDF417Detector.cpp b/src/zxing/zxing/pdf417/detector/PDF417Detector.cpp index 3477c20..9b0ab97 100644 --- a/src/zxing/zxing/pdf417/detector/PDF417Detector.cpp +++ b/src/zxing/zxing/pdf417/detector/PDF417Detector.cpp @@ -28,7 +28,7 @@ using std::numeric_limits; using zxing::pdf417::detector::Detector; using zxing::common::detector::Math; using zxing::common::detector::MathUtils; -using zxing::Ref; + using zxing::DetectorResult; using zxing::ResultPoint; diff --git a/src/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp b/src/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp index 297f9dc..35cf018 100644 --- a/src/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp +++ b/src/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp @@ -22,7 +22,7 @@ #include using std::abs; -using zxing::Ref; + using zxing::qrcode::AlignmentPattern; AlignmentPattern::AlignmentPattern(float posX, float posY, float estimatedModuleSize) : diff --git a/src/zxing/zxing/qrcode/detector/QRDetector.cpp b/src/zxing/zxing/qrcode/detector/QRDetector.cpp index 9c1cdb9..b9e1580 100644 --- a/src/zxing/zxing/qrcode/detector/QRDetector.cpp +++ b/src/zxing/zxing/qrcode/detector/QRDetector.cpp @@ -37,7 +37,7 @@ using std::abs; using std::min; using std::max; using zxing::qrcode::Detector; -using zxing::Ref; + using zxing::BitMatrix; using zxing::ResultPointCallback; using zxing::DetectorResult; diff --git a/tests/src/QZXingTests/TestCase.h b/tests/src/QZXingTests/TestCase.h index 4357c24..5cc75e6 100644 --- a/tests/src/QZXingTests/TestCase.h +++ b/tests/src/QZXingTests/TestCase.h @@ -133,7 +133,7 @@ protected: assertTrue(false); for (size_t i = 0; i < expected.size(); i++) { - if (expected[i] != received[i]) { + if (expected[i] != (*received)[i]) { qDebug() << QString::fromStdString(message) << ". Mismatch at " << QString::number(i) /*<< ". Expected " + arrayToString(expected) + ", got " + arrayToString(Arrays.copyOf(received, expected.length)))*/; assertTrue(false); @@ -145,9 +145,9 @@ protected: const std::vector &expected, const QSharedPointer> &received) { - QSharedPointer> received_copy(received->size()); + QSharedPointer> received_copy(new std::vector(received->size())); for(int i=0; isize(); i++) - received_copy[i] = received[i]; + (*received_copy)[i] = (*received)[i]; assertDataEquals(message, expected, received_copy); } diff --git a/tests/src/QZXingTests/zxing/qrcode/encoder/QRCodeTests.cpp b/tests/src/QZXingTests/zxing/qrcode/encoder/QRCodeTests.cpp index d210350..f4d2714 100644 --- a/tests/src/QZXingTests/zxing/qrcode/encoder/QRCodeTests.cpp +++ b/tests/src/QZXingTests/zxing/qrcode/encoder/QRCodeTests.cpp @@ -43,7 +43,7 @@ void QRCodeTests::test() // Set the matrix. qrCode.setMatrix(matrix); - assertSame(matrix, qrCode.getMatrix()); + assertSame(matrix.data(), qrCode.getMatrix().data()); } void QRCodeTests::testToString1() {