[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-10-12 0:51:08
Message-ID: 1192150268.955549.31906.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 724329 by sebsauer:
pass on the returnvalue
M +15 -4 slotproxy.cpp
M +1 -0 slotproxy.h
--- trunk/KDE/kdelibs/kjsembed/kjsembed/slotproxy.cpp #724328:724329
@@ -110,6 +110,9 @@
KJS::JSValue *retValue;
if ( !fun->implementsCall() )
{
+#ifdef DEBUG_SLOTPROXY
+ qDebug() << "SlotProxy::callMethod got bad handler";
+#endif
QString msg = i18n( "Bad slot handler: Object %1 Identifier %2 Method %3 \
Signature: %4.", m_object->className().ascii(),
id.ascii(),
@@ -123,6 +126,9 @@
if( exec->hadException() )
{
+#ifdef DEBUG_SLOTPROXY
+ qDebug() << "SlotProxy::callMethod had exception";
+#endif
if (m_interpreter->shouldPrintExceptions())
{
KJS::JSLock lock;
@@ -289,7 +295,7 @@
int SlotProxy::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
-#if defined(DEBUG_SLOTPROXY) && (DEBUG_SLOTPROXY > 1)
+#ifdef DEBUG_SLOTPROXY
qDebug("SlotProxy::qt_metacall(_c=%d, _id=%d, _a=%p _a[0]=%p _a[1]=%p) obj=", _c, \
_id, _a, _a[0], _a[1], this); #endif
_id = QObject::qt_metacall(_c, _id, _a);
@@ -299,11 +305,16 @@
{
switch (_id)
{
- case 0:
+ case 0: {
// invoke js method here
QByteArray method = m_signature.left(m_signature.indexOf('('));
- callMethod(method, _a);
- break;
+ KJS::JSValue *result = callMethod(method, _a);
+ m_tmpResult = convertToVariant(m_interpreter->globalExec(), result);
+#ifdef DEBUG_SLOTPROXY
+ qDebug()<<"SlotProxy::qt_metacall result="<<m_tmpResult.toString();
+#endif
+ _a[0] = &(m_tmpResult);
+ } break;
}
_id -= 1;
}
--- trunk/KDE/kdelibs/kjsembed/kjsembed/slotproxy.h #724328:724329
@@ -57,6 +57,7 @@
QByteArray m_stringData;
KJS::Interpreter *m_interpreter;
KJS::JSObject *m_object;
+ QVariant m_tmpResult;
};
}
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic