Fix double space when printing a qt:object.
Sun Aug 2 13:29:13 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix double space when printing a qt:object.
diff -rN -u old-qt.core/src/object.lisp new-qt.core/src/object.lisp
--- old-qt.core/src/object.lisp 2014-10-30 06:58:28.000000000 +0100
+++ new-qt.core/src/object.lisp 2014-10-30 06:58:28.000000000 +0100
@@ -39,8 +39,17 @@
(if (or (not (slot-boundp object 'pointer))
(null-pointer-p (pointer object)))
(call-next-method)
- (print-unreadable-object (object stream :type t :identity t)
- (princ (cxx:object-name object) stream))))
+ (if (string= "" (cxx:object-name object))
+ (print-unreadable-object (object stream :type t :identity t))
+ (print-unreadable-object (object stream :type t :identity t)
+ (princ (cxx:object-name object) stream)))))
+
+(defmethod print-object ((object qt:meta-object) stream)
+ (if (or (not (slot-boundp object 'pointer))
+ (null-pointer-p (pointer object)))
+ (call-next-method)
+ (print-unreadable-object (object stream :type t :identity t)
+ (princ (cxx:class-name object) stream))))
(defun meta-object-methods (meta-object &optional (direct-only nil))
(loop for index from (if direct-only (cxx:method-offset meta-object) 0)
diff -rN -u old-qt.core/src/qstring.lisp new-qt.core/src/qstring.lisp
--- old-qt.core/src/qstring.lisp 2014-10-30 06:58:28.000000000 +0100
+++ new-qt.core/src/qstring.lisp 2014-10-30 06:58:28.000000000 +0100
@@ -47,3 +47,9 @@
(define-from-lisp-translation ("const QString&" "QString") string
coerce-qstring)
+
+(defmethod print-object ((object qt:byte-array) stream)
+ (if (null-pointer-p (pointer object))
+ (call-next-method)
+ (print-unreadable-object (object stream :type t :identity t)
+ (prin1 (cxx:data object) stream))))