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

List:       kde-commits
Subject:    KDE/kdelibs/kjsembed/kjsembed
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2008-06-14 22:22:27
Message-ID: 1213482147.108534.2651.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 820608 by sebsauer:

not really needed--

 M  +2 -33     qobject_binding.cpp  


--- trunk/KDE/kdelibs/kjsembed/kjsembed/qobject_binding.cpp #820607:820608
@@ -512,39 +512,8 @@
                 if(QObjectBinding *objImp = \
KJSEmbed::extractBindingImp<QObjectBinding>(exec, args[idx]))  {
                     //qDebug("\tQObjectBinding");
-                    QObject* qObj = objImp->qobject<QObject>();
-                    if (qObj)
-                    {
-                        QByteArray typeName = types[idx].constData();
-                        typeName.replace("*", "");
-
-                        // try the basic QObject inheritance check
-                        if (qObj->inherits(typeName))
-                            return new Value<void*>(qObj);
-
-                        // ok, we'll have to check the hard way, and we'll 
-                        // have to play fast and loose with namespace checking
-                        // since the QMetaMethod parameterTypes doesn't 
-                        // include implicit namespace information.
-
-                        //qDebug() << "\tMaking sure " << qObj << " inherits from " \
                << typeName << " inherits(typeName)=" << qObj->inherits(typeName);
-                        for(const QMetaObject* meta = qObj->metaObject(); meta; meta \
                = meta->superClass())
-                        {
-                            //qDebug() << "1: Checking if " << typeName << " matches \
                " << meta->className();
-                            if( typeName == meta->className() )
-                                return new Value<void*>(qObj);
-
-                            // try with all leading namespacing stripped
-                            QByteArray className = meta->className();
-                            int pos = className.lastIndexOf("::");
-                            if( pos != -1 )
-                                className.remove(0, pos + 2);
-
-                            //qDebug() << "2: Checking if " << typeName << " matches \
                " << className;
-                            if( typeName == className )
-                                return new Value<void*>(qObj);
-                        }
-                    }
+                    if( QObject* qObj = objImp->qobject<QObject>() )
+                        return new Value<void*>(qObj);
                 }
                 else if(ObjectBinding *objImp = \
KJSEmbed::extractBindingImp<ObjectBinding>(exec, args[idx]))  {


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

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