[Kde-bindings] [Bug 112409] overloading qt event handling methods in Java subclasses fails

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Oct 7 13:52:33 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=112409         




------- Additional Comments From Richard_Dale tipitina demon co uk  2005-10-07 15:52 -------
SVN commit 468238 by rdale:

* Still trying to fix bug #112409 - fourth attempt, feeling lucky

CCBUGS: 112409
CCMAIL: kde-java kde org



 M  +6 -2      Invocation.java  


--- branches/KDE/3.5/kdebindings/qtjava/javalib/org/kde/qt/Invocation.java #468237:468238
 @ -436,7 +436,7  @
 		if the method was successfully invoked, otherwise false.
 		Used for event handling callbacks */
 	public static boolean invoke(long target, long arg, String argClass, String methodName) throws NoSuchMethodException, ClassNotFoundException  {
-		Method	method;
+		Method	method = null;
 		Class[] parameterType = new Class[1];
 		parameterType[0] = Class.forName(qtjava.toFullyQualifiedClassName(argClass));
 		Object onThis = qtjava.objectForQtKey(target, "org.kde.qt.QObject", false);
 @ -447,13 +447,17  @
 			try {
 				method = targetClass.getDeclaredMethod(methodName, parameterType);
 				method.setAccessible(true);
+				break;
 			} catch (NoSuchMethodException e1) {
-				return false;
 			}
 			
 			targetClass = targetClass.getSuperclass();
 		} while (targetClass != null);
 
+		if (targetClass == null) {
+			return false;
+		}
+
 		// Ignore any native code event handling methods
 		if ((method.getModifiers() & Modifier.NATIVE) != 0) {
 			return false;



More information about the Kde-bindings mailing list