##// END OF EJS Templates
fixed some badly generated fields...
florianlink -
r118:94fe64ed981d
parent child
Show More
@@ -56,10 +56,14 void ShellHeaderGenerator::writeFieldAccessors(QTextStream &s, const AbstractMet
56 {
56 {
57 const AbstractMetaFunction *setter = field->setter();
57 const AbstractMetaFunction *setter = field->setter();
58 const AbstractMetaFunction *getter = field->getter();
58 const AbstractMetaFunction *getter = field->getter();
59
59
60 // Uuid data4 did not work
60 // static fields are not supported (yet?)
61 if (setter->isStatic()) return;
62
63 // Uuid data4 did not work (TODO: move to typesystem...(
61 if (field->enclosingClass()->name()=="QUuid" && setter->name()=="data4") return;
64 if (field->enclosingClass()->name()=="QUuid" && setter->name()=="data4") return;
62
65 if (field->enclosingClass()->name()=="QIPv6Address") return;
66
63 if (!field->type()->isConstant()) {
67 if (!field->type()->isConstant()) {
64 writeFunctionSignature(s, setter, 0, QString(),
68 writeFunctionSignature(s, setter, 0, QString(),
65 Option(ConvertReferenceToPtr | FirstArgIsWrappedObject| IncludeDefaultExpression | ShowStatic | UnderscoreSpaces));
69 Option(ConvertReferenceToPtr | FirstArgIsWrappedObject| IncludeDefaultExpression | ShowStatic | UnderscoreSpaces));
@@ -174,10 +174,13 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
174 if (fun->isAbstract()) {
174 if (fun->isAbstract()) {
175 if (fun->type()) {
175 if (fun->type()) {
176 // return empty default object
176 // return empty default object
177 writeTypeInfo(s, fun->type(), typeOptions);
177 s << "return ";
178 s << " result;" << endl;
178 if (fun->type()->indirections()>0) {
179 s << "return result";
179 s << "0;";
180 s << ";";
180 } else {
181 writeTypeInfo(s, fun->type(), typeOptions);
182 s << "();";
183 }
181 }
184 }
182 } else {
185 } else {
183 if (fun->type()) {
186 if (fun->type()) {
General Comments 0
You need to be logged in to leave comments. Login now