:qt and :qt-impl packages to prevent collision with :cl symbols and fix object with non smoke parent.
src/signal-slot/slot.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/signal-slot/slot.lisp 2014-10-30 07:47:19.000000000 +0100
+++ new-qt.gui/src/signal-slot/slot.lisp 2014-10-30 07:47:19.000000000 +0100
@@ -1,7 +1,6 @@
-(in-package :qt)
-(declaim (optimize (debug 3)))
+(in-package :cl-smoke.qt-impl)
-(defclass qslot (object)
+(defclass qslot (qt:object)
((arguments :reader arguments :initarg :argument-types
:documentation "List of the argument types for the slot.")
(function :reader slot-function :initarg :slot-function
@@ -10,7 +9,7 @@
(:metaclass cxx:class)
(:documentation "A Qt slot that calls its associated function"))
-(defun make-slot (function &optional (arguments nil arguments-p))
+(defun qt:make-slot (function &optional (arguments nil arguments-p))
"Returns a slot that calls FUNCTION when it receives a signal."
(if arguments-p
(make-instance 'qslot
@@ -24,7 +23,7 @@
(defparameter *sender* nil "The sender of the signal.")
(defparameter *this* nil "The slot that is invoked.")
-(defmacro sender ()
+(defmacro qt:sender ()
"Returns the sender that invoked the slot."
`*sender*)
@@ -34,7 +33,7 @@
(let ((id (call-next-method)))
(if (< id 0)
id
- (if (enum= call meta-object.+invoke-meta-method+)
+ (if (enum= call qt:meta-object.+invoke-meta-method+)
(progn
(ccase id
(0 (let ((*sender* (cxx:sender slot))
@@ -55,7 +54,7 @@
signal)))
(when (< id 0)
(setf id (cxx:index-of-signal (cxx:meta-object sender)
- (cxx:data (meta-object.normalized-signature signal)))))
+ (cxx:data (qt:meta-object.normalized-signature signal)))))
(when (< id 0)
(error "No signal ~S for class ~S."
signal (class-of sender)))