[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:       2007-05-13 20:03:44
Message-ID: 1179086624.184652.11829.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 664381 by sebsauer:

debugging says, it's actualy JSOwned. So, change it and leak less + improve dox to \
provide more infos about the params and there meanings.

 M  +11 -0     qobject_binding.h  
 M  +2 -2      slotproxy.cpp  


--- trunk/KDE/kdelibs/kjsembed/kjsembed/qobject_binding.h #664380:664381
@@ -207,6 +207,17 @@
 * up the meta objects in order to find the most specific binding it can.
 * There should always be some kind of binding possible even if it is just
 * the QObject binding.
+*
+* \param exec Represents the current state of script execution.
+* \param value The QObject or from it inherited instance we should return
+* a binding object for.
+* \param owner The ownership of the returned object binding. If CPPOwned
+* is defined you needed to delete the returned object manual, QObjOwned means
+* that the object got deleted if the QObject is destroyed while JSOwned means,
+* that the binding object will be deleted by Kjs once not needed any longer.
+* \return the binding object instance that wraps the QObject instance or
+* a JSObject with a prototype of jsNull (that is, the ECMAScript "null" value,
+* not a null object pointer) if we failed to provide any binding for it.
 */
 KJS::JSObject *createQObject(KJS::ExecState *exec, QObject *value, \
KJSEmbed::ObjectBinding::Ownership owner = KJSEmbed::ObjectBinding::JSOwned);  
--- trunk/KDE/kdelibs/kjsembed/kjsembed/slotproxy.cpp #664380:664381
@@ -254,11 +254,11 @@
                 {
                     case QMetaType::QObjectStar: {
                         QObject* obj = (*reinterpret_cast< QObject*(*)>( _a[idx] ));
-                        returnValue = KJSEmbed::createQObject(exec, obj, \
KJSEmbed::ObjectBinding::CPPOwned); +                        returnValue = \
KJSEmbed::createQObject(exec, obj);  } break;
                     case QMetaType::QWidgetStar: {
                         QWidget* obj = (*reinterpret_cast< QWidget*(*)>( _a[idx] ));
-                        returnValue = KJSEmbed::createQObject(exec, obj, \
KJSEmbed::ObjectBinding::CPPOwned); +                        returnValue = \
KJSEmbed::createQObject(exec, obj);  } break;
                     default: {
 #ifdef DEBUG_SLOTPROXY


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

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