forked from qt-creator/qt-creator
Lua: Fix build
Change-Id: I908495a3e0f3ebb03291aed9256a50678320b4ee Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -394,7 +394,7 @@ QStringList variadicToStringList(const sol::variadic_args &vargs)
|
|||||||
size_t l;
|
size_t l;
|
||||||
const char *s = luaL_tolstring(vargs.lua_state(), int(i), &l);
|
const char *s = luaL_tolstring(vargs.lua_state(), int(i), &l);
|
||||||
if (s != nullptr)
|
if (s != nullptr)
|
||||||
strings.append(QString::fromUtf8(s, l).replace('\0', "\\0"));
|
strings.append(QString::fromUtf8(s, l).replace(QLatin1Char('\0'), "\\0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings;
|
return strings;
|
||||||
|
@@ -129,7 +129,7 @@ sol::usertype<T> runtimeObject(sol::state_view lua)
|
|||||||
|
|
||||||
void registerUiBindings()
|
void registerUiBindings()
|
||||||
{
|
{
|
||||||
LuaEngine::registerProvider("Qt.Gui", [](sol::state_view lua) {
|
registerProvider("Qt.Gui", [](sol::state_view lua) {
|
||||||
runtimeObject<QObject>(lua);
|
runtimeObject<QObject>(lua);
|
||||||
runtimeObject<QWidget, QObject>(lua);
|
runtimeObject<QWidget, QObject>(lua);
|
||||||
runtimeObject<QDialog, QWidget, QObject>(lua);
|
runtimeObject<QDialog, QWidget, QObject>(lua);
|
||||||
|
Reference in New Issue
Block a user