update// reformated datastore and changed storage chatmodel to store with datastore

This commit is contained in:
Strider
2020-05-08 21:16:40 +02:00
parent d0562d2c65
commit 30ddc479ba
11 changed files with 104 additions and 88 deletions

View File

@@ -0,0 +1,35 @@
#include "SietchDataStore.h"
SietchDataStore* SietchDataStore::getInstance()
{
if(!SietchDataStore::instanced)
{
SietchDataStore::instanced = true;
SietchDataStore::instance = new SietchDataStore();
}
return SietchDataStore::instance;
}
void SietchDataStore::clear()
{
this->data.clear();
}
void SietchDataStore::setData(QString key, QString value)
{
this->data[key] = value;
}
QString SietchDataStore::getData(QString key)
{
return this->data[key];
}
QString SietchDataStore::dump()
{
return "";
}
SietchDataStore* SietchDataStore::instance = nullptr;
bool SietchDataStore::instanced = false;