| 296 | } |
| 297 | |
| 298 | void PluginList::fixPrimaryPlugins() |
| 299 | { |
| 300 | if (!m_Organizer.settings().game().forceEnableCoreFiles()) { |
| 301 | return; |
| 302 | } |
| 303 | |
| 304 | // This function ensures that the primary plugins are first and in the correct order |
| 305 | QStringList primaryPlugins = m_Organizer.managedGame()->primaryPlugins(); |
| 306 | int prio = 0; |
| 307 | bool somethingChanged = false; |
| 308 | for (QString plugin : primaryPlugins) { |
| 309 | std::map<QString, int>::iterator iter = m_ESPsByName.find(plugin); |
| 310 | // Plugin is present? |
| 311 | if (iter != m_ESPsByName.end()) { |
| 312 | if (prio != m_ESPs[iter->second].priority) { |
| 313 | // Priority is wrong! Fix it! |
| 314 | int newPrio = prio; |
| 315 | setPluginPriority(iter->second, newPrio, true /* isForced */); |
| 316 | somethingChanged = true; |
| 317 | } |
| 318 | prio++; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | if (somethingChanged) { |
| 323 | writePluginsList(); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | void PluginList::fixPluginRelationships() |
| 328 | { |
nothing calls this directly
no test coverage detected