forked from qt-creator/qt-creator
Lua: Bind lifetime of LuaEngine
We want to make sure that the LuaEngine is deleted when the plugin is removed. We also derive LuaEngine from QObject so we can use it as a guard in QObject::connect calls. Change-Id: I6b0568f11bee283f880ede9432b2a9fe83014758 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -24,14 +24,20 @@ namespace Lua {
|
||||
class LuaEnginePrivate;
|
||||
class LuaPluginSpec;
|
||||
|
||||
namespace Internal {
|
||||
class LuaPlugin;
|
||||
}
|
||||
|
||||
struct CoroutineState
|
||||
{
|
||||
bool isMainThread;
|
||||
};
|
||||
|
||||
class LUA_EXPORT LuaEngine
|
||||
class LUA_EXPORT LuaEngine final : public QObject
|
||||
{
|
||||
private:
|
||||
friend class Internal::LuaPlugin;
|
||||
|
||||
protected:
|
||||
LuaEngine();
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user