support SailfishOS (fixes #200)

This commit is contained in:
Nikolaos Ftylitakis 2021-08-08 13:01:20 +03:00
parent ac6919ccfd
commit b4bdd72fa3
2 changed files with 18 additions and 26 deletions

View File

@ -430,20 +430,7 @@ qzxing_qml {
$$PWD/QZXingImageProvider.cpp
}
symbian {
TARGET.UID3 = 0xE618743C
TARGET.EPOCALLOWDLLDATA = 1
#TARGET.CAPABILITY = All -TCB -AllFiles -DRM
TARGET.CAPABILITY += NetworkServices \
ReadUserData \
WriteUserData \
LocalServices \
UserEnvironment \
Location
}
!symbian {
unix {
isEmpty(PREFIX) {
maemo5 {
PREFIX = /opt/usr
@ -454,11 +441,16 @@ symbian {
DEFINES += NOFMAXL
contains( CONFIG, sailfishapp) {
DEFINES += Q_OS_SAILFISH
} else {
# Installation
headers.files = $$PWD/QZXing.h $$PWD/QZXing_global.h
headers.path = $$PREFIX/include
target.path = $$PREFIX/lib
INSTALLS += headers target
}
# pkg-config support
CONFIG += create_pc create_prl no_install_prl

View File

@ -180,7 +180,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)
#if defined(Q_OS_IOS) || defined (Q_OS_MAC) || defined(Q_OS_SAILFISH)
uchar* pixel = pixelInit + (y - 1) * captureRect.targetWidth;
#else
uchar* pixel = pixelInit + (captureRect.targetHeight - y) * captureRect.targetWidth;