[Kde-bindings] KDE/kdebindings/ruby/qtruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Jun 12 14:28:40 UTC 2008


SVN commit 819891 by rdale:

* When resolve_classname_qt() was given a class outside the Qt smoke
  library, such as KAction, it was failing to resolve it. This was
  because it was only looking in the smoke library of the arg type
  declared in the method. Hence, an arg type of 'QAction' was not
  being resolved to 'KAction'. Thanks to Stefano Crocco for reporting 
  the bug.

CCMAIL: kde-bindings at kde.org



 M  +9 -0      ChangeLog  
 M  +6 -3      src/handlers.cpp  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #819890:819891
@@ -1,3 +1,12 @@
+2008-06-12  Richard Dale  <richard.j.dale at gmail.com>
+
+	* When resolve_classname_qt() was given a class outside the Qt smoke
+	  library, such as KAction, it was failing to resolve it. This was
+	  because it was only looking in the smoke library of the arg type
+	  declared in the method. Hence, an arg type of 'QAction' was not
+	  being resolved to 'KAction'. Thanks to Stefano Crocco for reporting 
+	  the bug.
+
 2008-06-09  Richard Dale  <richard.j.dale at gmail.com>
 
 	* The rb_id2name() function has changed to return a 'const char *'
--- trunk/KDE/kdebindings/ruby/qtruby/src/handlers.cpp #819890:819891
@@ -556,9 +556,12 @@
 		const QMetaObject * meta = qobject->metaObject();
 
 		while (meta != 0) {
-			Smoke::Index classId = smoke->idClass(meta->className()).index;
-			if (classId != 0) {
-				return smoke->binding->className(classId);
+			Smoke* s = Smoke::classMap[meta->className()];
+			if (s != 0) {
+				Smoke::Index classId = s->idClass(meta->className()).index;
+				if (classId != 0) {
+					return s->binding->className(classId);
+				}
 			}
 
 			meta = meta->superClass();



More information about the Kde-bindings mailing list