From 3a2426cbc62cd61f41649d67e3b82244c894d68c Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 3 Nov 2017 12:30:55 +0100 Subject: QGeoMapParameter: allow specifying properties at construction time Change-Id: I761ada8c7419051caed1f670ac5ed88ff0b05782 Reviewed-by: Alex Blasche --- src/location/maps/qgeomapparameter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/location/maps/qgeomapparameter.cpp') diff --git a/src/location/maps/qgeomapparameter.cpp b/src/location/maps/qgeomapparameter.cpp index e282fd45..b1d6f060 100644 --- a/src/location/maps/qgeomapparameter.cpp +++ b/src/location/maps/qgeomapparameter.cpp @@ -47,6 +47,16 @@ QGeoMapParameter::QGeoMapParameter(QObject *parent) : QObject(parent) } +QGeoMapParameter::QGeoMapParameter(const QList > &properties, QObject *parent) : QObject(parent) +{ + for (const auto &p: properties) { + if (p.first == QLatin1String("type")) + setType(p.second.toString()); + else + updateProperty(p.first.data(), p.second); + } +} + QGeoMapParameter::~QGeoMapParameter() { } -- cgit v1.2.3