| 17 | } |
| 18 | |
| 19 | void CServiceThread::run() |
| 20 | { |
| 21 | CService* pService = m_pPlugin->NewService(); |
| 22 | if(!pService) |
| 23 | { |
| 24 | qCritical(Service) << "GetService fail"; |
| 25 | return; |
| 26 | } |
| 27 | qInfo(Service) << "The service" << m_pPlugin->Name() << "is start"; |
| 28 | |
| 29 | int nRet = pService->Init(); |
| 30 | if(nRet) |
| 31 | { |
| 32 | qWarning(Service) << "The service" << m_pPlugin->Name() << "initial fail"; |
| 33 | return; |
| 34 | } |
| 35 | |
| 36 | exec(); |
| 37 | |
| 38 | qInfo(Service) << "The service" << m_pPlugin->Name() << "is stop"; |
| 39 | |
| 40 | pService->Clean(); |
| 41 | pService->deleteLater(); |
| 42 | } |
nothing calls this directly
no test coverage detected