Lua: Dissolve LuaEngine class

It was mostly used as namespace.

Change-Id: Ice6cdd1581d7dd70b09f6d82891b874a206a1ca0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2024-07-26 14:49:40 +02:00
parent e429a11fd7
commit fa0bfa8660
21 changed files with 166 additions and 217 deletions

View File

@@ -54,7 +54,7 @@ expected_str<LuaPluginSpec *> LuaPluginSpec::create(const FilePath &filePath, so
if (!pluginTable.get_or<sol::function>("setup", {}))
return make_unexpected(QString("Plugin info table did not contain a setup function"));
QJsonValue v = LuaEngine::toJson(pluginTable);
QJsonValue v = toJson(pluginTable);
if (luaPluginSpecLog().isDebugEnabled()) {
qCDebug(luaPluginSpecLog).noquote()
<< "Plugin info table:" << QJsonDocument(v.toObject()).toJson(QJsonDocument::Indented);
@@ -120,8 +120,7 @@ bool LuaPluginSpec::initializePlugin()
std::unique_ptr<sol::state> activeLuaState = std::make_unique<sol::state>();
expected_str<sol::protected_function> setupResult
= LuaEngine::instance().prepareSetup(*activeLuaState, *this);
expected_str<sol::protected_function> setupResult = prepareSetup(*activeLuaState, *this);
if (!setupResult) {
setError(Lua::Tr::tr("Cannot prepare extension setup: %1").arg(setupResult.error()));