Fix bug that prevented aquireing new items
Add save button to master that saves json file Remove autosave on quit
This commit is contained in:
parent
5fb9ca7cc0
commit
954eec754c
14 changed files with 61 additions and 18 deletions
|
|
@ -56,12 +56,6 @@ MainObject::MainObject(QIODevice* ioDevice, const QString& settingsPathIn, const
|
|||
|
||||
MainObject::~MainObject()
|
||||
{
|
||||
if(master)
|
||||
{
|
||||
QJsonObject json;
|
||||
store(json);
|
||||
if(!noSave)storeJsonObjectToDisk(json, settingsPath);
|
||||
}
|
||||
}
|
||||
|
||||
void MainObject::store(QJsonObject &json)
|
||||
|
|
@ -98,9 +92,20 @@ void MainObject::load(const QJsonObject& json)
|
|||
micro.requestState();
|
||||
}
|
||||
|
||||
void MainObject::storeToDisk()
|
||||
{
|
||||
if(master && !noSave)
|
||||
{
|
||||
QJsonObject json;
|
||||
store(json);
|
||||
storeJsonObjectToDisk(json, settingsPath);
|
||||
}
|
||||
}
|
||||
|
||||
void MainObject::recivedJson(const QJsonObject json)
|
||||
{
|
||||
if(master && !noSave)storeJsonObjectToDisk(json, settingsPath);
|
||||
if(master && !noSave)
|
||||
storeJsonObjectToDisk(json, settingsPath);
|
||||
load(json);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue