diff --git a/.travis.yml b/.travis.yml index 1f1affd6..35c94108 100644 --- a/.travis.yml +++ b/.travis.yml @@ -164,6 +164,7 @@ jobs: # ------------------------------------------------------ - name: Linux os: linux + language: cpp dist: focal addons: diff --git a/client/client.pro b/client/client.pro index 14a78e16..bf9db7ed 100644 --- a/client/client.pro +++ b/client/client.pro @@ -11,9 +11,6 @@ IS_CI=$$(CI) } CONFIG += qtquickcompiler -CONFIG += qzxing_multimedia \ - enable_decoder_qr_code \ - enable_encoder_qr_code include("3rd/QtSsh/src/ssh/qssh.pri") include("3rd/QtSsh/src/botan/botan.pri") @@ -247,13 +244,11 @@ android { INCLUDEPATH += platforms/android HEADERS += \ - platforms/android/native.h \ platforms/android/android_controller.h \ platforms/android/android_notificationhandler.h \ protocols/android_vpnprotocol.h SOURCES += \ - platforms/android/native.cpp \ platforms/android/android_controller.cpp \ platforms/android/android_notificationhandler.cpp \ protocols/android_vpnprotocol.cpp diff --git a/client/main.cpp b/client/main.cpp index a5751979..62685953 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -9,10 +9,6 @@ #include "Windows.h" #endif -#if defined(Q_OS_ANDROID) -#include "native.h" -#endif - #if defined(Q_OS_IOS) #include "platforms/ios/QtAppDelegate-C-Interface.h" #endif @@ -46,10 +42,6 @@ int main(int argc, char *argv[]) AllowSetForegroundWindow(0); #endif -#if defined(Q_OS_ANDROID) - NativeHelpers::registerApplicationInstance(&app); -#endif - #if defined(Q_OS_IOS) QtAppDelegateInitialize(); #endif diff --git a/client/platforms/android/native.cpp b/client/platforms/android/native.cpp deleted file mode 100644 index 60ff2d8b..00000000 --- a/client/platforms/android/native.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "native.h" -#include -#if defined(Q_OS_ANDROID) - #include -#endif // Q_OS_ANDROID - - -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*/) -{ - QMetaObject::invokeMethod(NativeHelpers::getApplicationInstance(), "onPermissionsGranted" - , Qt::QueuedConnection); -} - -static void onPermissionsDenied(JNIEnv * /*env*/, jobject /*obj*/) -{ - QMetaObject::invokeMethod(NativeHelpers::getApplicationInstance(), "onPermissionsDenied" - , Qt::QueuedConnection); -} - -//create a vector with all our JNINativeMethod(s) -static JNINativeMethod methods[] = { - {"onPermissionsGranted", "()V", (void *)onPermissionsGranted}, - {"onPermissionsDenied", "()V", (void *)onPermissionsDenied}, -}; - -// this method is called automatically by Java after the .so file is loaded -JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/) -{ - JNIEnv* env; - // get the JNIEnv pointer. - if (vm->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_6) != JNI_OK) - return JNI_ERR; - - // search for Java class which declares the native methods - jclass javaClass = env->FindClass("org/ftylitak/qzxing/NativeFunctions"); - if (!javaClass) - return JNI_ERR; - - // register our native methods - if (env->RegisterNatives(javaClass, methods, - sizeof(methods) / sizeof(methods[0])) < 0) { - return JNI_ERR; - } - - return JNI_VERSION_1_6; -} - -#endif // Q_OS_ANDROID diff --git a/client/platforms/android/native.h b/client/platforms/android/native.h deleted file mode 100644 index db187a73..00000000 --- a/client/platforms/android/native.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef NATIVE_H -#define NATIVE_H - -#include - -class NativeHelpers { -public: - static void registerApplicationInstance(QObject *app_p) { - application_p_ = app_p; - } - - static QObject* getApplicationInstance() { - return application_p_; - } - -private: - static QObject *application_p_; -}; - -#endif // NATIVE_H diff --git a/client/ui/qml/Pages/PageNetworkSetting.qml b/client/ui/qml/Pages/PageNetworkSetting.qml index 924b32dd..0e890446 100644 --- a/client/ui/qml/Pages/PageNetworkSetting.qml +++ b/client/ui/qml/Pages/PageNetworkSetting.qml @@ -87,7 +87,7 @@ If AmneziaDNS service is not installed on the same server, or this option is unc anchors.topMargin: 20 width: parent.width - 60 height: 21 - text: qsTr("Secondray DNS server") + text: qsTr("Secondary DNS server") } TextFieldType { id: dns2 diff --git a/client/ui/qml/Pages/PageStart.qml b/client/ui/qml/Pages/PageStart.qml index ab53792d..d7f2a49c 100644 --- a/client/ui/qml/Pages/PageStart.qml +++ b/client/ui/qml/Pages/PageStart.qml @@ -127,6 +127,7 @@ PageBase { BlueButtonType { id: qr_code_import + visible: GC.isMobile() anchors.horizontalCenter: parent.horizontalCenter anchors.top: qr_code_import_open.bottom anchors.topMargin: 10