Changes: removed locations singleton.
[ptas] / zouba / src / gpscontroller_p.cpp
index 537d10a..41086b0 100644 (file)
@@ -57,13 +57,15 @@ void GpsControllerPrivate::setGps( QGeoPositionInfoSource *gps )
 
 Location *GpsControllerPrivate::liveLocation()
 {
+  m_mostRecentlyReportedLocation = m_liveLocation;
   return m_liveLocation;
 }
 
 Location *GpsControllerPrivate::fakeLocation()
 {
-  Locations *locations = Locations::instance();
-  Location  *location = locations->location( fakeLocationLabel() );
+  Locations locations;
+  Location  *location = locations.location( fakeLocationLabel() );
+  m_mostRecentlyReportedLocation = location;
   return location;
 }
 
@@ -92,3 +94,7 @@ void GpsControllerPrivate::updateLocation( QGeoPositionInfo positionInfo )
   m_liveLocation->setLocation( positionInfo );
 }
 
+Location *GpsControllerPrivate::mostRecentlyReportedLocation()
+{
+  return m_mostRecentlyReportedLocation;
+}