77
88static Q_LOGGING_CATEGORY (log, " BackendThread" )
99
10- CBackendThread::CBackendThread(COperate *pOperate, bool bSingle )
10+ CBackendThread::CBackendThread(COperate *pOperate, bool bFinishedSignal )
1111 // Note that the parent object pointer cannot be set here.
1212 // If set the parent, the object is also deleted
1313 // when the parent object (CConnecterThread) is destroyed.
1414 // Because it is deleted when it is finished.
1515 : QThread()
1616 , m_pOperate(pOperate)
1717 , m_pBackend(nullptr )
18- , m_bSignal(bSingle )
18+ , m_bFinishedSignal(bFinishedSignal )
1919{
2020 qDebug (log) << Q_FUNC_INFO;
2121 bool check = false ;
@@ -79,7 +79,7 @@ void CBackendThread::run()
7979 if (!m_pBackend || !bRet)
8080 {
8181 qCritical (log) << " InstanceBackend fail" ;
82- if (m_bSignal ) {
82+ if (m_bFinishedSignal ) {
8383 emit m_pOperate->sigStop ();
8484 emit m_pOperate->sigFinished ();
8585 }
@@ -93,7 +93,7 @@ void CBackendThread::run()
9393 m_pBackend->Stop ();
9494 m_pBackend->deleteLater ();
9595 m_pBackend = nullptr ;
96- if (m_bSignal ) {
96+ if (m_bFinishedSignal ) {
9797 emit m_pOperate->sigStop ();
9898 emit m_pOperate->sigFinished ();
9999 }
@@ -108,7 +108,7 @@ void CBackendThread::run()
108108 m_pBackend->deleteLater ();
109109 }
110110
111- if (m_bSignal )
111+ if (m_bFinishedSignal )
112112 emit m_pOperate->sigFinished ();
113113
114114 qDebug (log) << Q_FUNC_INFO << " end" ;
0 commit comments