MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / loadPySideModule

Function loadPySideModule

src/Gui/PythonWrapper.cpp:312–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310static bool loadPySideModule(const std::string& moduleName, Shiboken::Module::TypeInitStruct*& types)
311#else
312static bool loadPySideModule(const std::string& moduleName, PyTypeObject**& types)
313#endif
314{
315#if defined(HAVE_SHIBOKEN) && defined(HAVE_PYSIDE)
316 if (!types) {
317 Shiboken::AutoDecRef requiredModule(
318 Shiboken::Module::import(getPySideModuleName(moduleName).c_str())
319 );
320 if (requiredModule.isNull()) {
321 return false;
322 }
323 types = Shiboken::Module::getTypes(requiredModule);
324 }
325#else
326 Q_UNUSED(moduleName)
327 Q_UNUSED(types)
328#endif
329 return true;
330}
331
332#if defined(HAVE_SHIBOKEN) && defined(HAVE_PYSIDE)
333# if defined(HAVE_SHIBOKEN2)

Callers 5

loadCoreModuleMethod · 0.85
loadGuiModuleMethod · 0.85
loadWidgetsModuleMethod · 0.85
loadUiToolsModuleMethod · 0.85

Calls 3

getPySideModuleNameFunction · 0.85
c_strMethod · 0.45
isNullMethod · 0.45

Tested by

no test coverage detected