Skip to content

Commit

Permalink
Fix build with Qt 6.7 on Android
Browse files Browse the repository at this point in the history
QNativeInterface::QAndroidApplication::context() changed its return type.
  • Loading branch information
vkrause authored and frankosterfeld committed May 3, 2024
1 parent 8eac988 commit ef6dec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion keychain_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ void WritePasswordJobPrivate::scheduledStart()
KeyPairGeneratorSpec::Builder(Context(QtAndroid::androidActivity())).
#elif QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
KeyPairGeneratorSpec::Builder(Context(QNativeInterface::QAndroidApplication::context())).
#else
#elif QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
KeyPairGeneratorSpec::Builder(Context((jobject)QNativeInterface::QAndroidApplication::context())).
#else
KeyPairGeneratorSpec::Builder(Context(QNativeInterface::QAndroidApplication::context().object<jobject>())).
#endif
setAlias(alias).
setSubject(X500Principal(QStringLiteral("CN=QtKeychain, O=Android Authority"))).
Expand Down

0 comments on commit ef6dec2

Please sign in to comment.