aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/pythonextensions/pyutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pythonextensions/pyutil.cpp')
-rw-r--r--plugins/pythonextensions/pyutil.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/pythonextensions/pyutil.cpp b/plugins/pythonextensions/pyutil.cpp
index b563c55..b992e36 100644
--- a/plugins/pythonextensions/pyutil.cpp
+++ b/plugins/pythonextensions/pyutil.cpp
@@ -56,10 +56,10 @@ extern "C" void initQtCreator();
// These variables store all Python types exported by QtCreators bindings,
// as well as the types exported for QtWidgets.
-extern PyTypeObject **SbkPythonExtension_QtCreatorTypes;
+extern PyTypeObject **SbkQtCreatorTypes;
// This variable stores the Python module generated by Shiboken
-extern PyObject *SbkPythonExtension_QtCreatorModuleObject;
+extern PyObject *SbkQtCreatorModuleObject;
namespace PyUtil {
@@ -157,7 +157,7 @@ bool bindObject(const QString &moduleName, const QString &name, int index, void
return false;
// Generate the type
- PyTypeObject *typeObject = SbkPythonExtension_QtCreatorTypes[index];
+ PyTypeObject *typeObject = SbkQtCreatorTypes[index];
PyObject *po = Shiboken::Conversions::pointerToPython(reinterpret_cast<SbkObjectType *>(typeObject), o);
if (!po) {
@@ -169,9 +169,10 @@ bool bindObject(const QString &moduleName, const QString &name, int index, void
return bindPyObject(moduleName, name, po);
}
-bool bindShibokenModuleObject(const QString &moduleName, const QString &name)
+bool bindCoreModules()
{
- return bindPyObject(moduleName, name, SbkPythonExtension_QtCreatorModuleObject);
+ return bindSubPyObject("QtCreator", "Utils", SbkQtCreatorModuleObject)
+ && bindSubPyObject("QtCreator", "Core", SbkQtCreatorModuleObject);
}
bool bindPyObject(const QString &moduleName, const QString &name, void *obj)