Commit 86d7447f authored by Volker Krause's avatar Volker Krause
Browse files

Fix compilation with Qt 6.4

parent 17e588e1
Pipeline #261866 failed with stage
in 52 seconds
......@@ -50,7 +50,7 @@ QString ContentResolver::fileName(const QUrl &url)
auto cursor = cs.callObjectMethod("query", Jni::signature<android::database::Cursor(android::net::Uri, java::lang::String[], java::lang::String, java::lang::String[], java::lang::String)>(), uri.object<jobject>(), 0, 0, 0, 0);
const QAndroidJniObject DISPLAY_NAME = OpenableColumns::DISPLAY_NAME;
const auto nameIndex = cursor.callMethod<jint>("getColumnIndex", Jni::signature<int(java::lang::String)>(), DISPLAY_NAME.object());
cursor.callMethod<jboolean>("moveToFirst", Jni::signature<bool()>());
const auto nameIndex = cursor.callMethod<jint>("getColumnIndex", (const char*)Jni::signature<int(java::lang::String)>(), DISPLAY_NAME.object());
cursor.callMethod<jboolean>("moveToFirst", (const char*)Jni::signature<bool()>());
return cursor.callObjectMethod("getString", Jni::signature<java::lang::String(int)>(), nameIndex).toString();
}
......@@ -19,7 +19,7 @@ QAndroidJniObject Locale::fromLocale(const QLocale &locale)
auto country = QAndroidJniObject::fromString(QLocale::countryToString(locale.country()));
auto script = QAndroidJniObject::fromString(QLocale::scriptToString(locale.script()));
return QAndroidJniObject(Jni::typeName<java::util::Locale>(), Jni::signature<void(java::lang::String, java::lang::String, java::lang::String)>(),
return QAndroidJniObject(Jni::typeName<java::util::Locale>(), (const char*)Jni::signature<void(java::lang::String, java::lang::String, java::lang::String)>(),
lang.object(), country.object(), script.object());
}
......
......@@ -174,7 +174,7 @@ static inline auto Name( JNI_PARAMS(__VA_ARGS__) ) { \
#define JNI_CONSTRUCTOR(Name, ...) \
inline Name( JNI_PARAMS(__VA_ARGS__) ) { \
using namespace KAndroidExtras; \
setJniHandle(QAndroidJniObject(Jni::typeName<_jni_ThisType>(), Jni::signature<void(__VA_ARGS__)>() __VA_OPT__(,) JNI_ARGS(__VA_ARGS__))); \
setJniHandle(QAndroidJniObject(Jni::typeName<_jni_ThisType>(), (const char*)Jni::signature<void(__VA_ARGS__)>() __VA_OPT__(,) JNI_ARGS(__VA_ARGS__))); \
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment