diff --git a/CrawlerList/smanage.cpp b/CrawlerList/smanage.cpp index 566c908..68b766a 100644 --- a/CrawlerList/smanage.cpp +++ b/CrawlerList/smanage.cpp @@ -150,7 +150,16 @@ void SManage::WaitExitProcess() { if (m_pro[i].state() == QProcess::Running) m_pro[i].kill(); + //m_pro[i].terminate(); } bQuit = UseProcess(); } } + +void SManage::clossProcess() +{ + for(int i = 0; i < C_PROCESS_MAX; i++) + { + m_pro[i].close(); + } +} diff --git a/CrawlerList/smanage.h b/CrawlerList/smanage.h index 36c2db5..9e46f2d 100644 --- a/CrawlerList/smanage.h +++ b/CrawlerList/smanage.h @@ -25,6 +25,7 @@ public: void SetParent(Widget *pWidget); void WaitExitProcess(); virtual bool Update() = 0; + void clossProcess(); protected: virtual void Start() = 0; QString EncodetoUtf8(QString _str,bool _bExt=false); diff --git a/CrawlerList/widget.cpp b/CrawlerList/widget.cpp index a6f278d..411e309 100644 --- a/CrawlerList/widget.cpp +++ b/CrawlerList/widget.cpp @@ -244,6 +244,11 @@ void Widget::StopButton() m_nMode = E_MODE_WAIT; SetCrawlingState("Stop"); m_strCrawlingID.clear(); + //qDebug() << m_nPlatform; + if(m_nPlatform == 4) + { + m_pManage[m_nPlatform]->clossProcess(); + } } void Widget::Update()