mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-12 19:06:50 +00:00
fixed compilation of QZXingLive for platforms other than Android
This commit is contained in:
parent
a69cd45ac6
commit
f581e879de
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,3 +25,4 @@ debug/
|
||||
.gradle
|
||||
.idea
|
||||
.build
|
||||
.obj
|
||||
|
@ -12,10 +12,12 @@ CONFIG(debug, debug|release) {
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
application.h
|
||||
application.h \
|
||||
native.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
application.cpp
|
||||
application.cpp \
|
||||
native.cpp
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
@ -30,12 +32,6 @@ include(deployment.pri)
|
||||
android {
|
||||
QT += androidextras
|
||||
|
||||
HEADERS += \
|
||||
native.h
|
||||
|
||||
SOURCES += \
|
||||
native.cpp
|
||||
|
||||
DISTFILES += \
|
||||
android/AndroidManifest.xml \
|
||||
android/gradle/wrapper/gradle-wrapper.jar \
|
||||
|
@ -1,9 +1,13 @@
|
||||
#include <jni.h>
|
||||
#if defined(Q_OS_ANDROID)
|
||||
#include <jni.h>
|
||||
#endif //Q_OS_ANDROID
|
||||
#include "native.h"
|
||||
#include <QMetaObject>
|
||||
|
||||
QObject *NativeHelpers::application_p_ = 0;
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
|
||||
// define our native static functions
|
||||
// these are the functions that Java part will call directly from Android UI thread
|
||||
static void onPermissionsGranted(JNIEnv * /*env*/, jobject /*obj*/)
|
||||
@ -45,3 +49,5 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/)
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
#endif // Q_OS_ANDROID
|
||||
|
Loading…
x
Reference in New Issue
Block a user