| 1596 | |
| 1597 | template <typename PLUGIN> |
| 1598 | void |
| 1599 | AppManager::registerBuiltInPlugin(const QString& iconPath, |
| 1600 | bool isDeprecated, |
| 1601 | bool internalUseOnly) |
| 1602 | { |
| 1603 | EffectInstPtr node( PLUGIN::BuildEffect( NodePtr() ) ); |
| 1604 | std::map<std::string, void (*)()> functions; |
| 1605 | |
| 1606 | functions.insert( std::make_pair("BuildEffect", ( void (*)() ) & PLUGIN::BuildEffect) ); |
| 1607 | LibraryBinary *binary = new LibraryBinary(functions); |
| 1608 | assert(binary); |
| 1609 | |
| 1610 | std::list<std::string> grouping; |
| 1611 | node->getPluginGrouping(&grouping); |
| 1612 | QStringList qgrouping; |
| 1613 | |
| 1614 | for (std::list<std::string>::iterator it = grouping.begin(); it != grouping.end(); ++it) { |
| 1615 | qgrouping.push_back( QString::fromUtf8( it->c_str() ) ); |
| 1616 | } |
| 1617 | |
| 1618 | // Empty since statically bundled |
| 1619 | QString resourcesPath = QString(); |
| 1620 | Plugin* p = registerPlugin(resourcesPath, qgrouping, QString::fromUtf8( node->getPluginID().c_str() ), QString::fromUtf8( node->getPluginLabel().c_str() ), |
| 1621 | iconPath, QStringList(), node->isReader(), node->isWriter(), binary, node->renderThreadSafety() == eRenderSafetyUnsafe, node->getMajorVersion(), node->getMinorVersion(), isDeprecated); |
| 1622 | std::list<PluginActionShortcut> shortcuts; |
| 1623 | node->getPluginShortcuts(&shortcuts); |
| 1624 | p->setShorcuts(shortcuts); |
| 1625 | |
| 1626 | PluginOpenGLRenderSupport glSupport = node->supportsOpenGLRender(); |
| 1627 | p->setOpenGLRenderSupport(glSupport); |
| 1628 | |
| 1629 | if (internalUseOnly) { |
| 1630 | p->setForInternalUseOnly(true); |
| 1631 | } |
| 1632 | } |
| 1633 | |
| 1634 | void |
| 1635 | AppManager::loadBuiltinNodePlugins(IOPluginsMap* /*readersMap*/, |
nothing calls this directly
no test coverage detected