mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-15 06:41:01 -08:00
small revisions
This commit is contained in:
parent
1a41ed320b
commit
307b0cb8d2
6 changed files with 8 additions and 8 deletions
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
(defun qml-apply (caller function arguments)
|
(defun qml-apply (caller function arguments)
|
||||||
"Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this function. The variable *CALLER* will be bound to the calling QQuickItem, if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'."
|
"Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this function. The variable *CALLER* will be bound to the calling QQuickItem, if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'."
|
||||||
(let* ((*caller* (if (qnull caller) nil (qt-object-? caller)))
|
(let* ((*caller* (if (qnull caller) *caller* (qt-object-? caller)))
|
||||||
(object (apply (string-to-symbol function)
|
(object (apply (string-to-symbol function)
|
||||||
arguments)))
|
arguments)))
|
||||||
(if (stringp object)
|
(if (stringp object)
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
(defun qml-apply (caller function arguments)
|
(defun qml-apply (caller function arguments)
|
||||||
"Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this function. The variable *CALLER* will be bound to the calling QQuickItem, if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'."
|
"Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this function. The variable *CALLER* will be bound to the calling QQuickItem, if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'."
|
||||||
(let* ((*caller* (if (qnull caller) nil (qt-object-? caller)))
|
(let* ((*caller* (if (qnull caller) *caller* (qt-object-? caller)))
|
||||||
(object (apply (string-to-symbol function)
|
(object (apply (string-to-symbol function)
|
||||||
arguments)))
|
arguments)))
|
||||||
(if (stringp object)
|
(if (stringp object)
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ ListView {
|
||||||
x: 5; y: 5; width: 200; height: 250
|
x: 5; y: 5; width: 200; height: 250
|
||||||
|
|
||||||
model: myModel
|
model: myModel
|
||||||
delegate: Text { text: "animal: " + kind + ", " + size }
|
delegate: Text { text: "animal: <b>" + kind + "</b>, " + size }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
(defun qml-apply (caller function arguments)
|
(defun qml-apply (caller function arguments)
|
||||||
"Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this function. The variable *CALLER* will be bound to the calling QQuickItem, if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'."
|
"Every 'Lisp.call()' or 'Lisp.apply()' function call in QML will call this function. The variable *CALLER* will be bound to the calling QQuickItem, if passed with 'this' as first argument to 'Lisp.call()' / 'Lisp.apply()'."
|
||||||
(let* ((*caller* (if (qnull caller) nil (qt-object-? caller)))
|
(let* ((*caller* (if (qnull caller) *caller* (qt-object-? caller)))
|
||||||
(object (apply (string-to-symbol function)
|
(object (apply (string-to-symbol function)
|
||||||
arguments)))
|
arguments)))
|
||||||
(if (stringp object)
|
(if (stringp object)
|
||||||
|
|
|
||||||
|
|
@ -2526,10 +2526,10 @@ cl_object qtranslate(cl_object l_con, cl_object l_src, cl_object l_n) {
|
||||||
QByteArray source(toQString(l_src).toUtf8());
|
QByteArray source(toQString(l_src).toUtf8());
|
||||||
int n = toInt(l_n);
|
int n = toInt(l_n);
|
||||||
cl_object l_ret;
|
cl_object l_ret;
|
||||||
if(n == -1) {
|
if(n > 0) {
|
||||||
l_ret = from_qstring(QCoreApplication::translate(context, source)); }
|
|
||||||
else {
|
|
||||||
l_ret = from_qstring(QCoreApplication::translate(context, source, 0, n)); }
|
l_ret = from_qstring(QCoreApplication::translate(context, source, 0, n)); }
|
||||||
|
else {
|
||||||
|
l_ret = from_qstring(QCoreApplication::translate(context, source)); }
|
||||||
return l_ret; }
|
return l_ret; }
|
||||||
|
|
||||||
cl_object qlocal8bit(cl_object l_str) {
|
cl_object qlocal8bit(cl_object l_str) {
|
||||||
|
|
|
||||||
|
|
@ -54,4 +54,4 @@ function apply(arg1, arg2, arg3) {
|
||||||
|
|
||||||
function tr(source, context, pluralNumber) {
|
function tr(source, context, pluralNumber) {
|
||||||
// for i18n
|
// for i18n
|
||||||
return EQL5.apply(null, "eql:qtranslate", [context, source, (typeof(pluralNumber) == "number") ? pluralNumber : 0]); }
|
return EQL5.apply(null, "eql:qtranslate", [context, source, pluralNumber]); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue