| 287 | } |
| 288 | |
| 289 | void PluginStartupRegistration::ProcessNext() |
| 290 | { |
| 291 | if(mCurrentPluginIndex == mPluginsToProcess.size()) |
| 292 | { |
| 293 | Stop(); |
| 294 | return; |
| 295 | } |
| 296 | |
| 297 | try |
| 298 | { |
| 299 | if(auto dialog = static_cast<PluginScanDialog*>(mScanDialog.get())) |
| 300 | { |
| 301 | const auto progress = static_cast<float>(mCurrentPluginIndex) / static_cast<float>(mPluginsToProcess.size()); |
| 302 | dialog->UpdateProgress( |
| 303 | mPluginsToProcess[mCurrentPluginIndex].first, |
| 304 | progress); |
| 305 | } |
| 306 | if(!mValidator) |
| 307 | mValidator = std::make_unique<AsyncPluginValidator>(*this); |
| 308 | |
| 309 | mValidator->Validate( |
| 310 | mPluginsToProcess[mCurrentPluginIndex].second[mCurrentPluginProviderIndex], |
| 311 | mPluginsToProcess[mCurrentPluginIndex].first |
| 312 | ); |
| 313 | mRequestStartTime = std::chrono::system_clock::now(); |
| 314 | if(auto timer = mTimeoutTimer.get()) |
| 315 | timer->StartOnce(std::chrono::duration_cast<std::chrono::milliseconds>(mTimeout).count()); |
| 316 | } |
| 317 | catch(std::exception& e) |
| 318 | { |
| 319 | StopWithError(e.what()); |
| 320 | } |
| 321 | catch(...) |
| 322 | { |
| 323 | StopWithError("unknown error"); |
| 324 | } |
| 325 | } |
| 326 |
nothing calls this directly
no test coverage detected