diff options
-rw-r--r-- | src/location/maps/qgeomapparameter.cpp | 10 | ||||
-rw-r--r-- | src/location/maps/qgeomapparameter_p.h | 1 |
2 files changed, 11 insertions, 0 deletions
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<QPair<QLatin1String, QVariant> > &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() { } diff --git a/src/location/maps/qgeomapparameter_p.h b/src/location/maps/qgeomapparameter_p.h index 4d54c688..90a446ff 100644 --- a/src/location/maps/qgeomapparameter_p.h +++ b/src/location/maps/qgeomapparameter_p.h @@ -63,6 +63,7 @@ class Q_LOCATION_PRIVATE_EXPORT QGeoMapParameter : public QObject Q_PROPERTY(QString type READ type WRITE setType) public: explicit QGeoMapParameter(QObject *parent = 0); + QGeoMapParameter(const QList<QPair<QLatin1String, QVariant>> &properties, QObject *parent = 0); virtual ~QGeoMapParameter(); bool operator==(const QGeoMapParameter &other) const; |