aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/luapluginspec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use QStringList instead of QList<QString>Alessandro Portale2025-10-021-1/+1
| | | | | Change-Id: I56fabbfe32ab579ef5e9f7c8cc5fde220b99769a Reviewed-by: Jarek Kobus <[email protected]>
* Avoid including multiple Tr classesEike Ziller2025-09-261-2/+0
| | | | | | | | | | | | | | | | | | | | lupdate has issues finding the right translation context if there are both Tr::tr calls that should be resolved via a `namespace <name> {` scope, and another `using namespace <other>` with a namespace that has another Tr class. Many of the cases of this that we have were editor display names that were defined in the Core plugin for reasons unknown, and which would better be defined in the corresponding plugin anyway. For the other cases do not use Tr::tr from a different plugin, but instead introduce "msg<Something>" functions that do the Tr call plugin- internally. That is the "correct" way to do it anyway, since shared strings should be changeable centrally. Task-number: QTBUG-140548 Change-Id: Idacf62b400f50789b5e5957b690e16aa1ebe5a56 Reviewed-by: Christian Stenger <[email protected]>
* Utils: Move and rename result testing macros from expected.h to result.hhjk2025-04-141-1/+0
| | | | | Change-Id: I65d682054d4774b8937ecce9728a9d2f2e75cc2a Reviewed-by: Jarek Kobus <[email protected]>
* Replace most expected_str by Utils::Resulthjk2025-04-111-2/+2
| | | | | | | | Keep it in Axivion dto, which is generated. Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
* Lua: Fix LuaPluginSpec::killMarcus Tillmanns2025-04-011-0/+3
| | | | | | | | | | Killing should only set "Deleted" status if the plugin was actually loaded in the first place. Amends dfb85bf8a2ebd6b8431b310e5e2b64bba25d61fc Change-Id: Iebd6711616523b7808dc646211fc9d5a3b949450 Reviewed-by: Eike Ziller <[email protected]>
* ExtensionSystem: Add Type="Script" to configure dependency resolutionMarcus Tillmanns2025-03-251-31/+5
| | | | | | | | | | | We need some hint in the plugins metadata that tells us whether the plugin is a script or a c++ plugin. Otherwise we cannot tell by the metadata alone how to resolve dependencies. This is necessary for the ExtensionBrowser which does not have any other way to detect the type of an extension. Change-Id: I61eb8f91fb079cf59cc8470f95a13c9c6fa75634 Reviewed-by: Eike Ziller <[email protected]>
* Lua: Use string_view literals as keys when calling get() and get_or()Marcus Tillmanns2025-02-211-1/+2
| | | | | | | | | | | A bug in gcc (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438) creates a lot of warnings when using get_or with a simple "" string. To workaround, we create a string_view literal in place to workaround it. Change-Id: I3167c8f9c525a9b265a2c69a7ddadad0fe13ea71 Reviewed-by: hjk <[email protected]>
* Lua: Fix tear-down of lua pluginsMarcus Tillmanns2025-01-311-3/+7
| | | | | Change-Id: Ia556d59b717aef1c8e4fb0fb06010214786d0519 Reviewed-by: Eike Ziller <[email protected]>
* Lua: Bump version number to 15Marcus Tillmanns2024-09-101-0/+10
| | | | | | | | Also adds exception if LuaCompatibleVersion is higher than spec version (during development) Change-Id: I39ab3b19e438c4c1691a2db18d884b9dbd417b19 Reviewed-by: Marcus Tillmanns <[email protected]>
* ExtensionSystem: Add PluginId and VendorIdMarcus Tillmanns2024-09-021-2/+2
| | | | | Change-Id: I4f47f95e1f4ff4af73c2b81320087b4592007993 Reviewed-by: Alessandro Portale <[email protected]>
* Lua: Introduce LuaCompatibleVersionMarcus Tillmanns2024-07-301-4/+13
| | | | | | | | | The new field "LuaCompatibleVersion" is required when a lua plugin depends on a C++ plugin. A dependency will be fulfilled if: "LuaCompatibleVersion <= dependency.version <= Version" Change-Id: I61466055a56e20abbb1fa5f73a5735a0e3a4c471 Reviewed-by: Eike Ziller <[email protected]>
* ExtensionSystem: Move Installation logic into PluginSpecsMarcus Tillmanns2024-07-291-0/+8
| | | | | Change-Id: I5b6d284179bf62be89d6e5157fd7e14df5e65817 Reviewed-by: Alessandro Portale <[email protected]>
* Lua: Dissolve LuaEngine classhjk2024-07-261-3/+2
| | | | | | | It was mostly used as namespace. Change-Id: Ice6cdd1581d7dd70b09f6d82891b874a206a1ca0 Reviewed-by: Marcus Tillmanns <[email protected]>
* Lua: Add support for translationMarcus Tillmanns2024-07-241-1/+17
| | | | | Change-Id: I5398480233c830bb08c641bc8193b068fb037032 Reviewed-by: Eike Ziller <[email protected]>
* Extensions: Edit UI textLeena Miettinen2024-06-261-3/+3
| | | | | | | | | | | - Add dots to ends of messages - Replace "plugin" with "extension" in translatable text - Fix capitalization of headings and button labels - Change wording Change-Id: I24a3ca6de6a5a0a4509bab34ad2f50cbcf40c73a Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Leena Miettinen <[email protected]>
* Lua: Don't destroy lua state too earlyMarcus Tillmanns2024-06-201-5/+2
| | | | | | | | | The Lua state needs to stay alive as long as any references to it may be alive. Therefore this patch leaves the destruction to the end. Fixes: QTCREATORBUG-31087 Change-Id: Ic49723575f7d2fe474cba9546845b65d57d7dcd0 Reviewed-by: Eike Ziller <[email protected]>
* Lua: Implement lua pluginspec specific version checkMarcus Tillmanns2024-06-131-0/+14
| | | | | Change-Id: I52c496c177c949056ff5e7a4ff7b903a028620b1 Reviewed-by: Eike Ziller <[email protected]>
* Lua: Improve memory managementMarcus Tillmanns2024-05-311-19/+20
| | | | | | | | | | | | | Previously the PluginSpec would create a keep around a single lua vm that was then shared with the actual plugin instance. This made it unclear when the VM was freed. Now we instead cleanup the lua vm used to fetch the plugin infos immediately and instead create a fresh vm for the actual plugin instance that can then follow the normal Plugin lifecylce. Change-Id: I81bb9ecf57706c2ba1b0d8db83ab26b3b8e944f2 Reviewed-by: David Schulz <[email protected]>
* Lua: Add "printToOutputPane" plugin optionMarcus Tillmanns2024-05-161-0/+5
| | | | | | | | | Allows a plugin to automatically forward the "print" command to the output pane instead of only to qDebug() Change-Id: I10fb8063bc1713eaaf77368ea7f760270df190b3 Reviewed-by: <[email protected]> Reviewed-by: David Schulz <[email protected]>
* ExtensionSystem: FilePath'ifyMarcus Tillmanns2024-05-081-2/+2
| | | | | | | | Change IPlugin::fileName() and IPlugin::location to use FilePath instead of QString. Change-Id: If473ab1e258951735f93221cbd62c505f0727eb2 Reviewed-by: hjk <[email protected]>
* Lua: Fix soft loadingMarcus Tillmanns2024-04-231-7/+8
| | | | | | | | | | | | | | | | | | | Previously the LuaEngine::loadPlugin() function tried to fully setup the lua interpreter. This was called before the dependencies of a lua plugin were fully soft loaded. Therefore the dependent lua packages had not been registered yet. This patch changes that to where the packages and lua libraries are only loaded right before the actual setup call is done. This also allows us to safely load the plugin spec without giving it access to all the functionality directly. In the future we could show and ask the user before we load the plugin whether he agrees to give it the requested access. Change-Id: Ibf3e81db54e2ba94473e8ecf2650dcf2e97f1360 Reviewed-by: <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
* Lua: Add Lua plugin supportMarcus Tillmanns2024-04-161-0/+140
Adds basic support for writing Plugins using the lua scripting language. Lua Plugins are registered just as native plugins are and can be enabled or disabled via the plugin dialog. see src/plugins/lua/README.md for further details. Change-Id: I9f4d15e9632c46e1c6c132bcd0bbcdd70b150640 Reviewed-by: Eike Ziller <[email protected]>