Beispiel #1
0
AccountShared * AccountShared::loadStubFromStorage(const QSharedPointer<StoragePoint> &storagePoint)
{
	AccountShared *result = loadFromStorage(storagePoint);
	result->loadStub();

	return result;
}
Beispiel #2
0
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)));
}
Beispiel #3
0
Highscore::Highscore() {
    _storage = cocos2d::UserDefault::getInstance();
    _scoreboard = new std::list<entry>();
    loadFromStorage();
}
Beispiel #4
0
void Highscore::clear() {
    _storage->setStringForKey(SCORE_KEY, "");
    loadFromStorage();
}