From 8db7241036daa72623b95cdaad4ad49531cd39d7 2010-02-22 12:12:53 From: florianlink Date: 2010-02-22 12:12:53 Subject: [PATCH] - putting classes without given package into "PythonQt.private" instead of into PythonQt directly. - added public accessor for PythonQt module git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@137 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/src/PythonQt.cpp b/src/PythonQt.cpp index c6fdef4..f6721a8 100644 --- a/src/PythonQt.cpp +++ b/src/PythonQt.cpp @@ -1146,7 +1146,7 @@ void PythonQtPrivate::registerCPPClass(const char* typeName, const char* parentT PyObject* PythonQtPrivate::packageByName(const char* name) { if (name==NULL || name[0]==0) { - return _pythonQtModule; + name = "private"; } PyObject* v = _packages.value(name); if (!v) { diff --git a/src/PythonQt.h b/src/PythonQt.h index 1f39302..1e98d92 100644 --- a/src/PythonQt.h +++ b/src/PythonQt.h @@ -479,6 +479,9 @@ public: //! called by virtual overloads when a python return value can not be converted to the required Qt type void handleVirtualOverloadReturnError(const char* signature, const PythonQtMethodInfo* methodInfo, PyObject* result); + //! get access to the PythonQt module + PythonQtObjectPtr pythonQtModule() const { return _pythonQtModule; } + private: //! Setup the shared library suffixes by getting them from the "imp" module. void setupSharedLibrarySuffixes();