| 1510 | |
| 1511 | template <typename PLUGIN> |
| 1512 | void |
| 1513 | AppManager::registerBuiltInPlugin(const QString& iconPath, |
| 1514 | bool isDeprecated, |
| 1515 | bool internalUseOnly) |
| 1516 | { |
| 1517 | EffectInstancePtr node( PLUGIN::BuildEffect( NodePtr() ) ); |
| 1518 | std::map<std::string, void (*)()> functions; |
| 1519 | |
| 1520 | functions.insert( std::make_pair("BuildEffect", ( void (*)() ) & PLUGIN::BuildEffect) ); |
| 1521 | LibraryBinary *binary = new LibraryBinary(functions); |
| 1522 | assert(binary); |
| 1523 | |
| 1524 | std::list<std::string> grouping; |
| 1525 | node->getPluginGrouping(&grouping); |
| 1526 | QStringList qgrouping; |
| 1527 | |
| 1528 | for (std::list<std::string>::iterator it = grouping.begin(); it != grouping.end(); ++it) { |
| 1529 | qgrouping.push_back( QString::fromUtf8( it->c_str() ) ); |
| 1530 | } |
| 1531 | |
| 1532 | // Empty since statically bundled |
| 1533 | QString resourcesPath = QString(); |
| 1534 | Plugin* p = registerPlugin(resourcesPath, qgrouping, QString::fromUtf8( node->getPluginID().c_str() ), QString::fromUtf8( node->getPluginLabel().c_str() ), |
| 1535 | iconPath, QStringList(), node->isReader(), node->isWriter(), binary, node->renderThreadSafety() == eRenderSafetyUnsafe, node->getMajorVersion(), node->getMinorVersion(), isDeprecated); |
| 1536 | std::list<PluginActionShortcut> shortcuts; |
| 1537 | node->getPluginShortcuts(&shortcuts); |
| 1538 | p->setShorcuts(shortcuts); |
| 1539 | |
| 1540 | PluginOpenGLRenderSupport glSupport = node->supportsOpenGLRender(); |
| 1541 | p->setOpenGLRenderSupport(glSupport); |
| 1542 | |
| 1543 | if (internalUseOnly) { |
| 1544 | p->setForInternalUseOnly(true); |
| 1545 | } |
| 1546 | } |
| 1547 | |
| 1548 | void |
| 1549 | AppManager::loadBuiltinNodePlugins(IOPluginsMap* /*readersMap*/, |
nothing calls this directly
no test coverage detected