QLocationManagerProvidersListener::QLocationManagerProvidersListener(QObject * parent /*= 0*/) :
	QObject(parent)
{
	preloadJavaClasses();

	// Creating Java object
	handler_.reset(new QJniObject(c_full_class_name_, "J",
		jlong(reinterpret_cast<void*>(this))));
}
JniObjectLinker::JniObjectLinker(void * nativePtr, const char * full_class_name, const JNINativeMethod * methods_list, size_t sizeof_methods_list) : 
	full_class_name_(full_class_name)
	, preloaded_(false)
{
	preloadJavaClasses(methods_list, sizeof_methods_list);

	// Creating Java object
	handler_.reset(new QJniObject(full_class_name, "J", jlong(nativePtr)));
}
QAndroidCompass::QAndroidCompass(QObject * parent /*= 0*/) :
	QObject(parent)
{
	preloadJavaClasses();

	// Creating Java object
	handler_.reset(new QJniObject(c_full_class_name_, "J",
		jlong(reinterpret_cast<void*>(this))));
}
Exemplo n.º 4
0
QAndroidDialog::QAndroidDialog(QObject * parent /*= 0*/)
	: QObject(parent)
	, delete_self_on_close_(false)
	, result_button_(0)
{
	preloadJavaClasses();
	dialog_helper_.reset(new QJniObject(c_full_class_name_, "J", (jlong)this));
	if (!dialog_helper_->jObject())
	{
		qCritical()<<"Failed to create DialogHelper instance!";
		dialog_helper_.reset();
	}
}