##// END OF EJS Templates
added methods to qt namespace...
added methods to qt namespace git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@71 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r28:cf202027b50b
r35:b8dce620ba5c
Show More
PythonQtWrapper_QRunnable.cpp
39 lines | 1.1 KiB | text/x-c | CppLexer
#include "PythonQtWrapper_QRunnable.h"
#include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
#include <QVariant>
void PythonQtShell_QRunnable::run()
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "run");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QRunnable::staticMetaObject,
"run(QRunnable*)");
void* args[1] = {NULL};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return;
}
}
}
QRunnable* PythonQtWrapper_QRunnable::new_QRunnable()
{
return new PythonQtShell_QRunnable(); }
bool PythonQtWrapper_QRunnable::autoDelete(QRunnable* theWrappedObject) const
{
return theWrappedObject->autoDelete();
}
void PythonQtWrapper_QRunnable::setAutoDelete(QRunnable* theWrappedObject, bool _autoDelete)
{
theWrappedObject->setAutoDelete(_autoDelete);
}