Normalize signal and slot names at compile time.
src/signal-slot/slot.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/slot.lisp 2014-10-30 07:48:01.000000000 +0100
+++ new-qt.gui/src/signal-slot/slot.lisp 2014-10-30 07:48:02.000000000 +0100
@@ -47,8 +47,13 @@
(defun find-signal-id (sender signal)
"Returns the ID of SIGNAL from SENDER."
+ ;; For efficency assume that SIGNAL is normalized and fallback
+ ;; to normalzing when not. (Just like Qt does.)
(let ((id (cxx:index-of-signal (cxx:meta-object sender)
- (cxx:data (meta-object.normalized-signature signal)))))
+ signal)))
+ (when (< id 0)
+ (setf id (cxx:index-of-signal (cxx:meta-object sender)
+ (cxx:data (meta-object.normalized-signature signal)))))
(when (< id 0)
(error "No signal ~S for class ~S."
signal (class-of sender)))