Locations::Locations() :
m_locationStorage(QHash<QString,Location *>()),
m_indexStorage(QList<QString>()),
- m_gpsLocation(new Location("GPS"))
+ m_gpsLocation(new GpsLocation())
{
this->restoreLocations();
qDebug() << "Size of index storage:" << this->m_indexStorage.size();
qDebug() << "Restoring " << label;
Location *location;
if (valid) {
- location = new Location( x, y, label );
- location->setAddress(address);
+ location = new Location( x, y, label, address );
+ this->m_locationStorage[label] = location;
+ this->m_indexStorage.append(label);
+ if (index != 0)
+ tempIndex.insert(label, index);
}
- else
- location = new Location(label);
- this->m_locationStorage[label] = location;
- this->m_indexStorage.append(label);
- if (index != 0)
- tempIndex.insert(label, index);
+
}
settings.endGroup();
return this->m_locationStorage;
}*/
-Location *Locations::getGpsLocation() const
+GpsLocation *Locations::getGpsLocation() const
{
qDebug() << "GPS location requested.";
return this->m_gpsLocation;