JNI: Remove unused private constructor overloads
Those are never used, and removing this causes no problems. Change-Id: Icae334d2d80197c4a416018e435e588a9c76d843 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io> Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
This commit is contained in:
parent
980b86d09f
commit
4702208b40
@ -630,25 +630,6 @@ QJniObject::QJniObject(const char *className, const char *signature, ...)
|
||||
\endcode
|
||||
*/
|
||||
|
||||
QJniObject::QJniObject(const char *className, const char *signature, const QVaListPrivate &args)
|
||||
: d(new QJniObjectPrivate())
|
||||
{
|
||||
QJniEnvironment env;
|
||||
d->m_className = toBinaryEncClassName(className);
|
||||
d->m_jclass = loadClass(d->m_className, env.jniEnv(), true);
|
||||
d->m_own_jclass = false;
|
||||
if (d->m_jclass) {
|
||||
jmethodID constructorId = getCachedMethodID(env.jniEnv(), "<init>", signature);
|
||||
if (constructorId) {
|
||||
jobject obj = env->NewObjectV(d->m_jclass, constructorId, args);
|
||||
if (obj) {
|
||||
d->m_jobject = env->NewGlobalRef(obj);
|
||||
env->DeleteLocalRef(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Constructs a new JNI object from \a clazz by calling the constructor with
|
||||
\a signature specifying the types of any subsequent arguments.
|
||||
@ -722,25 +703,6 @@ QJniObject::QJniObject(jclass clazz)
|
||||
}
|
||||
}
|
||||
|
||||
QJniObject::QJniObject(jclass clazz, const char *signature, const QVaListPrivate &args)
|
||||
: d(new QJniObjectPrivate())
|
||||
{
|
||||
QJniEnvironment env;
|
||||
if (clazz) {
|
||||
d->m_jclass = static_cast<jclass>(env->NewGlobalRef(clazz));
|
||||
if (d->m_jclass) {
|
||||
jmethodID constructorId = getMethodID(env.jniEnv(), d->m_jclass, "<init>", signature);
|
||||
if (constructorId) {
|
||||
jobject obj = env->NewObjectV(d->m_jclass, constructorId, args);
|
||||
if (obj) {
|
||||
d->m_jobject = env->NewGlobalRef(obj);
|
||||
env->DeleteLocalRef(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Constructs a new JNI object around the Java object \a object.
|
||||
|
||||
|
@ -495,10 +495,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
struct QVaListPrivate { operator va_list &() const { return m_args; } va_list &m_args; };
|
||||
QJniObject(const char *className, const char *signature, const QVaListPrivate &args);
|
||||
QJniObject(jclass clazz, const char *signature, const QVaListPrivate &args);
|
||||
|
||||
static jclass loadClass(const QByteArray &className, JNIEnv *env, bool binEncoded = false);
|
||||
static QByteArray toBinaryEncClassName(const QByteArray &className);
|
||||
static QJniObject getCleanJniObject(jobject obj);
|
||||
|
Loading…
Reference in New Issue
Block a user