##// 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 AbstractMetaArgumentList args = fun->arguments();
125 AbstractMetaArgumentList args = fun->arguments();
126
126
127 s << "if (_wrapper) {" << endl;
127 s << "if (_wrapper) {" << endl;
128 s << " PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, \"" << fun->name() << "\");" << endl;
128 s << " static PyObject* name = PyString_FromString(\"" << fun->name() << "\");" << endl;
129 s << " PyErr_Clear();" << endl;
129 s << " PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name);" << endl;
130 s << " if (obj && !PythonQtSlotFunction_Check(obj)) {" << endl;
130 s << " if (obj) {" << endl;
131 s << " static const char* argumentList[] ={\"";
131 s << " static const char* argumentList[] ={\"";
132 if (hasReturnValue) {
132 if (hasReturnValue) {
133 // write the arguments, return type first
133 // write the arguments, return type first
@@ -176,6 +176,8 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
176 } else {
176 } else {
177 s << " return;" << endl;
177 s << " return;" << endl;
178 }
178 }
179 s << " } else {" << endl;
180 s << " PyErr_Clear();" << endl;
179 s << " }" << endl;
181 s << " }" << endl;
180 s << "}" << endl;
182 s << "}" << endl;
181
183
General Comments 0
You need to be logged in to leave comments. Login now