summaryrefslogtreecommitdiffstats
path: root/src/moc/moc_yacc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/moc/moc_yacc.cpp')
-rw-r--r--src/moc/moc_yacc.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp
index 2ab0be7..c5557df 100644
--- a/src/moc/moc_yacc.cpp
+++ b/src/moc/moc_yacc.cpp
@@ -5659,7 +5659,7 @@ void generateClass() // generate C++ source code for a class
{
const char *hdr1 = "/****************************************************************************\n"
"** %s meta object code from reading C++ file '%s'\n**\n";
- const char *hdr2 = "** Created: %s\n";
+ const char *hdr2 = "** Created by: The Qt Meta Object Compiler version %d (Qt %s)\n";
const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
const char *hdr4 = "*****************************************************************************/\n\n";
int i;
@@ -5689,8 +5689,6 @@ void generateClass() // generate C++ source code for a class
g->gen_count++;
if ( g->gen_count == 1 ) { // first class to be generated
- QDateTime dt = QDateTime::currentDateTime();
- QCString dstr = dt.toString().ascii();
QCString fn = g->fileName;
i = g->fileName.length()-1;
while ( i>0 && g->fileName[i-1] != '/' && g->fileName[i-1] != '\\' )
@@ -5698,7 +5696,7 @@ void generateClass() // generate C++ source code for a class
if ( i >= 0 )
fn = &g->fileName[i];
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
- fprintf( out, hdr2, (const char*)dstr );
+ fprintf( out, hdr2, formatRevision, QT_VERSION_STR );
fprintf( out, "%s", hdr3 );
fprintf( out, "%s", hdr4 );
@@ -6267,16 +6265,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);
}