Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
c300ff8f
Commit
c300ff8f
authored
Nov 14, 2021
by
Volker Krause
Browse files
Put the property wrappers into the internal namespace
Those are not meant to be used directly.
parent
d82d756c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kandroidextras/jni/jniproperty.h
View file @
c300ff8f
...
...
@@ -17,9 +17,6 @@
namespace
KAndroidExtras
{
namespace
Jni
{
/** Annotates a class for holding JNI property wrappers.
* This class has to provide a jniName() method, which is usually achieved by inheriting from
* a type defined by the @c JNI_TYPE or @c JNI_NESTED_TYPE macros.
...
...
@@ -35,6 +32,7 @@ private: \
/** @cond internal */
namespace
Internal
{
/** Wrapper for static properties. */
template
<
typename
PropType
,
typename
ClassType
,
typename
NameHolder
,
bool
BasicType
>
struct
StaticProperty
{};
...
...
@@ -146,7 +144,7 @@ public:
private: \
struct _jni_ ## name ## __NameHolder { static constexpr const char* jniName() { return "" #name; } }; \
public: \
static inline const
Jni
::StaticProperty<type, _jni_ThisType, _jni_ ## name ## __NameHolder, Jni::is_basic_type<type>::value> name;
static inline const
KAndroidExtras::Internal
::StaticProperty<type, _jni_ThisType, _jni_ ## name ## __NameHolder, Jni::is_basic_type<type>::value> name;
/**
* Wrap a member property.
...
...
@@ -171,9 +169,9 @@ private: \
QT_WARNING_POP \
} \
}; \
friend class KAndroidExtras::
Jni
::PropertyBase<_jni_ThisType, _jni_ ## name ## __OffsetHolder>; \
friend class KAndroidExtras::
Internal
::PropertyBase<_jni_ThisType, _jni_ ## name ## __OffsetHolder>; \
public: \
[[no_unique_address]]
Jni
::Property<type, _jni_ThisType, _jni_ ## name ## __NameHolder, _jni_ ## name ## __OffsetHolder, Jni::is_basic_type<type>::value> name;
[[no_unique_address]]
KAndroidExtras::Internal
::Property<type, _jni_ThisType, _jni_ ## name ## __NameHolder, _jni_ ## name ## __OffsetHolder, Jni::is_basic_type<type>::value> name;
}
#endif // KANDROIDEXTRAS_JNIPROPERTIES_H
src/kandroidextras/jni/jnitypes.h
View file @
c300ff8f
...
...
@@ -7,6 +7,7 @@
#ifndef KANDROIDEXTRAS_JNITYPES_H
#define KANDROIDEXTRAS_JNITYPES_H
/** C++/Android integration utilities built on top of @c QAndroidJniObject. */
namespace
KAndroidExtras
{
///@cond internal
...
...
@@ -61,6 +62,7 @@ namespace KAndroidExtras {
/** Macro to define a nested Java class with its corresponding JNI signature string. */
#define JNI_NESTED_TYPE(...) JNI_NESTED_TYPE_(PP_NARG(__VA_ARGS__), "", __VA_ARGS__)
/** Functions for interfacing with the Java Native Interface (JNI). */
namespace
Jni
{
/** Returns the JNI type name of the given template argument. */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment