diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-07-26 16:45:37 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-07-29 14:13:39 +0000 |
commit | e7099f14c8faea4fb7c89877973b7cec75044cb3 (patch) | |
tree | 773b6ef8f73359c256c4cb442ae4391a4a3d02e8 /src/location/maps/qgeomappingmanager.cpp | |
parent | 75dd424e11964d8755abdb1b12b27a8479353b37 (diff) |
Enable dynamic addition/removal of map types by the mapping manager
Map types are currently fixed in the constructor, regardless of whether
they were available, or, now, whether they are enabled or not.
This patch makes the geomappingmanager notify (e.g., emit a signal)
when the available map types change at runtime. This is used in the
OSM mappingmanagerengine, which can now disable map types if provider
records turn out to be invalid or disabled after they have been
fetched.
Change-Id: I8e0e75504c882609f91c6d1ceb88424eee656f26
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeomappingmanager.cpp')
-rw-r--r-- | src/location/maps/qgeomappingmanager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/location/maps/qgeomappingmanager.cpp b/src/location/maps/qgeomappingmanager.cpp index 681e68a7..8c02417d 100644 --- a/src/location/maps/qgeomappingmanager.cpp +++ b/src/location/maps/qgeomappingmanager.cpp @@ -81,6 +81,12 @@ QGeoMappingManager::QGeoMappingManager(QGeoMappingManagerEngine *engine, QObject this, SIGNAL(initialized()), Qt::QueuedConnection); + + connect(d_ptr->engine, + SIGNAL(supportedMapTypesChanged()), + this, + SIGNAL(supportedMapTypesChanged()), + Qt::QueuedConnection); } /*! |