PythonQtWrapper_QProcess.cpp
783 lines
| 27.4 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("atEnd", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("bytesAvailable", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("bytesToWrite", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("canReadLine", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QChildEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={""}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("isSequential", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "QIODevice::OpenMode"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("open", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("pos", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64" , "char*" , "qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("readData", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64" , "char*" , "qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("readLineData", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("reset", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("seek", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={""}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("size", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"" , "QTimerEvent*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
florianlink
|
r24 | 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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("waitForBytesWritten", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"bool" , "int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
bool returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("waitForReadyRead", methodInfo, result); | ||||
} else { | ||||
returnValue = *((bool*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"qint64" , "const char*" , "qint64"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | ||||
qint64 returnValue; | ||||
florianlink
|
r24 | 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) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("writeData", methodInfo, result); | ||||
} else { | ||||
returnValue = *((qint64*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
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
|
r73 | qint64 PythonQtWrapper_QProcess::bytesAvailable(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_bytesAvailable()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::closeReadChannel(QProcess* theWrappedObject, QProcess::ProcessChannel channel) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->closeReadChannel(channel)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setStandardInputFile(QProcess* theWrappedObject, const QString& fileName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setStandardInputFile(fileName)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::isSequential(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_isSequential()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QProcess::ProcessError PythonQtWrapper_QProcess::error(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->error()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QProcess::ProcessChannel PythonQtWrapper_QProcess::readChannel(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->readChannel()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | bool PythonQtWrapper_QProcess::static_QProcess_startDetached(const QString& program, const QStringList& arguments, const QString& workingDirectory, qint64* pid) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QProcess::startDetached(program, arguments, workingDirectory, pid)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::waitForFinished(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->waitForFinished(msecs)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QProcess::environment(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->environment()); | ||
florianlink
|
r24 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setStandardOutputProcess(QProcess* theWrappedObject, QProcess* destination) | ||
florianlink
|
r24 | { | ||
florianlink
|
r73 | ( theWrappedObject->setStandardOutputProcess(destination)); | ||
florianlink
|
r24 | } | ||
florianlink
|
r73 | QByteArray PythonQtWrapper_QProcess::readAllStandardError(QProcess* theWrappedObject) | ||
florianlink
|
r24 | { | ||
florianlink
|
r73 | return ( theWrappedObject->readAllStandardError()); | ||
florianlink
|
r24 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::start(QProcess* theWrappedObject, const QString& program, const QStringList& arguments, QIODevice::OpenMode mode) | ||
florianlink
|
r24 | { | ||
florianlink
|
r73 | ( theWrappedObject->start(program, arguments, mode)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | qint64 PythonQtWrapper_QProcess::readData(QProcess* theWrappedObject, char* data, qint64 maxlen) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_readData(data, maxlen)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QProcess::workingDirectory(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->workingDirectory()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::static_QProcess_startDetached(const QString& program) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QProcess::startDetached(program)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::waitForBytesWritten(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_waitForBytesWritten(msecs)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setStandardErrorFile(QProcess* theWrappedObject, const QString& fileName, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setStandardErrorFile(fileName, mode)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::waitForReadyRead(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_waitForReadyRead(msecs)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QProcess::exitCode(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->exitCode()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::waitForStarted(QProcess* theWrappedObject, int msecs) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->waitForStarted(msecs)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QProcess::static_QProcess_execute(const QString& program, const QStringList& arguments) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QProcess::execute(program, arguments)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::static_QProcess_startDetached(const QString& program, const QStringList& arguments) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QProcess::startDetached(program, arguments)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QProcess::static_QProcess_execute(const QString& program) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QProcess::execute(program)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::start(QProcess* theWrappedObject, const QString& program, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->start(program, mode)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setProcessChannelMode(QProcess* theWrappedObject, QProcess::ProcessChannelMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setProcessChannelMode(mode)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::close(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_close()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QProcess::static_QProcess_systemEnvironment() | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QProcess::systemEnvironment()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setupChildProcess(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_setupChildProcess()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setReadChannel(QProcess* theWrappedObject, QProcess::ProcessChannel channel) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setReadChannel(channel)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QProcess::ProcessState PythonQtWrapper_QProcess::state(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->state()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::canReadLine(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_canReadLine()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::closeWriteChannel(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->closeWriteChannel()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QProcess::ProcessChannelMode PythonQtWrapper_QProcess::processChannelMode(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->processChannelMode()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setStandardOutputFile(QProcess* theWrappedObject, const QString& fileName, QIODevice::OpenMode mode) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setStandardOutputFile(fileName, mode)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QProcess::atEnd(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_atEnd()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QProcess::ExitStatus PythonQtWrapper_QProcess::exitStatus(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->exitStatus()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QByteArray PythonQtWrapper_QProcess::readAllStandardOutput(QProcess* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->readAllStandardOutput()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | qint64 PythonQtWrapper_QProcess::writeData(QProcess* theWrappedObject, const char* data, qint64 len) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_writeData(data, len)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setEnvironment(QProcess* theWrappedObject, const QStringList& environment) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setEnvironment(environment)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | qint64 PythonQtWrapper_QProcess::bytesToWrite(QProcess* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QProcess*)theWrappedObject)->promoted_bytesToWrite()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QProcess::setWorkingDirectory(QProcess* theWrappedObject, const QString& dir) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setWorkingDirectory(dir)); | ||
florianlink
|
r13 | } | ||