Commit fd95b2247a1855d87edce60b27eb814d3961a7ec
1 parent
7835a65554
Exists in
master
and in
2 other branches
모든 프로그램 삭제 기능 추가
Showing
2 changed files
with
17 additions
and
0 deletions
Show diff stats
app/gui/oven_control/config.cpp
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | #include <QFile> |
| 4 | 4 | #include <QIODevice> |
| 5 | 5 | #include <QApplication> |
| 6 | +#include <QProcess> | |
| 6 | 7 | #include "config.h" |
| 7 | 8 | #include "configdatetimedlg.h" |
| 8 | 9 | #include "configlanguagedlg.h" |
| ... | ... | @@ -466,6 +467,20 @@ void Config::applyCurrentConfigLanguage() |
| 466 | 467 | } |
| 467 | 468 | } |
| 468 | 469 | |
| 470 | +void Config::allProgramInit() | |
| 471 | +{ | |
| 472 | + QProcess process(this); | |
| 473 | + QStringList args; | |
| 474 | + process.start("sh -c \"rm -rf /prime/*\""); | |
| 475 | + if(process.waitForFinished(30000)==true){ | |
| 476 | + qDebug()<< "All Program Delete Success:"; | |
| 477 | + sync(); | |
| 478 | + QProcess reboot; | |
| 479 | + reboot.start("reboot"); | |
| 480 | + reboot.waitForFinished(); | |
| 481 | + } | |
| 482 | +} | |
| 483 | + | |
| 469 | 484 | void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ |
| 470 | 485 | QDialog *dlg; |
| 471 | 486 | QString usbPath = ""; |
| ... | ... | @@ -562,6 +577,7 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ |
| 562 | 577 | qDebug() << "Process Sound Config Reset"; |
| 563 | 578 | } |
| 564 | 579 | else if(idx==config_program_initialize){ |
| 580 | + allProgramInit(); | |
| 565 | 581 | qDebug() << "All Program Reset"; |
| 566 | 582 | } |
| 567 | 583 | } | ... | ... |