@ -230,7 +230,7 @@ sub preParseClass
my ( $ classNode ) = @ _ ;
my ( $ classNode ) = @ _ ;
my $ className = join ( "::" , kdocAstUtil:: heritage ( $ classNode ) ) ;
my $ className = join ( "::" , kdocAstUtil:: heritage ( $ classNode ) ) ;
if ( $# { $ classNode - > { Kids } } < 0 ||
if ( ( $# { $ classNode - > { Kids } } < 0 && ! $ classNode - > { DcopExported } ) ||
$ classNode - > { Access } eq "private" ||
$ classNode - > { Access } eq "private" ||
$ classNode - > { Access } eq "protected" || # e.g. TQPixmap::TQPixmapData
$ classNode - > { Access } eq "protected" || # e.g. TQPixmap::TQPixmapData
exists $ classNode - > { Tmpl } ||
exists $ classNode - > { Tmpl } ||
@ -685,8 +685,14 @@ sub generateMethod($$$)
$ argType =~ s/^\s*(.*?)\s*$/$1/ ;
$ argType =~ s/^\s*(.*?)\s*$/$1/ ;
$ argType =~ s/</</g ;
$ argType =~ s/</</g ;
$ argType =~ s/>/>/g ;
$ argType =~ s/>/>/g ;
$ argType =~ s/(\W)\s+/$1/g ;
$ argType =~ s/\s+(\W)/$1/g ;
$ argType =~ s/\b(signed|unsigned|long|short)$/$1 int/ ;
$ args . = " <ARG><TYPE$typeAttrs>$argType</TYPE><NAME>$arg->{ArgName}</NAME></ARG>\n" ;
$ args . = " " ;
$ args . = "<ARG><TYPE$typeAttrs>$argType</TYPE>" ;
$ args . = "<NAME>$arg->{ArgName}</NAME>" if $ arg - > { ArgName } !~ /^$/ ;
$ args . = "</ARG>\n" ;
push @ argTypeList , $ argType ;
push @ argTypeList , $ argType ;
@ -703,6 +709,13 @@ sub generateMethod($$$)
my $ qual = "" ;
my $ qual = "" ;
$ qual . = " qual=\"const\"" if $ flags =~ "c" ;
$ qual . = " qual=\"const\"" if $ flags =~ "c" ;
my $ r_isConst = ( $ returnType =~ s/^\s*const\s*// ) ;
my $ r_isRef = ( $ returnType =~ s/&// ) ;
my $ retTypeAttrs = "" ;
$ retTypeAttrs . = " qleft=\"const\"" if $ r_isConst ;
$ retTypeAttrs . = " qright=\"&\"" if $ r_isRef ;
my $ this = $ classNode - > { BindingDerives } > 0 ? "this" : "xthis" ;
my $ this = $ classNode - > { BindingDerives } > 0 ? "this" : "xthis" ;
# We iterate as many times as we have default params
# We iterate as many times as we have default params
@ -714,8 +727,12 @@ sub generateMethod($$$)
$ xretCode . = coerce_type ( 'x[0]' , 'xret' , $ returnType , 1 ) ; }
$ xretCode . = coerce_type ( 'x[0]' , 'xret' , $ returnType , 1 ) ; }
$ returnType = "void" unless $ returnType ;
$ returnType = "void" unless $ returnType ;
$ returnType =~ s/^\s*(.*?)\s*$/$1/ ;
$ returnType =~ s/</</g ;
$ returnType =~ s/</</g ;
$ returnType =~ s/>/>/g ;
$ returnType =~ s/>/>/g ;
$ returnType =~ s/(\W)\s+/$1/g ;
$ returnType =~ s/\s+(\W)/$1/g ;
$ returnType =~ s/\b(signed|unsigned|long|short)$/$1 int/ ;
my $ methodCode = "" ;
my $ methodCode = "" ;
@ -739,7 +756,7 @@ sub generateMethod($$$)
$ methodCode . = " <DOC>$doc</DOC>\n" ;
$ methodCode . = " <DOC>$doc</DOC>\n" ;
}
}
$ methodCode . = " <TYPE >$returnType</TYPE>\n";
$ methodCode . = " <TYPE $retTypeAttrs >$returnType</TYPE>\n";
$ methodCode . = " <NAME>$name</NAME>\n" ;
$ methodCode . = " <NAME>$name</NAME>\n" ;
$ methodCode . = "$args" ;
$ methodCode . = "$args" ;
$ methodCode . = " </$tagType>\n" ;
$ methodCode . = " </$tagType>\n" ;