Use new qt:with-app.
Wed Jul 1 13:01:24 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Use new qt:with-app.
hunk ./src/class-browser.lisp 84
- (subseq (qt:q-version) 0 3)
- (remove #\: (smoke:name class) :count 1)))
+ (subseq (qt:q-version) 0 3)
+ (remove #\: (smoke:name class) :count 1)))
hunk ./src/class-browser.lisp 107
- (qt:with-app
- (let ((browser (make-instance 'class-browser)))
- (cxx:show browser)
- (qt:exec))))
+ (qt:with-app ()
+ (let ((browser (make-instance 'class-browser)))
+ (cxx:show browser)
+ (qt:exec))))
hunk ./src/hello-world-quit.lisp 7
- "Quit on push-button click"
- (qt:with-app
+ "Quit on push-button click."
+ (qt:with-app ()
hunk ./src/hello-world-quit.lisp 19
- [_^I_][_^I_][_^I_][_^I_] [_$_]
+ [_$_]
hunk ./src/hello-world-quit.lisp 23
- (qt:exec quit))))
+ (qt:exec))))
hunk ./src/hello-world.lisp 8
- (qt:with-app
+ (qt:with-app ()
hunk ./src/hello-world.lisp 11
- (qt:exec widget))))
+ (qt:exec))))
hunk ./src/hello-world_de.po 9
-"POT-Creation-Date: 2009-05-30 16:10+0200\n"
+"POT-Creation-Date: 2009-07-01 01:17+0200\n"
hunk ./src/i18n-hello-world.lisp 8
- (qt:with-app
- ;; ensures that the message catalogs are found regardless
- ;; of the current directory.
- (let ((source-path
- #+mudballs (directory-namestring
- (mb.sysdef:input-file
- (mb.sysdef:find-component :qt.examples "src" [_$_]
- "i18n-hello-world")))
- #-mudballs *default-pathname-defaults*))
- (qt:with-translator ("hello-world" [_$_]
- *default-pathname-defaults*
- source-path)
- (let ((widget (make-instance 'qt:label)))
- (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
- (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
+ (qt:with-app ()
+ ;; ensures that the message catalogs are found regardless
+ ;; of the current directory.
+ (let ((source-path
+ #+mudballs (directory-namestring
+ (mb.sysdef:input-file
+ (mb.sysdef:find-component :qt.examples "src" [_$_]
+ "i18n-hello-world")))
+ #-mudballs *default-pathname-defaults*))
+ (qt:with-translator ("hello-world" [_$_]
+ *default-pathname-defaults*
+ source-path)
+ (let ((widget (make-instance 'qt:label)))
+ (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
+ (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
hunk ./src/i18n-hello-world.lisp 25
- (lisp-implementation-type)
- (lisp-implementation-version)
- (software-type)
- (software-version)))
- (cxx:show widget)
- (qt:exec widget))))))
+ (lisp-implementation-type)
+ (lisp-implementation-version)
+ (software-type)
+ (software-version)))
+ (cxx:show widget)
+ (qt:exec))))))
+
+;; FIXME:
+;; calling #'software-version from the qt:application event loop
+;; segfaults in SBCL. The first call caches the result in
+;; sb-sys::*software-version* and we thus prevent the crash in
+;; (run-program "/bin/uname" [...]).
+#+sbcl
+(eval-when (:load-toplevel)
+ (software-version))
hunk ./src/launcher.lisp 29
- (qt:with-app
+ (qt:with-app ()
hunk ./src/launcher.lisp 32
- (qt:exec launcher))))
+ (qt:exec))))
hunk ./src/repl.lisp 11
- (input :reader input
+ (input :reader input
hunk ./src/repl.lisp 46
- (qt:with-app
+ (qt:with-app ()
hunk ./src/repl.lisp 49
- (qt:exec repl))))
+ (qt:exec))))
hunk ./src/tick-tack-toe.lisp 218
- (qt:with-app
+ (qt:with-app ()
hunk ./src/tick-tack-toe.lisp 221
- (qt:exec widget))))
+ (qt:exec))))
hunk ./src/ui.lisp 8
- (qt:with-app
- (let ((loader (make-instance 'qt:ui-loader))
- (file (make-instance 'qt:file))
- (widget))
- (setf (cxx:file-name file)
- (namestring
- (qt:search-file "widget.ui"
- *default-pathname-defaults*
- #+mudballs (directory-namestring
- (mb.sysdef:input-file
- (mb.sysdef:find-component :qt.examples "src" "ui"))))))
- (assert (cxx:exists file) (file)
- "File ~A does not exists" (cxx:file-name file))
- (unless (cxx:open file qt:iodevice.+read-only+)
- (error "open failed"))
- (setf widget (cxx:load loader file))
- (when (cffi:null-pointer-p (smoke:pointer widget))
- (error "load failed"))
- (cxx:close file)
- (cxx:show widget)
- (qt:exec))))
+ (qt:with-app ()
+ (let ((loader (make-instance 'qt:ui-loader))
+ (file (make-instance 'qt:file))
+ (widget))
+ (setf (cxx:file-name file)
+ (namestring
+ (qt:search-file "widget.ui"
+ *default-pathname-defaults*
+ #+mudballs (directory-namestring
+ (mb.sysdef:input-file
+ (mb.sysdef:find-component :qt.examples "src" "ui"))))))
+ (assert (cxx:exists file) (file)
+ "File ~A does not exists" (cxx:file-name file))
+ (unless (cxx:open file qt:iodevice.+read-only+)
+ (error "open failed"))
+ (setf widget (cxx:load loader file))
+ (when (cffi:null-pointer-p (smoke:pointer widget))
+ (error "load failed"))
+ (cxx:close file)
+ (cxx:show widget)
+ (qt:exec))))