Skip to content

Commit

Permalink
support SailfishOS (fixes #200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftylitak committed Aug 8, 2021
1 parent ac6919c commit b4bdd72
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 26 deletions.
42 changes: 17 additions & 25 deletions src/QZXing-components.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -454,19 +441,24 @@ symbian {

DEFINES += NOFMAXL

# Installation
headers.files = $$PWD/QZXing.h $$PWD/QZXing_global.h
headers.path = $$PREFIX/include
target.path = $$PREFIX/lib
INSTALLS += headers target
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
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib
QMAKE_PKGCONFIG_INCDIR = ${prefix}/include
# pkg-config support
CONFIG += create_pc create_prl no_install_prl
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib
QMAKE_PKGCONFIG_INCDIR = ${prefix}/include

unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl
unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl
}

win32-msvc*{
Expand Down
2 changes: 1 addition & 1 deletion src/QZXingFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4bdd72

Please sign in to comment.