mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-12-22 03:45:32 +01:00
improve pushEngine
This commit is contained in:
parent
fbcdbbc524
commit
6cd4614371
3 changed files with 11 additions and 8 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -1,6 +1,3 @@
|
||||||
# Prerequisites
|
|
||||||
*.d
|
|
||||||
|
|
||||||
# Compiled Object files
|
# Compiled Object files
|
||||||
*.slo
|
*.slo
|
||||||
*.lo
|
*.lo
|
||||||
|
@ -18,7 +15,6 @@
|
||||||
|
|
||||||
# Fortran module files
|
# Fortran module files
|
||||||
*.mod
|
*.mod
|
||||||
*.smod
|
|
||||||
|
|
||||||
# Compiled Static libraries
|
# Compiled Static libraries
|
||||||
*.lai
|
*.lai
|
||||||
|
@ -30,3 +26,10 @@
|
||||||
*.exe
|
*.exe
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
# Qt project user file
|
||||||
|
*.pro.user
|
||||||
|
|
||||||
|
# Gettext translation files
|
||||||
|
*.po
|
||||||
|
*.pot
|
||||||
|
|
|
@ -34,12 +34,12 @@ LuaEngineGui::LuaEngineGui(QObject *parent, bool loadBaseLibraries) : LuaEngine(
|
||||||
{
|
{
|
||||||
L = luaState();
|
L = luaState();
|
||||||
pushClass(L);
|
pushClass(L);
|
||||||
pushEngine();
|
pushEngine(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaEngineGui::pushEngine()
|
void LuaEngineGui::pushEngine(lua_State *L_p)
|
||||||
{
|
{
|
||||||
pushPointer("__LuaEngineGui", (void*)this);
|
pushPointer(L_p, "__LuaEngineGui", (void*)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaEngineGui::pushClass(lua_State *L_p)
|
void LuaEngineGui::pushClass(lua_State *L_p)
|
||||||
|
|
|
@ -28,7 +28,7 @@ class LUAENGINEGUISHARED_EXPORT LuaEngineGui : public LuaEngine
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
LuaEngineGui(QObject *parent = nullptr, bool loadBaseLibraries = true);
|
LuaEngineGui(QObject *parent = nullptr, bool loadBaseLibraries = true);
|
||||||
void pushEngine();
|
void pushEngine(lua_State *L_p);
|
||||||
static void pushClass(lua_State *L_p);
|
static void pushClass(lua_State *L_p);
|
||||||
static void pushClass(LuaEngine *luaEngine);
|
static void pushClass(LuaEngine *luaEngine);
|
||||||
static int showMessageBox(lua_State *L_p);
|
static int showMessageBox(lua_State *L_p);
|
||||||
|
|
Loading…
Reference in a new issue