forked from qt-creator/qt-creator
Lua: Add access for plugin application data path
Change-Id: Ib5f60818b8b2590d3a5d09a7900110956f98b4cf Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -72,7 +72,9 @@ QObject *ScriptPluginSpec::setup(
|
|||||||
"name",
|
"name",
|
||||||
sol::property([](ScriptPluginSpec &self) { return self.name; }),
|
sol::property([](ScriptPluginSpec &self) { return self.name; }),
|
||||||
"pluginDirectory",
|
"pluginDirectory",
|
||||||
sol::property([pluginLocation]() { return pluginLocation; }));
|
sol::property([pluginLocation]() { return pluginLocation; }),
|
||||||
|
"appDataPath",
|
||||||
|
sol::property([appDataPath]() { return appDataPath; }));
|
||||||
|
|
||||||
auto guardObject = std::make_unique<QObject>();
|
auto guardObject = std::make_unique<QObject>();
|
||||||
auto guardObjectPtr = guardObject.get();
|
auto guardObjectPtr = guardObject.get();
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
---@class PluginSpec
|
---@class PluginSpec
|
||||||
---@field name string The name of the plugin.
|
---@field name string The name of the plugin.
|
||||||
---@field pluginDirectory FilePath The directory of the plugin.
|
---@field pluginDirectory FilePath The directory of the plugin.
|
||||||
|
---@field appDataPath FilePath The application data directory of the plugin.
|
||||||
PluginSpec = {}
|
PluginSpec = {}
|
||||||
---The global qtc object defined in the Lua plugin.
|
---The global qtc object defined in the Lua plugin.
|
||||||
---@class qtc
|
---@class qtc
|
||||||
|
Reference in New Issue
Block a user