summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2024-01-22 13:22:25 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2024-01-23 13:56:54 +0100
commit2c9525a501a33b880e49b57a7c5fa5f11d70bc0c (patch)
treeddba553fa39dbfa8d52eb0666f3081216c95a70d /src
parent2a832b40af9c8fa866ee984a4abd776ccbd2b2ad (diff)
QJniArray: add test case for QJniArray::size
Fix build of the test by removing the reference from the container type before accessing the nested typedef. Pick-to: 6.7 Change-Id: Ic35f312bac70b8f8f80149a3432329070c8c8c7d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qjniarray.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qjniarray.h b/src/corelib/kernel/qjniarray.h
index d690137ac06..0fec3d094ec 100644
--- a/src/corelib/kernel/qjniarray.h
+++ b/src/corelib/kernel/qjniarray.h
@@ -11,6 +11,7 @@
#include <QtCore/qjniobject.h>
#include <utility>
+#include <type_traits>
QT_BEGIN_NAMESPACE
@@ -87,7 +88,7 @@ public:
>
static auto fromContainer(Container &&container)
{
- using ElementType = typename Container::value_type;
+ using ElementType = typename std::remove_reference_t<Container>::value_type;
if constexpr (std::disjunction_v<std::is_same<ElementType, jobject>,
std::is_same<ElementType, QJniObject>>) {
return makeObjectArray(std::forward<Container>(container));