[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/bindings/phpqt/src
From: Thomas Moenicke <tm () php-qt ! org>
Date: 2008-03-04 10:01:03
Message-ID: 1204624863.419428.25031.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 782023 by moenicke:
* moved InvokeSlot
M +1 -0 CMakeLists.txt
A InvokeSlot.cpp [License: UNKNOWN]
A InvokeSlot.h [License: UNKNOWN]
M +0 -87 marshall_types.cpp
M +0 -35 marshall_types.h
--- trunk/playground/bindings/phpqt/src/CMakeLists.txt #782022:782023
@@ -27,6 +27,7 @@
VirtualMethodCall.cpp
EmitSignal.cpp
MethodCall.cpp
+ InvokeSlot.cpp
)
add_library(php_qt MODULE ${phpqt_LIB_SRCS})
--- trunk/playground/bindings/phpqt/src/marshall_types.cpp #782022:782023
@@ -330,90 +330,3 @@
return qstrcmp(MethodReturnValueBase::classname(), "QGlobalSpace") == 0 ? "" : \
MethodReturnValueBase::classname(); }
-/**
- * InvokeSlot
- */
-
-InvokeSlot::InvokeSlot(Smoke *smoke, const Smoke::Index meth, const Smoke::Stack \
stack, const zval* obj, zval **sp, zval** return_value_ptr, const int slotId, const \
QMetaObject* metaObject, void** a) :
- MethodCallBase( smoke, meth, stack, return_value_ptr),
- _obj(obj),
- __sp(sp),
- _id(slotId),
- _metaObject(metaObject),
- _a(a)
-{
- _args = _smoke->argumentList + method().args;
- // break at the first '('
- _slotName = new QByteArray(_metaObject->method(_id).signature());
- int ab = _slotName->indexOf("(");
- _slotName = new QByteArray(_slotName->left(ab));
-
- QList<QByteArray> qargs = _metaObject->method(_id).parameterTypes();
- _items = qargs.count();
- _mocStack = new MocArgument[ _items + 1 ];
- smokephp_QtToMoc(_a + 1, qargs, _mocStack);
- smokeStackFromQtStack(_stack, _a + 1, _items, _mocStack);
-}
-
-InvokeSlot::~InvokeSlot()
-{
-}
-
-Marshall::Action
-InvokeSlot::action()
-{
- return Marshall::ToZVAL;
-}
-
-zval*
-InvokeSlot::var()
-{
- return __sp[_cur-1];
-}
-
-zval*
-InvokeSlot::var(zval* zval_ptr)
-{
- return __sp[_cur-1];
-}
-
-const int
-InvokeSlot::items()
-{
- return _items;
-}
-
-void
-InvokeSlot::callMethod()
-{
- if (_called) return;
- _called = true;
- zval* retval = PHPQt::callPHPMethod(_obj, _slotName->constData(), items(), \
__sp-1);
-// if(_args[0].argType != xmoc_void)
-// VirtualMethodReturnValue r(_smoke, _method, _stack, retval);
-}
-
-bool
-InvokeSlot::cleanup()
-{
- return false;
-}
-
-bool
-InvokeSlot::callable(const zend_class_entry* ce)
-{
- return PHPQt::methodExists(ce, _slotName->constData());
-}
-
-SmokeType
-InvokeSlot::type()
-{
- return _mocStack[_cur].st;
-}
-
-Smoke::StackItem &
-InvokeSlot::item()
-{
- return _stack[_cur];
-}
-
--- trunk/playground/bindings/phpqt/src/marshall_types.h #782022:782023
@@ -91,39 +91,4 @@
const char *classname();
};
-/**
- * InvokeSlot
- */
-
-class InvokeSlot : public MethodCallBase {
-public:
- InvokeSlot(Smoke *smoke, const Smoke::Index meth, const Smoke::Stack stack, const \
zval* obj, zval **sp, zval** return_value_ptr, const int slotId, const QMetaObject* \
metaObject, void** a);
- ~InvokeSlot();
- Marshall::Action action();
- zval* var();
- zval* var(zval* zval_ptr);
- virtual const int items();
- void callMethod();
- bool cleanup();
- bool doAlloc() { return true; }
- bool callable(const zend_class_entry* ce);
- SmokeType type();
- Smoke::StackItem& item();
-
- bool makeObject;
-
-private:
- int _items;
- int _id;
- QByteArray* _slotName;
- const QMetaObject* _metaObject;
- void** _a;
- MocArgument* _mocStack;
-
- const zval* _obj;
- zval **__sp;
-
-};
-
-
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic