AccountShared * AccountShared::loadStubFromStorage(const QSharedPointer<StoragePoint> &storagePoint) { AccountShared *result = loadFromStorage(storagePoint); result->loadStub(); return result; }
GpsLocation::GpsLocation(void (*showMsgCB)(const char *), QObject *parent) : QObject(parent), m_GpsSource(0), waitingForPosition(false), haveSource(UNKNOWN) { Q_ASSERT_X(m_Instance == NULL, "GpsLocation", "GpsLocation recreated"); m_Instance = this; showMessageCB = showMsgCB; // create a QSettings object that's separate from the main application settings geoSettings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, QString("org.subsurfacedivelog"), QString("subsurfacelocation"), this); userAgent = getUserAgent(); (void)getGpsSource(); loadFromStorage(); // register changes in time threshold connect(qPrefLocationService::instance(), SIGNAL(time_thresholdChanged(int)), this, SLOT(setGpsTimeThreshold(int))); }
Highscore::Highscore() { _storage = cocos2d::UserDefault::getInstance(); _scoreboard = new std::list<entry>(); loadFromStorage(); }
void Highscore::clear() { _storage->setStringForKey(SCORE_KEY, ""); loadFromStorage(); }