QJniObject: remove unused private methods
These three private methods were introduced in 4e60681c879a54cf5b34862a30e27c492ed36363 together with the QJniObject class. Digging through the whole git log for the qjniobject.h header shows that the functions were never used. Not in template or inline methods, and not even in the out-of-line methods. Considering all the above, removing these methods would not cause BiC or SiC issues, so just do it. Change-Id: Iaeeefbc2f1002e9413fd16651abd71381362a536 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit f50e29568066e293a54104086a11e72c3abb3823) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
bbe8c20ff5
commit
f10c8d3069
@ -864,64 +864,6 @@ QByteArray QJniObject::className() const
|
||||
return d->m_className;
|
||||
}
|
||||
|
||||
QJniObject QJniObject::callObjectMethodV(const char *methodName,
|
||||
const char *signature,
|
||||
va_list args) const
|
||||
{
|
||||
QJniEnvironment env;
|
||||
jobject res = nullptr;
|
||||
jmethodID id = getCachedMethodID(env.jniEnv(), methodName, signature);
|
||||
if (id) {
|
||||
res = env->CallObjectMethodV(d->m_jobject, id, args);
|
||||
if (env.checkAndClearExceptions()) {
|
||||
env->DeleteLocalRef(res);
|
||||
res = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
QJniObject obj(res);
|
||||
env->DeleteLocalRef(res);
|
||||
return obj;
|
||||
}
|
||||
|
||||
QJniObject QJniObject::callStaticObjectMethodV(const char *className,
|
||||
const char *methodName,
|
||||
const char *signature,
|
||||
va_list args)
|
||||
{
|
||||
QJniEnvironment env;
|
||||
jobject res = nullptr;
|
||||
jclass clazz = loadClass(className, env.jniEnv());
|
||||
if (clazz) {
|
||||
jmethodID id = QJniObject::getCachedMethodID(env.jniEnv(), clazz, toBinaryEncClassName(className),
|
||||
methodName, signature, true);
|
||||
if (id) {
|
||||
res = env->CallStaticObjectMethodV(clazz, id, args);
|
||||
if (env.checkAndClearExceptions()) {
|
||||
env->DeleteLocalRef(res);
|
||||
res = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QJniObject obj(res);
|
||||
env->DeleteLocalRef(res);
|
||||
return obj;
|
||||
}
|
||||
|
||||
QJniObject QJniObject::callStaticObjectMethodV(jclass clazz,
|
||||
const char *methodName,
|
||||
const char *signature,
|
||||
va_list args)
|
||||
{
|
||||
QJniEnvironment env;
|
||||
jmethodID id = getMethodID(env.jniEnv(), clazz, methodName, signature, true);
|
||||
if (!id)
|
||||
return QJniObject();
|
||||
|
||||
return getCleanJniObject(env->CallStaticObjectMethodV(clazz, id, args));
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn template <typename Ret, typename ...Args> auto QJniObject::callMethod(const char *methodName, const char *signature, Args &&...args) const
|
||||
\since 6.4
|
||||
|
@ -436,15 +436,6 @@ private:
|
||||
void callVoidMethodV(JNIEnv *env, jmethodID id, ...) const;
|
||||
// ### Qt 7: merge into ... overload
|
||||
void callVoidMethodV(JNIEnv *env, jmethodID id, va_list args) const;
|
||||
// ### Qt 7: remove unused
|
||||
QJniObject callObjectMethodV(const char *methodName, const char *signature,
|
||||
va_list args) const;
|
||||
// ### Qt 7: remove unused
|
||||
static QJniObject callStaticObjectMethodV(const char *className, const char *methodName,
|
||||
const char *signature, va_list args);
|
||||
// ### Qt 7: remove unused
|
||||
static QJniObject callStaticObjectMethodV(jclass clazz, const char *methodName,
|
||||
const char *signature, va_list args);
|
||||
|
||||
bool isSameObject(jobject obj) const;
|
||||
bool isSameObject(const QJniObject &other) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user