thread-safe database classes, created instead of last modifed date in
title
This commit is contained in:
parent
419cd98cba
commit
1067fcf353
8 changed files with 28 additions and 2 deletions
|
@ -47,15 +47,21 @@ ProfileDatabase::~ProfileDatabase()
|
|||
|
||||
QStringList ProfileDatabase::getPlayers()
|
||||
{
|
||||
mutex.lock();
|
||||
return profileDB->childKeys();
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
QString ProfileDatabase::getPlayerName(int playerID)
|
||||
{
|
||||
mutex.lock();
|
||||
return profileDB->value(QString::number(playerID), playerID).toString();
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
void ProfileDatabase::setPlayerName(int playerID, QString playerName)
|
||||
{
|
||||
mutex.lock();
|
||||
profileDB->setValue(QString::number(playerID), playerName);
|
||||
mutex.unlock();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue