[Kde-java] branches/KDE/3.5/kdebindings/qtjava/javalib/org/kde/qt

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Oct 7 15:52:20 CEST 2005


SVN commit 468238 by rdale:

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

CCBUGS: 112409
CCMAIL: kde-java at 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-java mailing list