Merge pull request #221 from fredldotme/ubports

src: Support Ubuntu Touch in QZXingFilter
This commit is contained in:
Nikos Ftylitakis 2022-08-22 09:39:21 +03:00 committed by GitHub
commit 4f3a13fb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -450,6 +450,10 @@ unix {
DEFINES += NOFMAXL
contains( CONFIG, ubports) {
DEFINES += Q_OS_UBUNTUTOUCH
}
contains( CONFIG, sailfishapp) {
DEFINES += Q_OS_SAILFISH
} else {

View File

@ -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;