From 1d89f6602aae6bc826d846bc5889a71ea4dd7e66 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 14 Sep 2023 09:22:18 +0200 Subject: [PATCH] JNI: Don't explicitly specify deducible template arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Minor cleanup that enables us to change the actual type in some of the wrapper functions, so that we can implicitly convert a QString to a jstring. Change-Id: I2acc99c656231b302269fae439cf3dd49278f09a Reviewed-by: Zoltan Gera Reviewed-by: Petri Virkkunen Reviewed-by: Tinja Paavoseppä --- src/corelib/kernel/qjniobject.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/corelib/kernel/qjniobject.h b/src/corelib/kernel/qjniobject.h index de73676630..ff5d81e1a3 100644 --- a/src/corelib/kernel/qjniobject.h +++ b/src/corelib/kernel/qjniobject.h @@ -98,11 +98,7 @@ public: auto callMethod(const char *methodName, Args &&...args) const { constexpr auto signature = QtJniTypes::methodSignature(); - if constexpr (std::is_same_v) { - callMethod(methodName, signature.data(), std::forward(args)...); - } else { - return callMethod(methodName, signature.data(), std::forward(args)...); - } + return callMethod(methodName, signature.data(), std::forward(args)...); } template (clazz, id, std::forward(args)...); + return callStaticMethod(clazz, id, std::forward(args)...); } template (clazz, methodName, std::forward(args)...); + return callStaticMethod(clazz, methodName, std::forward(args)...); } template