modular smoke & cleanup.
Annotate for file src/i18n-hello-world.lisp
2009-04-14 tobias 1 ;;; Copyright 2009 Tobias Rautenkranz
14:29:22 ' 2 ;;; License: X11 license
' 3
2009-04-05 tobias 4 (in-package :qt.examples)
15:36:46 ' 5
' 6 (defun i18n-hello-world ()
' 7 "i18n hello world"
2009-07-01 tobias 8 (qt:with-app ()
2010-01-10 tobias 9 (qt:with-translator ("hello-world"
08:54:26 ' 10 *default-pathname-defaults*
' 11 *source-path*)
' 12 (let ((widget (make-instance 'qt:label)))
' 13 (setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
' 14 (cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
2009-04-05 tobias 15
15:36:46 ' 16 You are running ~A version ~A on a ~A ~A")
2010-01-10 tobias 17 (lisp-implementation-type)
08:54:26 ' 18 (lisp-implementation-version)
' 19 (software-type)
' 20 (software-version)))
' 21 (cxx:show widget)
' 22 (qt:exec)))))
2009-07-01 tobias 23
11:01:24 ' 24 ;; FIXME:
' 25 ;; calling #'software-version from the qt:application event loop
' 26 ;; segfaults in SBCL. The first call caches the result in
' 27 ;; sb-sys::*software-version* and we thus prevent the crash in
' 28 ;; (run-program "/bin/uname" [...]).
' 29 #+sbcl
2009-07-03 tobias 30 (smoke:eval-startup (:load-toplevel)
2009-07-01 tobias 31 (software-version))