diff --git a/app/scanner2/mainwindow.cpp b/app/scanner2/mainwindow.cpp index 63708501..8848dd68 100644 --- a/app/scanner2/mainwindow.cpp +++ b/app/scanner2/mainwindow.cpp @@ -1935,7 +1935,13 @@ askIfClear MainWindow::startScanMessageBox(QWidget *parent) return cancelScan; else if (box.clickedButton() == clearBtn) { - on_act_closeAll_triggered(); + auto_save_info_.index = 0; + auto_save_info_.path = ""; + + startSaveMessageBox(this); + m_thumb->removeAllItems(HGImgThumb::ThumbRemoveFlag_NULL); + m_curBatchFileList.clear(); + return clearAndScan; } return notClearAndScan; @@ -4309,56 +4315,6 @@ void MainWindow::ocrMsgPumpFunc(HGMsgPump msgPump, const HGMsg *msg, HGPointer p { QString *filePath = (QString *)msg->data; -#if 0 - HGChar moduleName[256]; - HGBase_GetModuleName(nullptr, moduleName, 256); - HGChar curPath2[256]; - HGBase_GetFilePath(moduleName, curPath2, 256); - QString curPath(curPath2); - - QProcess proc; - QStringList argList; - argList.push_back(QString("-filePath=%1").arg(*filePath)); - -#if defined(HG_CMP_MSC) - #if defined(OEM_HANWANG) - proc.startDetached(curPath + "HwOCR.exe", argList); - #elif defined(OEM_LISICHENG) - proc.startDetached(curPath + "LscOCR.exe", argList); - #elif defined(OEM_CANGTIAN) - proc.startDetached(curPath + "CtsOCR.exe", argList); - #elif defined(OEM_ZHONGJING) - proc.startDetached(curPath + "ZjOCR.exe", argList); - #elif defined(OEM_ZIGUANG) - proc.startDetached(curPath + "ZgOCR.exe", argList); - #elif defined(OEM_NEUTRAL) - proc.startDetached(curPath + "NeuOCR.exe", argList); - #elif defined(OEM_DELI) - proc.startDetached(curPath + "DlOCR.exe", argList); - #else - proc.startDetached(curPath + "HGOCR.exe", argList); - #endif -#else - #if defined(OEM_HANWANG) - proc.startDetached(curPath + "HwOCR", argList); - #elif defined(OEM_LISICHENG) - proc.startDetached(curPath + "LscOCR", argList); - #elif defined(OEM_CANGTIAN) - proc.startDetached(curPath + "CtsOCR", argList); - #elif defined(OEM_ZHONGJING) - proc.startDetached(curPath + "ZjOCR", argList); - #elif defined(OEM_ZIGUANG) - proc.startDetached(curPath + "ZgOCR", argList); - #elif defined(OEM_NEUTRAL) - proc.startDetached(curPath + "NeuOCR", argList); - #elif defined(OEM_DELI) - proc.startDetached(curPath + "DlOCR", argList); - #else - proc.startDetached(curPath + "HGOCR", argList); - #endif -#endif - -#else HGOCRMgr ocrMgr = NULL; HGImgProc_CreateOCRMgr(HGIMGPROC_OCRALGO_DEFAULT, &ocrMgr); if (NULL != ocrMgr) @@ -4383,14 +4339,12 @@ void MainWindow::ocrMsgPumpFunc(HGMsgPump msgPump, const HGMsg *msg, HGPointer p HGImgFmt_CloseImageReader(reader); } - HGBase_DeleteFile(filePath->toLocal8Bit().toStdString().c_str()); + //HGBase_DeleteFile(filePath->toLocal8Bit().toStdString().c_str()); HGImgProc_ImageListOCRToFile(ocrMgr, 0, filePath->toLocal8Bit().toStdString().c_str(), NULL, NULL); HGImgProc_DestroyOCRMgr(ocrMgr); } -#endif - delete filePath; } }