[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebindings/kalyptus
From:       Arno Rehn <kde () arnorehn ! de>
Date:       2009-03-02 19:05:13
Message-ID: 1236020713.573188.29597.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 934312 by arnorehn:

* Also check for name clashes of public variable accessors.


 M  +7 -0      kalyptusCxxToKimono.pm  


--- trunk/KDE/kdebindings/kalyptus/kalyptusCxxToKimono.pm #934311:934312
@@ -2949,6 +2949,13 @@
 		$propertyName = uc($1) . $2;
 	}
 
+	# Only change the method name to start with an upper case letter
+	# if it doesn't clash with an enum with the same name
+	my $uppercaseItem = kdocAstUtil::findRef( $classNode, $propertyName );
+	if (defined $uppercaseItem && $uppercaseItem->{NodeType} eq 'enum' && $propertyName \
=~ /^([A-Z])(.*)/) { +		$propertyName = lc($1) . $2;
+	}
+
 	if ( $m->{Flags} =~ "s" ) {	
     	$methodCode .= "        public static $varType $propertyName() {\n";
     	$methodCode .= "            return ($varType) \
staticInterceptor.Invoke(\"$name\", \"$name()\", typeof($varType));\n";


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic