lqt5 / lqt

Lua Binding for Qt5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lua 5.4 lua_setfenv & lua_getfenv deprecated

duerrpADA opened this issue · comments

Hi,

I tried to port lqt5 to the current lua 5.4.4 release.
Till now i was already successfully using it with a custom Lua 5.1.4 Interpreter.

I came around the problem that 'lua_setfenv' & 'lua_getfenv' (which are used in 'lqt_common.cpp") are removed from lua since version 5.2.

I tried replacing them with 'lua_setuservalue' & 'lua_getuservalue' which compiled fine but i got some strange errors during runtime:
"../common/embed/class.lua:224: attempt to index a number value (local 'k')"

At the moment i dont have another idea how to resolve this issue.

Thanks in advance.

commented

see this repo may help you: qt5...udbg:lqt:udbg

Hello,

thank you for the fast feedback.

Indeed I found the solution to the problem in that repo, now everything works with Lua 5.4.4.
The problem was actually not 'lua_setuservalue' & 'lua_getuservalue' but the changes in "class.lua" regarding the string operations.

I also noticed that you created a new "pri" branch which already has customizations for Qt 5.15.2.
It also has some other changes, so is this an unstable branch still in development or is it the new "master" branch which should be used instead of the old "qt5" branch if Qt 5.15.2 is an option?

Thanks in advance.

commented

Many changes in this branch are required by my previous work projects. I reviewed it, and the modification of cpptoxml can be used directly. Of course, if you want, you can also develop based on this branch.
This branch fixes some problems with cpptoxml's parsing of modern C++ syntax.

Will this branch be merged into mainline?
And could we see Qt6 bindings as well?