diff --git a/examples/M-modules/quick/9999/lisp/qml-lisp.lisp b/examples/M-modules/quick/9999/lisp/qml-lisp.lisp index 58c1e29..dc34fcf 100644 --- a/examples/M-modules/quick/9999/lisp/qml-lisp.lisp +++ b/examples/M-modules/quick/9999/lisp/qml-lisp.lisp @@ -62,8 +62,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/9999/qml/main.qml b/examples/M-modules/quick/9999/qml/main.qml index 53f0882..bb4c387 100644 --- a/examples/M-modules/quick/9999/qml/main.qml +++ b/examples/M-modules/quick/9999/qml/main.qml @@ -26,6 +26,7 @@ Rectangle { ctx.reset() ctx.strokeStyle = "blue" ctx.lineWidth = 10 + ctx.lineCap = "round" ctx.translate(110, 160) Lisp.call("eql-user:paint") @@ -40,7 +41,6 @@ Rectangle { width: parent.width anchors.bottom: parent.bottom horizontalAlignment: Qt.AlignHCenter - maximumLength: 4 text: "0000" inputMask: "9999" diff --git a/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp b/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp +++ b/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/item-model/qml-lisp.lisp b/examples/M-modules/quick/item-model/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/item-model/qml-lisp.lisp +++ b/examples/M-modules/quick/item-model/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/painted-item/qml-lisp.lisp b/examples/M-modules/quick/painted-item/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/painted-item/qml-lisp.lisp +++ b/examples/M-modules/quick/painted-item/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/palindrome-2/qml-lisp.lisp b/examples/M-modules/quick/palindrome-2/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/palindrome-2/qml-lisp.lisp +++ b/examples/M-modules/quick/palindrome-2/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/qml-lisp/qml-lisp.lisp b/examples/M-modules/quick/qml-lisp/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/qml-lisp/qml-lisp.lisp +++ b/examples/M-modules/quick/qml-lisp/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/sokoban/lisp/qml-lisp.lisp b/examples/M-modules/quick/sokoban/lisp/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/sokoban/lisp/qml-lisp.lisp +++ b/examples/M-modules/quick/sokoban/lisp/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/examples/M-modules/quick/table-view/qml-lisp.lisp b/examples/M-modules/quick/table-view/qml-lisp.lisp index 4381ad2..1930a75 100644 --- a/examples/M-modules/quick/table-view/qml-lisp.lisp +++ b/examples/M-modules/quick/table-view/qml-lisp.lisp @@ -60,8 +60,11 @@ (when (rest list) (write-char #\,)))) (float - ;; cut off Lisp specific notations - (princ (string-right-trim "dl0" (princ-to-string object)))) + ;; JS can't read 'd0' 'l0' + (let ((str (princ-to-string object))) + (x:when-it (position-if (lambda (ch) (find ch "dl")) str) + (setf (char str x:it) #\e)) + (princ str))) (t (cond ((eql 't object) (princ "true")) diff --git a/lib/qml-ui-vars.lisp b/lib/qml-ui-vars.lisp index 97eef2b..448cb36 100644 --- a/lib/qml-ui-vars.lisp +++ b/lib/qml-ui-vars.lisp @@ -16,7 +16,8 @@ (in-package :qml-ui-variables) -(defparameter *qml-items* (qfind-children qml:*quick-view*)) +(defparameter *qml-items* (qfind-children #+sailfish (qml:root-item) + #-sailfish qml:*quick-view*)) (defun class-name* (item) (let ((name (|className| (|metaObject| item)))) @@ -46,8 +47,7 @@ (flet ((one-space (s) (x:join (remove-if 'x:empty-string (x:split s))))) (let ((s (ext:run-program "grep" (list "-rn" - "--include" - "*.qml" + #-sailfish "--include" #-sailfish "*.qml" (format nil "objectName:[[:space:]]*~S" name) "qml/")))) (loop :for line = (read-line s nil nil)