revisions

This commit is contained in:
pls.153 2022-03-30 10:31:46 +02:00
parent 81e53f5eac
commit 0aed433b52
4 changed files with 7 additions and 8 deletions

View file

@ -1,5 +1,4 @@
#ifndef LIB_H
#define LIB_H
#pragma once
#include <QtCore>
@ -25,5 +24,3 @@ public:
};
QT_END_NAMESPACE
#endif

View file

@ -66,7 +66,7 @@
(defun create-item (type)
(let* ((name (string-downcase type))
(item (qjs |makeItem| ui:*dynamic* name)))
(item (qjs |createItem| ui:*dynamic* name)))
(q> |source| item
(find-file (format nil "qml/img/~A.png" name)))
(q> |objectName| item name)
@ -144,7 +144,6 @@
(reset-maze)
(x:do-string (ch (nth (level) sokoban:*solutions*))
(when *level-changed*
(setf *level-changed nil)
(return-from solve))
(sokoban:move (case (char-downcase ch)
(#\u :north)

View file

@ -8,7 +8,7 @@ Item {
property Component player: Qt.createComponent("dynamic/Player.qml")
property Component fixed: Qt.createComponent("dynamic/Fixed.qml")
function makeItem(name) {
function createItem(name) {
switch (name) {
case "object": return box.createObject()
case "object2": return box2.createObject()

View file

@ -1,7 +1,7 @@
// all-in-one header to include in Qt plugin source files which want to call
// ECL functions through 'ecl_fun()'
//
// does not depend on LQML
// independent from the LQML lib -- can be used in any Qt app
#pragma once
@ -397,6 +397,9 @@ QVariant ecl_fun(const QByteArray& pkgFun,
const QVariant& a14,
const QVariant& a15,
const QVariant& a16) {
// N.B: always include the package name in ECL function calls from C++, like
// 'ecl_fun("cl:format", ...);' to prevent useless error messages from ECL
// like "the function NIL is undefined"
void* symbol = lisp_functions.value(pkgFun);
if (!symbol) {
int p = pkgFun.indexOf(':');