diff --git a/src/QZXing-components.pri b/src/QZXing-components.pri index b32b512..d706fa6 100644 --- a/src/QZXing-components.pri +++ b/src/QZXing-components.pri @@ -450,6 +450,10 @@ unix { DEFINES += NOFMAXL + contains( CONFIG, ubports) { + DEFINES += Q_OS_UBUNTUTOUCH + } + contains( CONFIG, sailfishapp) { DEFINES += Q_OS_SAILFISH } else { diff --git a/src/QZXingFilter.cpp b/src/QZXingFilter.cpp index 3fdeb6c..4edb468 100644 --- a/src/QZXingFilter.cpp +++ b/src/QZXingFilter.cpp @@ -196,7 +196,7 @@ static QImage* rgbDataToGrayscale(const uchar* data, const CaptureRect& captureR for (int y = 1; y <= captureRect.targetHeight; ++y) { //Quick fix for iOS & macOS devices. Will be handled better in the future -#if defined(Q_OS_IOS) || defined (Q_OS_MAC) || defined(Q_OS_SAILFISH) +#if defined(Q_OS_IOS) || defined (Q_OS_MAC) || defined(Q_OS_SAILFISH) || defined(Q_OS_UBUNTUTOUCH) uchar* pixel = pixelInit + (y - 1) * captureRect.targetWidth; #else uchar* pixel = pixelInit + (captureRect.targetHeight - y) * captureRect.targetWidth;