Normalize signal and slot names at compile time.
src/signal-slot/signal.lisp
Thu Jun 4 12:58:29 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Normalize signal and slot names at compile time.
--- old-qt.gui/src/signal-slot/signal.lisp 2014-10-30 07:47:59.000000000 +0100
+++ new-qt.gui/src/signal-slot/signal.lisp 2014-10-30 07:47:59.000000000 +0100
@@ -54,8 +54,13 @@
(defun find-slot-id (receiver slot)
"Returns the ID of RECEIVER from SLOT."
+ ;; For efficency assume that SLOT is normalized and fallback
+ ;; to normalzing when not. (Just like Qt does.)
(let ((id (cxx:index-of-slot (cxx:meta-object receiver)
- (cxx:data (meta-object.normalized-signature slot)))))
+ slot)))
+ (when (< id 0)
+ (setf id (cxx:index-of-slot (cxx:meta-object receiver)
+ (cxx:data (meta-object.normalized-signature slot)))))
(when (< id 0)
(error "No slot ~S for class ~S.
The valid slots are: ~{~<~%~T~0,75:;~A ~>~}"