Skip to content

Commit

Permalink
Make creation of Style with empty URL possible (#107)
Browse files Browse the repository at this point in the history
* 5.12 enable

* sanity check
  • Loading branch information
bongbui321 authored Jan 28, 2024
1 parent 91e64b0 commit 3726266
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3726266

Please sign in to comment.