| 316 | } |
| 317 | |
| 318 | IProjectFileManager* fetchFileManager(const KConfigGroup& projectGroup) |
| 319 | { |
| 320 | if (manager) |
| 321 | { |
| 322 | auto* iface = manager->extension<KDevelop::IProjectFileManager>(); |
| 323 | Q_ASSERT(iface); |
| 324 | return iface; |
| 325 | } |
| 326 | |
| 327 | // helper method for open() |
| 328 | QString managerSetting = projectGroup.readEntry( "Manager", "KDevGenericManager" ); |
| 329 | |
| 330 | //Get our importer |
| 331 | IPluginController* pluginManager = Core::self()->pluginController(); |
| 332 | manager = pluginManager->pluginForExtension( QStringLiteral("org.kdevelop.IProjectFileManager"), managerSetting ); |
| 333 | IProjectFileManager* iface = nullptr; |
| 334 | if ( manager ) |
| 335 | iface = manager->extension<IProjectFileManager>(); |
| 336 | else |
| 337 | { |
| 338 | const QString messageText = |
| 339 | i18n("Could not load project management plugin <b>%1</b>.<br>Check that the required programs are installed," |
| 340 | " or see console output for more information.", managerSetting); |
| 341 | auto* message = new Sublime::Message(messageText, Sublime::Message::Error); |
| 342 | ICore::self()->uiController()->postMessage(message); |
| 343 | manager = nullptr; |
| 344 | return nullptr; |
| 345 | } |
| 346 | if (iface == nullptr) |
| 347 | { |
| 348 | const QString messageText = |
| 349 | i18n("The project importing plugin (%1) does not support the IProjectFileManager interface.", managerSetting); |
| 350 | auto* message = new Sublime::Message(messageText, Sublime::Message::Error); |
| 351 | ICore::self()->uiController()->postMessage(message); |
| 352 | delete manager; |
| 353 | manager = nullptr; |
| 354 | } |
| 355 | return iface; |
| 356 | } |
| 357 | |
| 358 | void loadVersionControlPlugin(KConfigGroup& projectGroup) |
| 359 | { |
no test coverage detected