QList<QObject*>
Mon Jun 1 00:22:22 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* QList<QObject*>
diff -rN -u old-qt.gui/src/list.lisp new-qt.gui/src/list.lisp
--- old-qt.gui/src/list.lisp 2014-10-10 17:22:18.000000000 +0200
+++ new-qt.gui/src/list.lisp 2014-10-10 17:22:18.000000000 +0200
@@ -1,22 +1,23 @@
(in-package :qt)
-(defmacro define-qlist-wrapper (type-name)
- (let* ((type (string-upcase type-name))
- (list-type (symbolicate 'qlist- type)))
+(defmacro define-qlist-wrapper (type-name &optional c-name)
+ (let* ((c-name (or c-name type-name))
+ (type (string-upcase c-name))
+ (list-type (symbolicate 'qlist- type)))
`(progn
- (defcfun ,(concatenate 'string "qt_smoke_list_" type-name "_size") :int
+ (defcfun ,(concatenate 'string "qt_smoke_list_" c-name "_size") :int
"Returns the size of LIST."
(list :pointer))
- (defcfun ,(concatenate 'string "qt_smoke_free_list_" type-name) :void
+ (defcfun ,(concatenate 'string "qt_smoke_free_list_" c-name) :void
"Frees LIST."
(list :pointer))
- (defcfun ,(concatenate 'string "qt_smoke_make_list_" type-name) :pointer
+ (defcfun ,(concatenate 'string "qt_smoke_make_list_" c-name) :pointer
"Makes a list.")
- (defcfun ,(concatenate 'string "qt_smoke_list_" type-name "_at") :pointer
+ (defcfun ,(concatenate 'string "qt_smoke_list_" c-name "_at") :pointer
"Returns the a newly constructed copy of the element at position AT of LIST."
(list :pointer)
(index :int))
- (defcfun ,(concatenate 'string "qt_smoke_list_" type-name "_append") :pointer
+ (defcfun ,(concatenate 'string "qt_smoke_list_" c-name "_append") :pointer
"Appends NEW-ELEMENT to LIST."
(list :pointer)
(new-element :pointer))
@@ -56,9 +57,9 @@
(function ,(symbolicate 'qt-smoke-free-list- type)))))
(define-from-lisp-translation (,(format nil "const QList<~A>&" type-name)
,(format nil "QLIst<~A>" type-name))
- list ;; FIXME allow seqence and define element type
+ list ;; FIXME allow seqence and define element type
,(symbolicate 'coerce- list-type)))))
(define-qlist-wrapper "QVariant")
-;(define-qlist-wrapper "void")
+(define-qlist-wrapper "QObject*" "void")
(define-qlist-wrapper "QByteArray")