Fix setf value and export variant-boundp.
Mon May 11 16:14:14 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix setf value and export variant-boundp.
diff -rN -u old-qt.gui/src/package.lisp new-qt.gui/src/package.lisp
--- old-qt.gui/src/package.lisp 2014-10-30 07:43:59.000000000 +0100
+++ new-qt.gui/src/package.lisp 2014-10-30 07:43:59.000000000 +0100
@@ -30,6 +30,8 @@
#:from-variant
#:make-variant
#:make-lisp-variant
+ #:value
+ #:variant-boundp
#:connect
#:get-slot
diff -rN -u old-qt.gui/src/properties.lisp new-qt.gui/src/properties.lisp
--- old-qt.gui/src/properties.lisp 2014-10-30 07:43:59.000000000 +0100
+++ new-qt.gui/src/properties.lisp 2014-10-30 07:43:59.000000000 +0100
@@ -22,7 +22,7 @@
(defun property-p (object name)
"Returns T when NAME is a property of OBJECT and NIL otherwise."
- (valid-p (cxx:property object (property-name name))))
+ (variant-boundp (cxx:property object (property-name name))))
(defun meta-object-properties (meta-object &optional (all t))
"Returns a list of the properties of META-OBJECT."
diff -rN -u old-qt.gui/src/variant.lisp new-qt.gui/src/variant.lisp
--- old-qt.gui/src/variant.lisp 2014-10-30 07:43:59.000000000 +0100
+++ new-qt.gui/src/variant.lisp 2014-10-30 07:43:59.000000000 +0100
@@ -18,6 +18,7 @@
(make-instance 'variant)))
(defun make-char (character)
+ "Returns a char for a lisp CHARACTER."
(let ((octets (babel:string-to-octets (string character))))
(case (length octets)
(1 (make-instance 'char :args (list (aref octets 0))))
@@ -64,7 +65,7 @@
(defcfun qt-smoke-lisp-object-value :pointer
(variant :pointer))
-(defun valid-p (variant)
+(defun variant-boundp (variant)
"Returns true when VARIANT is valid (has a value) and false otherwise."
(cxx:is-valid variant))
@@ -100,4 +101,5 @@
(from-variant variant))
(defmethod (setf value) (new-value (variant variant))
- (cxx:operator= variant (make-variant new-value)))
+ (cxx:operator= variant (make-variant new-value))
+ new-value)