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

List:       kde-bindings
Subject:    [Kde-bindings] KDE/kdebindings/perl/qtcore/src
From:       Chris Michael Burel <chrisburel () gmail ! com>
Date:       2010-09-03 2:49:49
Message-ID: 20100903024949.47A55AC883 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1171223 by burel:

When calling a method in QGlobalSpace, don't stop when you find the first smoke \
module that provides the method you're looking for.  Look through all smoke modules.  \
This was breaking when calling operator<< on a QPixmap, because that method was \
defined by the QtGui module.  The code would find the methods from QtCore and stop \
there.

I think the other bindings may want this too.  I checked Ruby, and it looked \
incorrect to me.

CCMAIL: kde-bindings@kde.org

 M  +7 -4      QtCore4.xs  


--- trunk/KDE/kdebindings/perl/qtcore/src/QtCore4.xs #1171222:1171223
@@ -48,21 +48,23 @@
         char* classname
         char* methodname
     PPCODE:
-        Smoke::ModuleIndex mi;
+        QList<Smoke::ModuleIndex> milist;
         if ( strcmp( classname, "QGlobalSpace" ) == 0 ) {
             // All modules put their global functions in "QGlobalSpace".  So we
             // have to use each smoke object to look for this method.
             for (int i = 0; i < smokeList.size(); ++i) {
-                mi = smokeList.at(i)->findMethod(classname, methodname);
+                Smoke::ModuleIndex mi = smokeList.at(i)->findMethod(classname, \
methodname);  if( mi.smoke ) {
-                    break;
+                    // Found a result, add it to the return
+                    milist.append(mi);
                 }
             }
         }
         else {
             // qtcore_Smoke will be able to find any method not in QGlobalSpace
-            mi = qtcore_Smoke->findMethod(classname, methodname);
+            milist.append( qtcore_Smoke->findMethod(classname, methodname) );
         }
+        foreach (Smoke::ModuleIndex mi, milist) {
         if ( !mi.index ) {
             // empty list
         }
@@ -95,6 +97,7 @@
                 }
             }
         }
+        }
 
 #// Args: none
 #// Returns: an array of all classes that qtcore_Smoke knows about
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


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

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