diff --git a/src/PythonQt.cpp b/src/PythonQt.cpp index 117c492..e7e0509 100644 --- a/src/PythonQt.cpp +++ b/src/PythonQt.cpp @@ -1294,6 +1294,16 @@ void PythonQt::clearNotFoundCachedMembers() } } +void PythonQt::removeWrapperFactory( PythonQtCppWrapperFactory* factory ) +{ + _p->_cppWrapperFactories.removeAll(factory); +} + +void PythonQt::removeWrapperFactory( PythonQtForeignWrapperFactory* factory ) +{ + _p->_foreignWrapperFactories.removeAll(factory); +} + void PythonQtPrivate::removeWrapperPointer(void* obj) { _wrappedObjects.remove(obj); diff --git a/src/PythonQt.h b/src/PythonQt.h index 35d780d..63cbbb7 100644 --- a/src/PythonQt.h +++ b/src/PythonQt.h @@ -413,6 +413,12 @@ public: //! add the given factory to PythonQt (ownership stays with caller) void addWrapperFactory(PythonQtForeignWrapperFactory* factory); + //! remove the wrapper factory + void removeWrapperFactory(PythonQtCppWrapperFactory* factory); + + //! remove the wrapper factory + void removeWrapperFactory(PythonQtForeignWrapperFactory* factory); + //@} //--------------------------------------------------------------------------- diff --git a/src/PythonQtCppWrapperFactory.h b/src/PythonQtCppWrapperFactory.h index c83b227..e4bf201 100644 --- a/src/PythonQtCppWrapperFactory.h +++ b/src/PythonQtCppWrapperFactory.h @@ -42,6 +42,12 @@ */ //---------------------------------------------------------------------------------- +#include "PythonQtPythonInclude.h" + +#include "PythonQtSystem.h" +#include +#include + //! Factory interface for C++ classes that can be wrapped by QObject objects /*! To create your own factory, derive PythonQtCppWrapperFactory and implement the create() method.