| 167 | |
| 168 | |
| 169 | void PluginStartupRegistration::OnValidationFinished() |
| 170 | { |
| 171 | ++mCurrentPluginProviderIndex; |
| 172 | if(mValidProviderFound || |
| 173 | mPluginsToProcess[mCurrentPluginIndex].second.size() == mCurrentPluginProviderIndex) |
| 174 | { |
| 175 | if(!mFailedPluginsCache.empty()) |
| 176 | { |
| 177 | //we've tried all providers associated with same module path... |
| 178 | if(!mValidProviderFound) |
| 179 | { |
| 180 | //...but none of them succeeded |
| 181 | mFailedPluginsPaths.push_back(mFailedPluginsCache[0].GetPath()); |
| 182 | |
| 183 | //Same plugin path, but different providers, we need to register all of them |
| 184 | for(auto& desc : mFailedPluginsCache) |
| 185 | PluginManager::Get().RegisterPlugin(std::move(desc)); |
| 186 | } |
| 187 | //plugin type was detected, but plugin instance validation has failed |
| 188 | else |
| 189 | { |
| 190 | for(auto& desc : mFailedPluginsCache) |
| 191 | { |
| 192 | if(desc.GetPluginType() != PluginTypeStub) |
| 193 | mFailedPluginsPaths.push_back(desc.GetPath()); |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | ++mCurrentPluginIndex; |
| 198 | mCurrentPluginProviderIndex = 0; |
| 199 | mValidProviderFound = false; |
| 200 | mFailedPluginsCache.clear(); |
| 201 | } |
| 202 | ProcessNext(); |
| 203 | } |
| 204 | |
| 205 | const std::vector<wxString>& PluginStartupRegistration::GetFailedPluginsPaths() const noexcept |
| 206 | { |
no test coverage detected