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 | 22 | #include "backlight.h" |
23 | 23 | #include "udphandler.h" |
24 | 24 | #include "system.h" |
25 | +#include "unistd.h" | |
25 | 26 | |
26 | 27 | using namespace Define; |
27 | 28 | using namespace System; |
... | ... | @@ -131,6 +132,7 @@ bool Config::saveConfig(void){ |
131 | 132 | if(file.open(QIODevice::WriteOnly)){ |
132 | 133 | writelen = file.write(buff,sizeof(config_lists)+1); |
133 | 134 | file.close(); |
135 | + sync(); | |
134 | 136 | if(writelen == (sizeof(config_lists)+1)){ |
135 | 137 | qDebug() << "config file saved"; |
136 | 138 | return true; |
... | ... | @@ -339,6 +341,7 @@ bool Config::saveFavorite(void){ |
339 | 341 | qDebug() << "save favorite index" << itemp; |
340 | 342 | } |
341 | 343 | file.close(); |
344 | + sync(); | |
342 | 345 | qDebug()<<"saving Favorite menu success"; |
343 | 346 | return true; |
344 | 347 | } | ... | ... |