summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2025-12-12 21:49:00 +0200
committerAhmad Samir <a.samirh78@gmail.com>2025-12-13 15:43:28 +0200
commit208e42ed8cee577fbbc54e602931bf7454421a02 (patch)
treebbed340f448280c4e8a3ed09e055971ecf50dafc /src
parentfee2641696f51966c4c592e9c1a9d38a4f57123b (diff)
Readd Q_ENUM for enums declared as QFlagsHEADdev
Amends d3090f4ff235d12adba5abe3fc2a19d26b4711fc, which replaced Q_ENUMS with Q_FLAG for enums declard as QFlags. Q_FLAG registers the individual enum values with the meta-type system, but doesn't register the enum type itself, which breaks some functionality for the enum type wrt. the meta-type system, e.g. `QMetaEnum::fromType`. Fix the issue by adding Q_ENUM for those enums. Pick-to: 6.11 6.10 6.8 6.5 Change-Id: Ia07985dffc58c26881147194b1fa922643c3f8b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel_p.h4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h4
-rw-r--r--src/location/maps/qgeomap_p.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
index a6ffa5ae..b783e38a 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
@@ -187,6 +187,7 @@ public:
PublicTransitTravel = QGeoRouteRequest::PublicTransitTravel,
TruckTravel = QGeoRouteRequest::TruckTravel
};
+ Q_ENUM(TravelMode)
Q_DECLARE_FLAGS(TravelModes, TravelMode)
Q_FLAG(TravelModes)
@@ -221,6 +222,7 @@ public:
MostEconomicRoute = QGeoRouteRequest::MostEconomicRoute,
MostScenicRoute = QGeoRouteRequest::MostScenicRoute
};
+ Q_ENUM(RouteOptimization)
Q_DECLARE_FLAGS(RouteOptimizations, RouteOptimization)
Q_FLAG(RouteOptimizations)
@@ -228,6 +230,7 @@ public:
NoSegmentData = 0x0000,
BasicSegmentData = 0x0001
};
+ Q_ENUM(SegmentDetail)
Q_DECLARE_FLAGS(SegmentDetails, SegmentDetail)
Q_FLAG(SegmentDetails)
@@ -235,6 +238,7 @@ public:
NoManeuvers = 0x0000,
BasicManeuvers = 0x0001
};
+ Q_ENUM(ManeuverDetail)
Q_DECLARE_FLAGS(ManeuverDetails, ManeuverDetail)
Q_FLAG(ManeuverDetails)
diff --git a/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h b/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h
index 0215472a..fb2e8a0e 100644
--- a/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoserviceprovider_p.h
@@ -113,15 +113,19 @@ public:
AnyNavigationFeatures = QGeoServiceProvider::AnyNavigationFeatures
};
+ Q_ENUM(RoutingFeature)
Q_DECLARE_FLAGS(RoutingFeatures, RoutingFeature)
Q_FLAG(RoutingFeatures)
+ Q_ENUM(GeocodingFeature)
Q_DECLARE_FLAGS(GeocodingFeatures, GeocodingFeature)
Q_FLAG(GeocodingFeatures)
+ Q_ENUM(MappingFeature)
Q_DECLARE_FLAGS(MappingFeatures, MappingFeature)
Q_FLAG(MappingFeatures)
+ Q_ENUM(PlacesFeature)
Q_DECLARE_FLAGS(PlacesFeatures, PlacesFeature)
Q_FLAG(PlacesFeatures)
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h
index f099c3b0..409ed891 100644
--- a/src/location/maps/qgeomap_p.h
+++ b/src/location/maps/qgeomap_p.h
@@ -62,6 +62,7 @@ public:
SupportsVisibleArea = 0x0010,
};
+ Q_ENUM(Capability)
Q_DECLARE_FLAGS(Capabilities, Capability)
Q_FLAG(Capabilities)