support packages for symbols as property names.
src/signal-slot/translate.lisp
Thu Jul 23 00:21:01 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* support packages for symbols as property names.
--- old-qt.gui/src/signal-slot/translate.lisp 2014-10-30 07:45:27.000000000 +0100
+++ new-qt.gui/src/signal-slot/translate.lisp 2014-10-30 07:45:27.000000000 +0100
@@ -13,8 +13,8 @@
(loop as pos = (position #\, arguments :from-end t :end last-pos)
while pos
do
- (push (find-type arguments (1+ pos) last-pos) argument-types)
- (setf last-pos pos))
+ (push (find-type arguments (1+ pos) last-pos) argument-types)
+ (setf last-pos pos))
(when (> last-pos 0)
(push (find-type arguments 0 last-pos) argument-types))))
@@ -46,9 +46,10 @@
(if (smoke::class-p type)
(if (smoke::pointer-p type)
(smoke::object-to-lisp (mem-ref pointer :pointer) type)
- ;; By value means that they are allocated by the C++ signal
- ;; code and have dynamic extend in the slot. The C++ signal code
- ;; frees the object when the slot returns.
+ ;; By-value means that the object at POINTER is allocated by
+ ;; the C++ signal code and has dynamic extend in the
+ ;; slot. The C++ signal code frees the object when the slot
+ ;; returns.
(disown-object (smoke::object-to-lisp pointer type)))
(ecase (smoke::type-id type)
(0 (let ((cffi-type (smoke::get-type (name type))))
@@ -75,9 +76,10 @@
(defun arguments-to-lisp (arguments types)
"Returns ARGUMENTS for a slot invocation as lisp objects."
- (arguments-to-lisp2 (inc-pointer arguments ;; index 0 is for the return value
- (foreign-type-size :pointer))
- types ()))
+ (arguments-to-lisp2
+ (inc-pointer arguments ;; index 0 is for the return value
+ (foreign-type-size :pointer))
+ types ()))
(defun get-type (smoke-type)
@@ -85,7 +87,7 @@
(typecase smoke-type
(smoke::smoke-standard-object
(if (smoke::pointer-p smoke-type)
- (error "FOO");;qmetatype.+voidstar+
+ (error "Not implemented: pointer type.") ;;qmetatype.+voidstar+
(let ((type (qt:meta-type.type (smoke::name smoke-type))))
(assert (/= 0 type)
(type)
@@ -98,7 +100,7 @@
(defun types (smoke-types)
"Returns a newly allocated array of QMetaType IDs of SMOKE-TYPES."
- ;;FIXME free TYPES on error.
+ ;; FIXME free TYPES on error.
(let ((types (cffi:foreign-alloc :int :count (1+ (length smoke-types))))
(index 0))
(dolist (type smoke-types)