:qt and :qt-impl packages to prevent collision with :cl symbols and fix object with non smoke parent.
src/i18n.lisp
Thu Jun 11 16:59:48 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* :qt and :qt-impl packages to prevent collision with :cl symbols and fix object with non smoke parent.
--- old-qt.gui/src/i18n.lisp 2014-10-30 07:46:50.000000000 +0100
+++ new-qt.gui/src/i18n.lisp 2014-10-30 07:46:50.000000000 +0100
@@ -1,6 +1,6 @@
-(in-package :qt)
+(in-package :cl-smoke.qt-impl)
-(defun tr (message &optional context)
+(defun qt:tr (message &optional context)
"Returns the translated MESSAGE for CONTEXT or
a string STRING-EQUAL to MESSAGE when no translation was found.
@@ -14,13 +14,13 @@
,@body)
(cxx:remove-translator (qt:app) ,translator)))
-(defmacro with-translator ((base-name &rest paths) &body body)
+(defmacro qt:with-translator ((base-name &rest paths) &body body)
"Loads the translations in the BASE-NAME_LANGCODE.qm file;
searching PATHS.
Must be in a WITH-APP."
(let ((translator (gensym)))
- `(let ((,translator (make-instance 'translator)))
+ `(let ((,translator (make-instance 'qt:translator)))
(unless
(find-if #'(lambda (path)
(cxx:load ,translator
@@ -33,12 +33,12 @@
(with-installed-translator ,translator
,@body))))
-(defmacro with-libqt-translator (&body body)
+(defmacro qt:with-libqt-translator (&body body)
"Loads the translations for the Qt library.
Must be in a WITH-APP."
(let ((translator (gensym)))
- `(let ((,translator (make-instance 'translator)))
+ `(let ((,translator (make-instance 'qt:translator)))
(unless (cxx:load ,translator (format nil "qt_~A"
(cxx:name (qt:locale.system)))
(qt:library-info.location qt:library-info.+translations-path+))
@@ -46,7 +46,7 @@
(with-installed-translator ,translator
,@body))))
-(defun search-file (name &rest paths)
+(defun qt:search-file (name &rest paths)
"Searches the file NAME in PATHS and returns its path."
(let ((file-path (find-if #'(lambda (path)
(probe-file (merge-pathnames name path)))