From bc241d2fbc9d9c3814e1f1a572994b3ebbcb1cfb Mon Sep 17 00:00:00 2001 From: bongbui321 Date: Sun, 28 Jan 2024 03:01:12 -0500 Subject: [PATCH 1/2] 5.12 enable --- src/core/types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/types.hpp b/src/core/types.hpp index fd346da..4a82730 100644 --- a/src/core/types.hpp +++ b/src/core/types.hpp @@ -42,7 +42,7 @@ struct Q_MAPLIBRE_CORE_EXPORT Style { CustomMap = 100 }; - explicit Style(QString url_, QString name_ = QString()) + explicit Style(QString url_ = QString(), QString name_ = QString()) : url(std::move(url_)), name(std::move(name_)) {} From 89a352f3cc3c0287f64a21b2ee133a4e4f24e188 Mon Sep 17 00:00:00 2001 From: bongbui321 Date: Sun, 28 Jan 2024 14:03:00 -0500 Subject: [PATCH 2/2] sanity check --- src/core/types.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/types.hpp b/src/core/types.hpp index 4a82730..696fab1 100644 --- a/src/core/types.hpp +++ b/src/core/types.hpp @@ -42,9 +42,15 @@ struct Q_MAPLIBRE_CORE_EXPORT Style { CustomMap = 100 }; +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + explicit Style(QString url_, QString name_ = QString()) + : url(std::move(url_)), + name(std::move(name_)) {} +#else explicit Style(QString url_ = QString(), QString name_ = QString()) : url(std::move(url_)), name(std::move(name_)) {} +#endif QString url; QString name;