diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-11-03 12:30:55 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-12-01 16:02:05 +0000 |
commit | 3a2426cbc62cd61f41649d67e3b82244c894d68c (patch) | |
tree | ece41c820da527bfe3c5466d375aea38ca62f1c7 /src/location/maps/qgeomapparameter.cpp | |
parent | c140ebd51d2ddfc1fb7732cd30c3e307ab467b6d (diff) |
QGeoMapParameter: allow specifying properties at construction time
Change-Id: I761ada8c7419051caed1f670ac5ed88ff0b05782
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeomapparameter.cpp')
-rw-r--r-- | src/location/maps/qgeomapparameter.cpp | 10 |
1 files changed, 10 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() { } |