Mon May 11 13:18:36 CEST 2009 Tobias Rautenkranz * update marshalling for overload resolution diff -rN -u old-qt.core/qt.mbd new-qt.core/qt.mbd --- old-qt.core/qt.mbd 2014-11-16 19:00:19.000000000 +0100 +++ new-qt.core/qt.mbd 2014-11-16 19:00:19.000000000 +0100 @@ -65,4 +65,5 @@ ("string-list" (:needs "qt" "lib" "qstring")) ("variant" (:needs "qt" "qstring" "lisp-object")) ("properties" (:needs "variant"))))) + (:uses-macros-from :smoke) (:needs :smoke :sysdef.cmake :cffi)) diff -rN -u old-qt.core/src/qstring.lisp new-qt.core/src/qstring.lisp --- old-qt.core/src/qstring.lisp 2014-11-16 19:00:19.000000000 +0100 +++ new-qt.core/src/qstring.lisp 2014-11-16 19:00:19.000000000 +0100 @@ -56,3 +56,13 @@ (defmethod free-translated-object (pointer (type qstring) param) (declare (ignore param)) (qt-smoke-free-qstring pointer)) + +(defun coerce-qstring (string) + (smoke::make-cleanup-pointer + (translate-to-foreign string (make-instance 'qt::qstring)) + #'(lambda (pointer) + (free-translated-object pointer (make-instance 'qt::qstring) + nil)))) + +(smoke::define-from-lisp-translation "const QString&" string + coerce-qstring) diff -rN -u old-qt.core/src/qt.lisp new-qt.core/src/qt.lisp --- old-qt.core/src/qt.lisp 2014-11-16 19:00:19.000000000 +0100 +++ new-qt.core/src/qt.lisp 2014-11-16 19:00:19.000000000 +0100 @@ -48,7 +48,6 @@ (eval-when (:load-toplevel :compile-toplevel) (when (null-pointer-p *qt-binding*) (setf *qt-binding* (init *qt-smoke*)))) - ;(make-smoke-classes *qt-smoke*)) (define-methods *qt-smoke*) diff -rN -u old-qt.core/src/string-list.lisp new-qt.core/src/string-list.lisp --- old-qt.core/src/string-list.lisp 2014-11-16 19:00:19.000000000 +0100 +++ new-qt.core/src/string-list.lisp 2014-11-16 19:00:19.000000000 +0100 @@ -49,3 +49,13 @@ (defmethod free-translated-object (string-list (type string-list) param) (declare (ignore param)) (qt-smoke-free-string-list string-list)) + +(defun coerce-string-list (list) + (smoke::make-cleanup-pointer + (translate-to-foreign list (make-instance 'qt::string-list)) + #'(lambda (pointer) + (free-translated-object pointer (make-instance 'qt::string-list) + nil)))) + +(smoke::define-from-lisp-translation "const QStringList&" + (vector string) coerce-string-list)