mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Don't use SWIG_BUILTIN_INIT for passing SWIG ptrs, use SWIG_POINTER_OWN
* The former is only needed inside tp_init of a new object. Instead when we want to pass in and own a pointer, we use SWIG_POINTER_OWN. * This also removes the need to pass 'self' all the way down in ConvertToPy which tidies up a lot of code.
This commit is contained in:
@@ -71,7 +71,7 @@ public:
|
||||
const char *typeName = typeid(*const_cast<QtObjectType *>(object)).name();
|
||||
|
||||
// forward non-template part on
|
||||
PyObject *obj = QtObjectToPython(NULL, typeName, object);
|
||||
PyObject *obj = QtObjectToPython(typeName, object);
|
||||
|
||||
if(obj)
|
||||
setPyGlobal(varName, obj);
|
||||
@@ -82,10 +82,7 @@ public:
|
||||
-1, {});
|
||||
}
|
||||
|
||||
static PyObject *QWidgetToPy(PyObject *self, QWidget *widget)
|
||||
{
|
||||
return QtObjectToPython(self, "QWidget", widget);
|
||||
}
|
||||
static PyObject *QWidgetToPy(QWidget *widget) { return QtObjectToPython("QWidget", widget); }
|
||||
static QWidget *QWidgetFromPy(PyObject *widget);
|
||||
|
||||
void setThreadBlocking(bool block) { m_Block = block; }
|
||||
@@ -131,7 +128,7 @@ private:
|
||||
|
||||
bool m_Block = false;
|
||||
|
||||
static PyObject *QtObjectToPython(PyObject *self, const char *typeName, QObject *object);
|
||||
static PyObject *QtObjectToPython(const char *typeName, QObject *object);
|
||||
|
||||
QTimer *outputTicker;
|
||||
QMutex outputMutex;
|
||||
|
||||
Reference in New Issue
Block a user