Commit fd95b2247a1855d87edce60b27eb814d3961a7ec

Authored by 고영탁
1 parent 7835a65554
Exists in master and in 2 other branches fhd, fhd-demo

모든 프로그램 삭제 기능 추가

app/gui/oven_control/config.cpp
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 #include <QFile> 3 #include <QFile>
4 #include <QIODevice> 4 #include <QIODevice>
5 #include <QApplication> 5 #include <QApplication>
  6 +#include <QProcess>
6 #include "config.h" 7 #include "config.h"
7 #include "configdatetimedlg.h" 8 #include "configdatetimedlg.h"
8 #include "configlanguagedlg.h" 9 #include "configlanguagedlg.h"
@@ -466,6 +467,20 @@ void Config::applyCurrentConfigLanguage() @@ -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 void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ 484 void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){
470 QDialog *dlg; 485 QDialog *dlg;
471 QString usbPath = ""; 486 QString usbPath = "";
@@ -562,6 +577,7 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ @@ -562,6 +577,7 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){
562 qDebug() << "Process Sound Config Reset"; 577 qDebug() << "Process Sound Config Reset";
563 } 578 }
564 else if(idx==config_program_initialize){ 579 else if(idx==config_program_initialize){
  580 + allProgramInit();
565 qDebug() << "All Program Reset"; 581 qDebug() << "All Program Reset";
566 } 582 }
567 } 583 }
app/gui/oven_control/config.h
@@ -446,6 +446,7 @@ public: @@ -446,6 +446,7 @@ public:
446 void removeFavorite(Define::ConfigType idx); 446 void removeFavorite(Define::ConfigType idx);
447 QString getProductSerial(); 447 QString getProductSerial();
448 void applyCurrentConfigLanguage(); 448 void applyCurrentConfigLanguage();
  449 + void allProgramInit(void);
449 450
450 451
451 452