@@ -304,13 +304,13 @@ void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
304
304
}
305
305
}
306
306
s << " (" ;
307
- if (scriptFunctionName.startsWith (" operator>>" )) {
307
+ if (scriptFunctionName.startsWith (" operator>>" ) && !fun-> wasProtected () ) {
308
308
s << wrappedObject << " >>" << args.at (0 )->argumentName ();
309
- } else if (scriptFunctionName.startsWith (" operator<<" )) {
309
+ } else if (scriptFunctionName.startsWith (" operator<<" ) && !fun-> wasProtected () ) {
310
310
s << wrappedObject << " <<" << args.at (0 )->argumentName ();
311
- } else if (scriptFunctionName.startsWith (" operator[]" )) {
311
+ } else if (scriptFunctionName.startsWith (" operator[]" ) && !fun-> wasProtected () ) {
312
312
s << wrappedObject << " [" << args.at (0 )->argumentName () << " ]" ;
313
- } else if (scriptFunctionName.startsWith (" operator" ) && args.size ()==1 ) {
313
+ } else if (scriptFunctionName.startsWith (" operator" ) && args.size ()==1 && !fun-> wasProtected () ) {
314
314
QString op = scriptFunctionName.mid (8 );
315
315
s << wrappedObject << op << " " << args.at (0 )->argumentName ();
316
316
} else {
@@ -328,7 +328,13 @@ void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
328
328
s << " theWrappedObject->" ;
329
329
}
330
330
}
331
- s << fun->originalName () << " (" ;
331
+ if (fun->wasProtected ()) {
332
+ // this is different e.g. for operators
333
+ s << fun->name () << " (" ;
334
+ }
335
+ else {
336
+ s << fun->originalName () << " (" ;
337
+ }
332
338
for (int i = 0 ; i < args.size (); ++i) {
333
339
if (i > 0 )
334
340
s << " , " ;
0 commit comments