##// END OF EJS Templates
improved code generation for virtual functions to support overriding getter slots that are named as properties...
florianlink -
r199:1f55453df6ee
parent child
Show More
@@ -125,9 +125,9 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
125 125 AbstractMetaArgumentList args = fun->arguments();
126 126
127 127 s << "if (_wrapper) {" << endl;
128 s << " PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, \"" << fun->name() << "\");" << endl;
129 s << " PyErr_Clear();" << endl;
130 s << " if (obj && !PythonQtSlotFunction_Check(obj)) {" << endl;
128 s << " static PyObject* name = PyString_FromString(\"" << fun->name() << "\");" << endl;
129 s << " PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name);" << endl;
130 s << " if (obj) {" << endl;
131 131 s << " static const char* argumentList[] ={\"";
132 132 if (hasReturnValue) {
133 133 // write the arguments, return type first
@@ -176,6 +176,8 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
176 176 } else {
177 177 s << " return;" << endl;
178 178 }
179 s << " } else {" << endl;
180 s << " PyErr_Clear();" << endl;
179 181 s << " }" << endl;
180 182 s << "}" << endl;
181 183
General Comments 0
You need to be logged in to leave comments. Login now