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
|
||||
*.slo
|
||||
*.lo
|
||||
|
@ -18,7 +15,6 @@
|
|||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
|
@ -30,3 +26,10 @@
|
|||
*.exe
|
||||
*.out
|
||||
*.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();
|
||||
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)
|
||||
|
|
|
@ -28,7 +28,7 @@ class LUAENGINEGUISHARED_EXPORT LuaEngineGui : public LuaEngine
|
|||
Q_OBJECT
|
||||
public:
|
||||
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(LuaEngine *luaEngine);
|
||||
static int showMessageBox(lua_State *L_p);
|
||||
|
|
Loading…
Reference in a new issue