diff options
Diffstat (limited to 'src/moc')
-rw-r--r-- | src/moc/moc.y | 10 | ||||
-rw-r--r-- | src/moc/moc_yacc.cpp | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/moc/moc.y b/src/moc/moc.y index 90f72ab..b117b68 100644 --- a/src/moc/moc.y +++ b/src/moc/moc.y @@ -3441,16 +3441,14 @@ void generateClass() // generate C++ source code for a class } if ( it.current()->getfunc ) { if ( it.current()->gspec == Property::Pointer ) - fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s()%s ); break;\n", + fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s() ); break;\n", it.current()->getfunc->name.data(), !isVariantType( it.current()->type ) ? "(int)" : "", - it.current()->getfunc->name.data(), - it.current()->type == "bool" ? ", 0" : "" ); + it.current()->getfunc->name.data()); else - fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s()%s ); break;\n", + fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s() ); break;\n", !isVariantType( it.current()->type ) ? "(int)" : "", - it.current()->getfunc->name.data(), - it.current()->type == "bool" ? ", 0" : "" ); + it.current()->getfunc->name.data()); } else if ( it.current()->override ) { flag_propagate |= 1<< (1+1); } diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp index 2ab0be7..8d48f86 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/moc/moc_yacc.cpp @@ -6267,16 +6267,14 @@ void generateClass() // generate C++ source code for a class } if ( it.current()->getfunc ) { if ( it.current()->gspec == Property::Pointer ) - fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s()%s ); break;\n", + fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s() ); break;\n", it.current()->getfunc->name.data(), !isVariantType( it.current()->type ) ? "(int)" : "", - it.current()->getfunc->name.data(), - it.current()->type == "bool" ? ", 0" : "" ); + it.current()->getfunc->name.data()); else - fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s()%s ); break;\n", + fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s() ); break;\n", !isVariantType( it.current()->type ) ? "(int)" : "", - it.current()->getfunc->name.data(), - it.current()->type == "bool" ? ", 0" : "" ); + it.current()->getfunc->name.data()); } else if ( it.current()->override ) { flag_propagate |= 1<< (1+1); } |