From a59c87601873bd47ed970650298f43fbfcf82e52 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 22 Oct 2022 09:34:29 -0500 Subject: [PATCH] [qt] Support GeoJSON feature collection as std::list (#541) --- platform/qt/CHANGELOG.md | 4 ++++ platform/qt/src/utils/conversion.hpp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/qt/CHANGELOG.md b/platform/qt/CHANGELOG.md index 01ce28061..110b2225a 100644 --- a/platform/qt/CHANGELOG.md +++ b/platform/qt/CHANGELOG.md @@ -2,6 +2,10 @@ ## Upcoming +### ✨ New features + +- Support for GeoJSON feature collections using std::list ([#541](https://github.com/maplibre/maplibre-gl-native/pull/541)). + ### 🐞 Bug fixes - Fixed bitcode issues on iOS. diff --git a/platform/qt/src/utils/conversion.hpp b/platform/qt/src/utils/conversion.hpp index f71a333ec..c4343ab40 100644 --- a/platform/qt/src/utils/conversion.hpp +++ b/platform/qt/src/utils/conversion.hpp @@ -50,7 +50,8 @@ public: #endif || QString(value.typeName()) == QStringLiteral("QMapLibreGL::Feature") || value.userType() == qMetaTypeId>() - || value.userType() == qMetaTypeId>(); + || value.userType() == qMetaTypeId>() + || value.userType() == qMetaTypeId>(); } static optional objectMember(const QVariant& value, const char* key) { @@ -176,6 +177,8 @@ public: return featureCollectionToGeoJSON(value.value>()); } else if (value.userType() == qMetaTypeId>()) { return featureCollectionToGeoJSON(value.value>()); + } else if (value.userType() == qMetaTypeId>()) { + return featureCollectionToGeoJSON(value.value>()); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) } else if (value.typeId() != QMetaType::QByteArray) { #else