Commit 73273ca54fbcc5ed359c4ab41587d683b8cbe8d2
1 parent
f190f4384d
Exists in
master
and in
2 other branches
설정, 즐겨찾기 저장 시 싱크 추가
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
app/gui/oven_control/config.cpp
@@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||
22 | #include "backlight.h" | 22 | #include "backlight.h" |
23 | #include "udphandler.h" | 23 | #include "udphandler.h" |
24 | #include "system.h" | 24 | #include "system.h" |
25 | +#include "unistd.h" | ||
25 | 26 | ||
26 | using namespace Define; | 27 | using namespace Define; |
27 | using namespace System; | 28 | using namespace System; |
@@ -131,6 +132,7 @@ bool Config::saveConfig(void){ | @@ -131,6 +132,7 @@ bool Config::saveConfig(void){ | ||
131 | if(file.open(QIODevice::WriteOnly)){ | 132 | if(file.open(QIODevice::WriteOnly)){ |
132 | writelen = file.write(buff,sizeof(config_lists)+1); | 133 | writelen = file.write(buff,sizeof(config_lists)+1); |
133 | file.close(); | 134 | file.close(); |
135 | + sync(); | ||
134 | if(writelen == (sizeof(config_lists)+1)){ | 136 | if(writelen == (sizeof(config_lists)+1)){ |
135 | qDebug() << "config file saved"; | 137 | qDebug() << "config file saved"; |
136 | return true; | 138 | return true; |
@@ -339,6 +341,7 @@ bool Config::saveFavorite(void){ | @@ -339,6 +341,7 @@ bool Config::saveFavorite(void){ | ||
339 | qDebug() << "save favorite index" << itemp; | 341 | qDebug() << "save favorite index" << itemp; |
340 | } | 342 | } |
341 | file.close(); | 343 | file.close(); |
344 | + sync(); | ||
342 | qDebug()<<"saving Favorite menu success"; | 345 | qDebug()<<"saving Favorite menu success"; |
343 | return true; | 346 | return true; |
344 | } | 347 | } |