PythonQtWrapper_QProcess.cpp
737 lines
| 25.3 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QProcess.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qprocess.h> | ||||
#include <qstringlist.h> | ||||
florianlink
|
r24 | bool PythonQtShell_QProcess::atEnd() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "atEnd"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"atEnd(QProcess*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::atEnd(); | ||||
} | ||||
qint64 PythonQtShell_QProcess::bytesAvailable() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "bytesAvailable"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"bytesAvailable(QProcess*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::bytesAvailable(); | ||||
} | ||||
qint64 PythonQtShell_QProcess::bytesToWrite() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "bytesToWrite"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"bytesToWrite(QProcess*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::bytesToWrite(); | ||||
} | ||||
bool PythonQtShell_QProcess::canReadLine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "canReadLine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"canReadLine(QProcess*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::canReadLine(); | ||||
} | ||||
void PythonQtShell_QProcess::childEvent(QChildEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"childEvent(QProcess*,QChildEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QProcess::childEvent(arg__1); | ||||
} | ||||
void PythonQtShell_QProcess::close() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "close"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"close(QProcess*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QProcess::close(); | ||||
} | ||||
void PythonQtShell_QProcess::customEvent(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"customEvent(QProcess*,QEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QProcess::customEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QProcess::event(QEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"event(QProcess*,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::event(arg__1); | ||||
} | ||||
bool PythonQtShell_QProcess::eventFilter(QObject* arg__1, QEvent* arg__2) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"eventFilter(QProcess*,QObject* ,QEvent* )"); | ||||
bool returnValue; | ||||
void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::eventFilter(arg__1, arg__2); | ||||
} | ||||
bool PythonQtShell_QProcess::isSequential() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isSequential"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"isSequential(QProcess*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::isSequential(); | ||||
} | ||||
bool PythonQtShell_QProcess::open(QIODevice::OpenMode mode) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "open"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"open(QProcess*,QIODevice::OpenMode )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&mode}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::open(mode); | ||||
} | ||||
qint64 PythonQtShell_QProcess::pos() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "pos"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"pos(QProcess*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::pos(); | ||||
} | ||||
qint64 PythonQtShell_QProcess::readData(char* data, qint64 maxlen) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "readData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"readData(QProcess*,char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&maxlen}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::readData(data, maxlen); | ||||
} | ||||
qint64 PythonQtShell_QProcess::readLineData(char* data, qint64 maxlen) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "readLineData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"readLineData(QProcess*,char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&maxlen}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::readLineData(data, maxlen); | ||||
} | ||||
bool PythonQtShell_QProcess::reset() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "reset"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"reset(QProcess*)"); | ||||
bool returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::reset(); | ||||
} | ||||
bool PythonQtShell_QProcess::seek(qint64 pos) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "seek"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"seek(QProcess*,qint64 )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&pos}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::seek(pos); | ||||
} | ||||
void PythonQtShell_QProcess::setupChildProcess() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setupChildProcess"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"setupChildProcess(QProcess*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QProcess::setupChildProcess(); | ||||
} | ||||
qint64 PythonQtShell_QProcess::size() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "size"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"size(QProcess*)"); | ||||
qint64 returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::size(); | ||||
} | ||||
void PythonQtShell_QProcess::timerEvent(QTimerEvent* arg__1) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"timerEvent(QProcess*,QTimerEvent* )"); | ||||
void* args[2] = {NULL, (void*)&arg__1}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QProcess::timerEvent(arg__1); | ||||
} | ||||
bool PythonQtShell_QProcess::waitForBytesWritten(int msecs) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "waitForBytesWritten"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"waitForBytesWritten(QProcess*,int )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&msecs}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::waitForBytesWritten(msecs); | ||||
} | ||||
bool PythonQtShell_QProcess::waitForReadyRead(int msecs) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "waitForReadyRead"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"waitForReadyRead(QProcess*,int )"); | ||||
bool returnValue; | ||||
void* args[2] = {NULL, (void*)&msecs}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((bool *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::waitForReadyRead(msecs); | ||||
} | ||||
qint64 PythonQtShell_QProcess::writeData(const char* data, qint64 len) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "writeData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QProcess::staticMetaObject, | ||||
"writeData(QProcess*,const char* ,qint64 )"); | ||||
qint64 returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&len}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((qint64 *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QProcess::writeData(data, len); | ||||
} | ||||
florianlink
|
r13 | QProcess* PythonQtWrapper_QProcess::new_QProcess(QObject* parent) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QProcess(parent); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setStandardInputFile(QProcess* theWrappedObject, const QString& fileName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setStandardInputFile(fileName); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QProcess::exitCode(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->exitCode(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::waitForBytesWritten(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_waitForBytesWritten(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setStandardOutputProcess(QProcess* theWrappedObject, QProcess* destination) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setStandardOutputProcess(destination); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::static_QProcess_startDetached(const QString& program, const QStringList& arguments) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QProcess::startDetached(program, arguments); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QProcess::workingDirectory(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->workingDirectory(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::static_QProcess_startDetached(const QString& program, const QStringList& arguments, const QString& workingDirectory, qint64* pid) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QProcess::startDetached(program, arguments, workingDirectory, pid); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::start(QProcess* theWrappedObject, const QString& program, const QStringList& arguments, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->start(program, arguments, mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::static_QProcess_startDetached(const QString& program) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QProcess::startDetached(program); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::close(QProcess* theWrappedObject) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_close(); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setWorkingDirectory(QProcess* theWrappedObject, const QString& dir) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | theWrappedObject->setWorkingDirectory(dir); | ||
florianlink
|
r24 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::isSequential(QProcess* theWrappedObject) const | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_isSequential(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::waitForReadyRead(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_waitForReadyRead(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QProcess::readData(QProcess* theWrappedObject, char* data, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_readData(data, maxlen); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QByteArray PythonQtWrapper_QProcess::readAllStandardError(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->readAllStandardError(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QProcess::ProcessState PythonQtWrapper_QProcess::state(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->state(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QProcess::static_QProcess_execute(const QString& program, const QStringList& arguments) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QProcess::execute(program, arguments); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setEnvironment(QProcess* theWrappedObject, const QStringList& environment) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setEnvironment(environment); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | int PythonQtWrapper_QProcess::static_QProcess_execute(const QString& program) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QProcess::execute(program); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setProcessChannelMode(QProcess* theWrappedObject, QProcess::ProcessChannelMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setProcessChannelMode(mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QProcess::writeData(QProcess* theWrappedObject, const char* data, qint64 len) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_writeData(data, len); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setReadChannel(QProcess* theWrappedObject, QProcess::ProcessChannel channel) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setReadChannel(channel); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setupChildProcess(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_setupChildProcess(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QByteArray PythonQtWrapper_QProcess::readAllStandardOutput(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->readAllStandardOutput(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::start(QProcess* theWrappedObject, const QString& program, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->start(program, mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::waitForFinished(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->waitForFinished(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::waitForStarted(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->waitForStarted(msecs); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QProcess::ExitStatus PythonQtWrapper_QProcess::exitStatus(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->exitStatus(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QStringList PythonQtWrapper_QProcess::static_QProcess_systemEnvironment() | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return QProcess::systemEnvironment(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QProcess::ProcessChannel PythonQtWrapper_QProcess::readChannel(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->readChannel(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::closeWriteChannel(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->closeWriteChannel(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QProcess::ProcessChannelMode PythonQtWrapper_QProcess::processChannelMode(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->processChannelMode(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setStandardErrorFile(QProcess* theWrappedObject, const QString& fileName, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setStandardErrorFile(fileName, mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QProcess::ProcessError PythonQtWrapper_QProcess::error(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->error(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::closeReadChannel(QProcess* theWrappedObject, QProcess::ProcessChannel channel) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->closeReadChannel(channel); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QProcess::setStandardOutputFile(QProcess* theWrappedObject, const QString& fileName, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | theWrappedObject->setStandardOutputFile(fileName, mode); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QStringList PythonQtWrapper_QProcess::environment(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return theWrappedObject->environment(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::canReadLine(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_canReadLine(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::atEnd(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_atEnd(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QProcess::bytesToWrite(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_bytesToWrite(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QProcess::bytesAvailable(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_bytesAvailable(); | ||
florianlink
|
r13 | } | ||