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
|
.gradle
|
||||||
.idea
|
.idea
|
||||||
.build
|
.build
|
||||||
|
.obj
|
||||||
|
@ -12,10 +12,12 @@ CONFIG(debug, debug|release) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
application.h
|
application.h \
|
||||||
|
native.h
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
application.cpp
|
application.cpp \
|
||||||
|
native.cpp
|
||||||
|
|
||||||
RESOURCES += qml.qrc
|
RESOURCES += qml.qrc
|
||||||
|
|
||||||
@ -30,12 +32,6 @@ include(deployment.pri)
|
|||||||
android {
|
android {
|
||||||
QT += androidextras
|
QT += androidextras
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
native.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
native.cpp
|
|
||||||
|
|
||||||
DISTFILES += \
|
DISTFILES += \
|
||||||
android/AndroidManifest.xml \
|
android/AndroidManifest.xml \
|
||||||
android/gradle/wrapper/gradle-wrapper.jar \
|
android/gradle/wrapper/gradle-wrapper.jar \
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
#if defined(Q_OS_ANDROID)
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
#endif //Q_OS_ANDROID
|
||||||
#include "native.h"
|
#include "native.h"
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
|
|
||||||
QObject *NativeHelpers::application_p_ = 0;
|
QObject *NativeHelpers::application_p_ = 0;
|
||||||
|
|
||||||
|
#if defined(Q_OS_ANDROID)
|
||||||
|
|
||||||
// define our native static functions
|
// define our native static functions
|
||||||
// these are the functions that Java part will call directly from Android UI thread
|
// these are the functions that Java part will call directly from Android UI thread
|
||||||
static void onPermissionsGranted(JNIEnv * /*env*/, jobject /*obj*/)
|
static void onPermissionsGranted(JNIEnv * /*env*/, jobject /*obj*/)
|
||||||
@ -45,3 +49,5 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/)
|
|||||||
|
|
||||||
return JNI_VERSION_1_6;
|
return JNI_VERSION_1_6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // Q_OS_ANDROID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user