:qt and :qt-impl packages to prevent collision with :cl symbols and fix object with non smoke parent.
src/qstring.lisp
Thu Jun 11 16:59:48 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* :qt and :qt-impl packages to prevent collision with :cl symbols and fix object with non smoke parent.
--- old-qt.gui/src/qstring.lisp 2014-10-30 07:47:09.000000000 +0100
+++ new-qt.gui/src/qstring.lisp 2014-10-30 07:47:09.000000000 +0100
@@ -1,4 +1,4 @@
-(in-package :qt)
+(in-package :cl-smoke.qt-impl)
(defcfun qt-smoke-string-to-qstring :pointer
(data :string)
@@ -28,26 +28,26 @@
;;; (setq slime-net-coding-system 'utf-8-unix)
;;; to .emacs helps.
(smoke:eval-startup (:compile-toplevel :execute)
- (text-codec.set-codec-for-cstrings
- (text-codec.codec-for-name (string *default-foreign-encoding*)))
- (text-codec.set-codec-for-locale
- (text-codec.codec-for-name (string *default-foreign-encoding*))))
+ (qt:text-codec.set-codec-for-cstrings
+ (qt:text-codec.codec-for-name (string *default-foreign-encoding*)))
+ (qt:text-codec.set-codec-for-locale
+ (qt:text-codec.codec-for-name (string *default-foreign-encoding*))))
(define-parse-method qstring ()
(make-instance 'qstring))
(smoke:eval-startup (:compile-toplevel :execute)
-(let ((method (smoke::make-smoke-method (find-class 'byte-array)
+(let ((method (smoke::make-smoke-method (find-class 'qt:byte-array)
"data")))
- (defmethod cxx:data ((array byte-array))
+ (defmethod cxx:data ((array qt:byte-array))
(values ;; Discarge second return value (length of string)
(foreign-string-to-lisp (smoke::pointer-call method
(smoke::pointer array))
:count (cxx:size array))))))
(defmethod translate-from-foreign (string (type qstring))
- (cxx:data (make-instance 'byte-array
+ (cxx:data (make-instance 'qt:byte-array
:pointer (qt-smoke-qstring-to-byte-array string))))
(defmethod free-translated-object (pointer (type qstring) param)
@@ -59,7 +59,7 @@
(with-foreign-string ((data length) string :null-terminated-p nil)
(qt-smoke-string-to-qstring data length))
#'(lambda (pointer)
- (free-translated-object pointer (make-instance 'qt::qstring)
+ (free-translated-object pointer (make-instance 'qstring)
nil))))
(define-from-lisp-translation ("const QString&" "QString") string