Android: rename Android's package name for Qt 6

Rename Android package name org.qtproject.qt5.android to
org.qtproject.qt.android to avoid inconsistency with Qt 6 name.
Also, we include the major version number in the jar target.

Task-number: QTBUG-86969
Change-Id: If2c7e014ed52dd97e86c5a179dfbcbcce915ee83
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
Assam Boudjelthia 2020-09-29 11:59:19 +03:00
parent 1ff727d79d
commit 54e48f16bb
6 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="portrait" android:launchMode="singleTop">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="portrait" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View File

@ -27,7 +27,7 @@ SOURCES += \
ANDROID_BUNDLED_JAR_DEPENDENCIES = \
jar/QtAndroidGamepad.jar
jar/Qt$${QT_MAJOR_VERSION}AndroidGamepad.jar
ANDROID_LIB_DEPENDENCIES = \
plugins/gamepads/libplugins_gamepads_androidgamepad.so

View File

@ -1,4 +1,4 @@
TARGET = QtAndroidGamepad
TARGET = Qt$${QT_MAJOR_VERSION}AndroidGamepad
load(qt_build_paths)
CONFIG += java
@ -9,7 +9,7 @@ API_VERSION = android-16
JAVACLASSPATH += $$PWD/src
JAVASOURCES += $$PWD/src/org/qtproject/qt5/android/gamepad/QtGamepad.java
JAVASOURCES += $$PWD/src/org/qtproject/qt/android/gamepad/QtGamepad.java
# install
target.path = $$[QT_INSTALL_PREFIX]/jar

View File

@ -34,7 +34,7 @@
**
****************************************************************************/
package org.qtproject.qt5.android.gamepad;
package org.qtproject.qt.android.gamepad;
import android.app.Activity;
import android.content.Context;

View File

@ -198,7 +198,7 @@ namespace {
{"onInputDeviceChanged", "(JI)V", (void *)onInputDeviceChanged}
};
const char qtGamePadClassName[] = "org/qtproject/qt5/android/gamepad/QtGamepad";
const char qtGamePadClassName[] = "org/qtproject/qt/android/gamepad/QtGamepad";
inline void setAxisInfo(QJNIObjectPrivate &event, int axis, QAndroidGamepadBackend::Mapping::AndroidAxisInfo &info)
{
@ -620,7 +620,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
return JNI_ERR;
// search for Java class which declares the native methods
jclass javaClass = env->FindClass("org/qtproject/qt5/android/gamepad/QtGamepad");
jclass javaClass = env->FindClass("org/qtproject/qt/android/gamepad/QtGamepad");
if (!javaClass)
return JNI_ERR;