[qt] Support GeoJSON feature collection as std::list (#541)

This commit is contained in:
Dan Paulat
2022-10-22 09:34:29 -05:00
committed by GitHub
parent 61caddd084
commit a59c876018
2 changed files with 8 additions and 1 deletions

View File

@@ -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.

View File

@@ -50,7 +50,8 @@ public:
#endif
|| QString(value.typeName()) == QStringLiteral("QMapLibreGL::Feature")
|| value.userType() == qMetaTypeId<QVector<QMapLibreGL::Feature>>()
|| value.userType() == qMetaTypeId<QList<QMapLibreGL::Feature>>();
|| value.userType() == qMetaTypeId<QList<QMapLibreGL::Feature>>()
|| value.userType() == qMetaTypeId<std::list<QMapLibreGL::Feature>>();
}
static optional<QVariant> objectMember(const QVariant& value, const char* key) {
@@ -176,6 +177,8 @@ public:
return featureCollectionToGeoJSON(value.value<QVector<QMapLibreGL::Feature>>());
} else if (value.userType() == qMetaTypeId<QList<QMapLibreGL::Feature>>()) {
return featureCollectionToGeoJSON(value.value<QList<QMapLibreGL::Feature>>());
} else if (value.userType() == qMetaTypeId<std::list<QMapLibreGL::Feature>>()) {
return featureCollectionToGeoJSON(value.value<std::list<QMapLibreGL::Feature>>());
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
} else if (value.typeId() != QMetaType::QByteArray) {
#else