diff options
author | Michele Calgaro <[email protected]> | 2019-05-27 00:31:56 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2019-05-27 00:31:56 +0900 |
commit | a2fa7ca9838e204ec41c39fcb80ee82ec93d084f (patch) | |
tree | 667608ea9bc8d1e4827077c1321ad6fa02bf8cc3 /src/moc | |
parent | 2c29133f7ee2a270da8d8504345390a1d60e80fa (diff) | |
download | qt3-a2fa7ca9838e204ec41c39fcb80ee82ec93d084f.tar.gz qt3-a2fa7ca9838e204ec41c39fcb80ee82ec93d084f.zip |
Adjusted to latest QVariant::QVariant(bool) function.
Signed-off-by: Michele Calgaro <[email protected]>
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); } |