Commit cc63fa9f8462ca364c98483fcb0681c3099e3d79

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

데모모드 삭제 및 파일 복사 기능 개선

  - 버그 수정
app/gui/oven_control/configinfodlg.cpp
... ... @@ -8,7 +8,7 @@
8 8  
9 9 #define MODEL_INFO_FILE_NAME "/prime/config/model_info.txt"
10 10 #define CHEF_INFO_FILE_NAME "/prime/config/chef_info.txt"
11   -#define SERVICE_INFO_FILE_NAME "/prime/config/hotline_info.txt"
  11 +#define SERVICE_INFO_FILE_NAME "/prime/config/service_info.txt"
12 12  
13 13 static const char* g_strModelTypeName[] ={
14 14 QT_TRANSLATE_NOOP("ConfigInfoDlg", "전기식 10단"),
... ... @@ -127,7 +127,7 @@ void ConfigInfoDlg::loadHotlineChefInfo(){
127 127 QLabel* label;
128 128  
129 129  
130   -
  130 +//Default Value;
131 131 mapInfos[tr("연 락 처")] = "010-3004-6517";
132 132 mapInfos[tr("이 름")] = "김성우";
133 133 mapInfos[tr("위치정보")] ="인천광역시 남동구 남동동로 34번길 56";
... ... @@ -150,7 +150,7 @@ void ConfigInfoDlg::loadHotlineServiceInfo(){
150 150 QMap<QString , QString> mapInfos;
151 151 QLabel* label;
152 152  
153   -
  153 +//Default Value
154 154 mapInfos[tr("연 락 처")] = "1644-9533";
155 155 mapInfos[tr("위치정보")] ="인천광역시 남동구 남동동로 34번길 56";
156 156  
... ...
app/gui/oven_control/configwindow.h
... ... @@ -32,7 +32,7 @@ class ConfigWindow : public QMainWindow
32 32  
33 33 private:
34 34 const uint16_t m_arrMaxMenuCount[7] ={
35   - 6,8,8,2,3,0,6
  35 + 6,8,8,2,3,0,5
36 36 };
37 37 const Define::ConfigType m_arrConfigListInfos[7][20] = {
38 38 {config_language,config_datetime, config_temptype,config_backlight, config_time_type,config_resttime_format,},
... ... @@ -41,7 +41,7 @@ private:
41 41 {config_set_half_energy,config_set_auto_darkness,},
42 42 {config_duty_wash,config_loading_door_monitoring,config_cooking_door_monitoring},
43 43 {config_invalid,},
44   - {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_demo_mode,config_enter_engineer_mode}
  44 + {config_software_info,config_hotline_chef,config_hotline_service,config_steam_wash,config_enter_engineer_mode}
45 45 };
46 46  
47 47 void nextFocus();
... ...
app/gui/oven_control/fileprocessdlg.cpp
... ... @@ -116,9 +116,13 @@ void ProgramCopyWorker::workerMain(){
116 116 foreach(QFileInfo finfo, strFileInfolist){
117 117 srcFilepath = finfo.absoluteFilePath();
118 118 destFilePath = QString("%1/%2").arg(QString(strDir).replace(srcpath,targetpath)).arg(finfo.fileName());
  119 + if(QFile::copy(srcFilepath, destFilePath)==false){
  120 + qDebug() << srcFilepath << " file copy fail! dest file path info is " << destFilePath;
  121 + }
119 122 nCpyFileSize += finfo.size();
120 123 nCurProgress = (nCpyFileSize *100) / nTotalFileSize;
121 124 nRemainSec = (nTotalFileSize-nCpyFileSize)/200000;
  125 +
122 126 //qDebug() << srcFilepath << destFilePath << "total size " << nTotalFileSize << "nCpyFileSize " << nCpyFileSize;
123 127 emit progressed(nCurProgress,nRemainSec);
124 128 if(QThread::currentThread()->isInterruptionRequested()){
... ... @@ -169,6 +173,22 @@ void ProgramCopyWorker::workerMain(){
169 173 }
170 174 }
171 175 else{
  176 + sync();
  177 + foreach(QString strinfo, m_arrSrcFileList){
  178 + QString filepath = strinfo.left(strinfo.indexOf(',',0));
  179 + QString destfiledir = strinfo.right(strinfo.size() - (strinfo.indexOf(',',0)+1));
  180 + QDir destdir(destfiledir);
  181 + QFileInfo finfo(filepath);
  182 + srcFilepath = filepath;
  183 + destFilePath = QString("%1/%2.bak").arg(destfiledir).arg(finfo.fileName());
  184 + qDebug() << destFilePath;
  185 + if(QFile::exists(destFilePath)){
  186 + if(QFile(destFilePath).remove()==false){
  187 + qDebug() << destFilePath << "delete fail";
  188 + }
  189 + }
  190 + else qDebug() << "file not found error";
  191 + }
172 192 foreach(QString srcpath, m_arrSrcDirList){
173 193 qDebug() << "src dir : " << srcpath;
174 194 QDir srcdir(srcpath);
... ... @@ -548,7 +568,7 @@ void FileProcessDlg::programDownload(){
548 568 QString strSrcPath;
549 569  
550 570 if(FileProcessor::detectUSB(strDescPath)){
551   - worker.setDestPath(QString("%1").arg(strDescPath));
  571 + worker.setDestPath(QString("%1/prime").arg(strDescPath));
552 572 worker.addSrcDir("/prime/cookbook");
553 573 worker.moveToThread(&programCopyThd);
554 574  
... ... @@ -605,7 +625,7 @@ void FileProcessDlg::programUpload(){
605 625 //worker.addSrcFile(QString("%1/prime/falinux/superdaemon,/falinux").arg(strSrcPath));
606 626 //worker.addSrcFile(QString("%1/prime/falinux/superdaemon.ini,/falinux").arg(strSrcPath));
607 627 worker.setDestPath("/prime");
608   - worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"cookbook"));
  628 + worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"prime/cookbook"));
609 629 worker.moveToThread(&programCopyThd);
610 630  
611 631 connect(&programCopyThd,SIGNAL(started()), &worker, SLOT(workerMain()));
... ...