1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
Index: src/QtLua/qtluastate.hh
===================================================================
--- src/QtLua/qtluastate.hh (revision 227)
+++ src/QtLua/qtluastate.hh (working copy)
@@ -66,6 +66,7 @@
OsLib, //< standard lua os library
DebugLib, //< standard lua debug library
Bit32Lib, //< standard lua bit library
+ Utf8Lib, //< standard lua utf8 library
JitLib, //< luajit jit library
FfiLib, //< luajit ffi library
QtLuaLib, //< lua library with base functions, see the @xref{Predefined lua functions} section.
Index: src/qtluastate.cc
===================================================================
--- src/qtluastate.cc (revision 227)
+++ src/qtluastate.cc (working copy)
@@ -1021,12 +1021,18 @@
QTLUA_LUA_CALL(_lst, luaopen_debug, "debug");
return true;
-#if LUA_VERSION_NUM >= 502
+#if LUA_VERSION_NUM == 502
case Bit32Lib:
QTLUA_LUA_CALL(_lst, luaopen_bit32, "bit32");
return true;
#endif
+#if LUA_VERSION_NUM >= 503
+ case Utf8Lib:
+ QTLUA_LUA_CALL(_lst, luaopen_utf8, "utf8");
+ return true;
+#endif
+
#ifdef HAVE_LUA_JITLIB
case JitLib:
QTLUA_LUA_CALL(_lst, luaopen_jit, "jit");
@@ -1041,8 +1047,13 @@
case AllLibs:
#if LUA_VERSION_NUM >= 502
QTLUA_LUA_CALL(_lst, luaopen_coroutine, "coroutine");
+#endif
+#if LUA_VERSION_NUM == 502
QTLUA_LUA_CALL(_lst, luaopen_bit32, "bit32");
#endif
+#if LUA_VERSION_NUM >= 503
+ QTLUA_LUA_CALL(_lst, luaopen_utf8, "utf8");
+#endif
#ifdef HAVE_LUA_OSLIB
QTLUA_LUA_CALL(_lst, luaopen_os, "os");
#endif
Index: src/qtluatabletreemodel.cc
===================================================================
--- src/qtluatabletreemodel.cc (revision 227)
+++ src/qtluatabletreemodel.cc (working copy)
@@ -223,7 +223,7 @@
TableTreeKeys *t = static_cast<TableTreeKeys*>(index.internalPointer());
- Qt::ItemFlags res = (Qt::ItemFlag)(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+ Qt::ItemFlags res = (Qt::ItemIsEnabled | Qt::ItemIsSelectable);
if (t->_attr & Editable)
{
Index: src/qtluavaluebase.cc
===================================================================
--- src/qtluavaluebase.cc (revision 227)
+++ src/qtluavaluebase.cc (working copy)
@@ -158,10 +158,12 @@
v.push_value(th);
_st->_lst = th; // switch current thread State pointer
-#if LUA_VERSION_NUM < 502
+#if LUA_VERSION_NUM >= 504
+ int r = lua_resume(th, _st->_lst, args.size(), nullptr);
+#elif LUA_VERSION_NUM >= 502
+ int r = lua_resume(th, _st->_lst, args.size());
+#else
int r = lua_resume(th, args.size());
-#else
- int r = lua_resume(th, _st->_lst, args.size());
#endif
_st->_lst = lst;
|