Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
86d7447f
Commit
86d7447f
authored
Nov 05, 2022
by
Volker Krause
Browse files
Fix compilation with Qt 6.4
parent
17e588e1
Pipeline
#261866
failed with stage
in 52 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/kandroidextras/android/contentresolver.cpp
View file @
86d7447f
...
...
@@ -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
();
}
src/kandroidextras/java/javalocale.cpp
View file @
86d7447f
...
...
@@ -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
());
}
...
...
src/kandroidextras/jni/jnimethod.h
View file @
86d7447f
...
...
@@ -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__))); \
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment