Sun Apr 12 15:12:20 CEST 2009 Tobias Rautenkranz * get rid of &args for "defmethod cxx:" diff -rN -u old-qt.core/src/object.lisp new-qt.core/src/object.lisp --- old-qt.core/src/object.lisp 2014-11-17 00:09:33.000000000 +0100 +++ new-qt.core/src/object.lisp 2014-11-17 00:09:33.000000000 +0100 @@ -2,12 +2,10 @@ (declaim (optimize (debug 3))) (let ((object (make-instance 'object))) - (defmethod cxx:static-meta-object ((class (eql (find-class 'object))) &rest args) + (defmethod cxx:static-meta-object ((class (eql (find-class 'object)))) "No OBJECT.STATIC-META-OBJECT (r558420)." - (declare (ignore args)) (cxx:meta-object object)) - (defmethod cxx:static-meta-object ((class smoke::smoke-wrapper-class) &rest args) - (declare (ignore args)) + (defmethod cxx:static-meta-object ((class smoke::smoke-wrapper-class)) (cxx:static-meta-object (smoke::find-smoke-class class)))) (defmethod documentation :around ((class smoke::smoke-standard-class) @@ -115,27 +113,6 @@ condition))))))) ;(smoke::pointer-call delete-later pointer))))))) ) -(defun cxx-gc () - "Delete the C++ object that have been queued for deletion when -QT:CORE-APPLICATION.EXEC is run." - (core-application.send-posted-events - (make-instance 'object :pointer (null-pointer)) -event.+deferred-delete+)) - - -;(defmethod upcast-object ((objeckt qobject)) -; (let ((class-name (cxx:classname (cxx:metaobject object)))) -; (if (string= class-name (name (get-class object))) -; object -; (let ((real-class (lispify class-name))) -;;FIXME get smoke module from class name -; (make-instance -; :pointer upcast (object class)))))))) - - -;(defmethod upcast-object ((event qevent)) -; (case (cxx:type event) -; (#.qevent.+childadded+ ;;; ;;; The event-notify callback get called by QCoreApplication, diff -rN -u old-qt.core/src/qstring.lisp new-qt.core/src/qstring.lisp --- old-qt.core/src/qstring.lisp 2014-11-17 00:09:33.000000000 +0100 +++ new-qt.core/src/qstring.lisp 2014-11-17 00:09:33.000000000 +0100 @@ -43,8 +43,7 @@ (let ((method (smoke::make-smoke-method (find-class 'byte-array) "data"))) - (defmethod cxx:data ((array byte-array) &rest args) - (declare (ignore args)) + (defmethod cxx:data ((array byte-array)) (values ;; Discarge second return value (length of string) (foreign-string-to-lisp (smoke::pointer-call method (smoke::pointer array)) diff -rN -u old-qt.core/src/signal-slot/slot.lisp new-qt.core/src/signal-slot/slot.lisp --- old-qt.core/src/signal-slot/slot.lisp 2014-11-17 00:09:33.000000000 +0100 +++ new-qt.core/src/signal-slot/slot.lisp 2014-11-17 00:09:33.000000000 +0100 @@ -36,19 +36,18 @@ 0 (1+ (count #\, signature))))) -(defmethod cxx::qt-metacall ((slot qslot) &rest args - &aux (a (third args))) +(defmethod cxx:qt-metacall ((slot qslot) call id arguments) "Invoke the slots function when it is called. The return value of the invoked slot function is ignored." (let ((id (call-next-method))) (if (< id 0) id - (if (enum= (first args) meta-object.+invoke-meta-method+) + (if (enum= call meta-object.+invoke-meta-method+) (progn (case id (0 (let ((*sender* (cxx:sender slot))) (apply (slot-function slot) - (arguments-to-lisp a (arguments slot)))))) + (arguments-to-lisp arguments (arguments slot)))))) (1- id)) id)))) diff -rN -u old-qt.core/src/timer.lisp new-qt.core/src/timer.lisp --- old-qt.core/src/timer.lisp 2014-11-17 00:09:33.000000000 +0100 +++ new-qt.core/src/timer.lisp 2014-11-17 00:09:33.000000000 +0100 @@ -1,15 +1,17 @@ (in-package :qt) (defclass single-shot-timer (qt:object) - ((function :initarg :function) - (timer-id)) + ((function :initarg :function + :type function) + (timer-id :type integer)) (:metaclass cxx:class)) (defvar *single-shot-timers* nil) (defun single-shot (function &optional (timeout 0)) "Run FUNCTION after TIMEOUT seconds, or as soon as all window events -have been processed when TIMEOUT is 0." +have been processed when TIMEOUT is 0. Equivalent to QTimer::singleShot, +but calls a function instead of a slot." (let ((timer (make-instance 'single-shot-timer :function function))) (setf (slot-value timer 'timer-id) @@ -22,8 +24,7 @@ http://techbase.kde.org/Development/Tutorials/Common_Programming_Mistakes#Delayed_Initialization" `(single-shot #'(lambda () ,@body))) -(defmethod cxx:timer-event ((timer single-shot-timer) &rest args) - (declare (ignore args)) +(defmethod cxx:timer-event ((timer single-shot-timer) event) (cxx:kill-timer timer (slot-value timer 'timer-id)) (funcall (slot-value timer 'function)) (remove timer *single-shot-timers*))