#include "gpscontroller.h"
#include "gpscontroller_p.h"
-#include "locations.h"
-
#include <QObject>
#include <QGeoPositionInfo>
#include <QGeoPositionInfoSource>
Location *location;
if ( q->useFakeLocation() ) {
- Locations *locations = Locations::instance();
- location = locations->location( q->fakeLocationLabel() );
+ location = q->fakeLocation();
} else {
location = q->liveLocation();
}
{
qDebug() << "using fake gps (" << fakeLocationLabel << ")";
- Locations *locations = Locations::instance();
- Location *fakeLocation = locations->location( fakeLocationLabel );
+ q->setFakeLocationLabel( fakeLocationLabel );
+ Location *fakeLocation = q->fakeLocation();
if ( fakeLocation == 0 ) {
qDebug() << "invalid fake location label; cannot use fake location";
} else {
q->stopGps();
q->setUseFakeLocation( true );
- q->setFakeLocationLabel( fakeLocationLabel );
emit locationChanged( fakeLocation );
}
}