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

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