[Kde-bindings] KDE/kdebindings/kalyptus

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Apr 14 09:38:08 UTC 2008


SVN commit 796764 by rdale:

* When KDateTime::SpecType was refered to as 'SpecType' in the context of the
  'KDateTime::Spec' class, it wasn't being found by kalyptusDataDict::resolveType()
  because it was only looking in the inheritance heirarchy, and not in the lexical
  scope heirarchy. So, added a Iter::Heritage iterator iterator, and pass it a sub to look
  in the outer scopes.

CCMAIL: kde-bindings at kde.org

 M  +22 -0     Iter.pm  
 M  +2 -1      kalyptusCxxToSmoke.pm  
 M  +10 -0     kalyptusDataDict.pm  


--- trunk/KDE/kdebindings/kalyptus/Iter.pm #796763:796764
@@ -177,6 +177,28 @@
 
 =head2
 
+	Call $printsub for each outer scope of $node.
+
+=cut
+sub Heritage
+{
+	my ( $node, $printsub ) = @_;
+	my @anlist = ();
+	my @heritage = kdocAstUtil::refHeritage($node);
+	
+	foreach my $innode ( @heritage ) {
+		next if $innode == $node;
+		$printsub->( $innode, $innode->{astNodeName},
+			$innode->{Type}, $innode->{TmplType} ) 
+			unless !defined $printsub;
+	}
+
+	return;
+
+}
+
+=head2
+
 	Call $printsub for each *direct* ancestor of $node.
 	Only multiple inheritance can lead to $printsub being called more than once.
 
--- trunk/KDE/kdebindings/kalyptus/kalyptusCxxToSmoke.pm #796763:796764
@@ -282,7 +282,6 @@
 			|| $className =~ /.*Internal.*/ 
 			|| exists $classNode->{Tmpl}
 			|| $className eq 'KAccelGen'
-			|| $className eq 'KDateTime::Spec'
 			|| $className eq 'KDE'
 			|| $className eq 'KDEDModule'
 #			|| $className eq 'KDialogButtonBox'
@@ -312,6 +311,8 @@
 			|| $className eq 'KProtocolInfo::ExtraField'
 			|| $className eq 'KServiceTypeProfile'
 			|| $className eq 'KSettings::PluginPage'
+			|| $className eq 'KSettings::PluginPage'
+			|| $className eq 'KSystemTimeZoneData'
 			|| $className eq 'KTimeZone::Transition'
 			|| $className eq 'KTipDatabase'
 			|| $className eq 'KTzfileTimeZoneData'
--- trunk/KDE/kdebindings/kalyptus/kalyptusDataDict.pm #796763:796764
@@ -2882,6 +2882,16 @@
 		   undef
 		 );
 
+	# Look in the heritage outer lexical scopes, and try for each one
+	Iter::Heritage( $contextClass,
+		   sub {
+		     my ( $outer, $name, $type, $template ) = @_;
+		     unless ($found) {
+			$found = resolveTypeInternal( $argType, $outer, $rootnode );
+		     }
+		   }
+		 );
+
 	return $found;
 }
 



More information about the Kde-bindings mailing list