qtmobility/examples/lightmaps/lightmaps.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
   331         m_session->open();
   331         m_session->open();
   332     }
   332     }
   333 
   333 
   334     ~LightMaps() {
   334     ~LightMaps() {
   335         m_session->close();
   335         m_session->close();
   336         m_location->stopUpdates();
   336         if (m_location)
       
   337             m_location->stopUpdates();
   337     }
   338     }
   338 
   339 
   339     void stopPositioning() {
   340     void stopPositioning() {
   340         m_location->stopUpdates();
   341         if (m_location)
       
   342             m_location->stopUpdates();
   341     }
   343     }
   342 
   344 
   343     void startPositioning() {
   345     void startPositioning() {
   344         m_location->startUpdates();
   346         if (m_location)
       
   347             m_location->startUpdates();
   345     }
   348     }
   346 
   349 
   347     void setCenter(qreal lat, qreal lng) {
   350     void setCenter(qreal lat, qreal lng) {
   348         if (!m_normalMap || !m_largeMap) {
   351         if (!m_normalMap || !m_largeMap) {
   349             firstLat = lat;
   352             firstLat = lat;