Commit Graph

18 Commits

Author SHA1 Message Date
Eike Ziller
8dccc9c59e Merge remote-tracking branch 'origin/14.0'
Conflicts:
	src/plugins/qmljseditor/qmljseditorsettings.cpp

Change-Id: I443424afdfe48cdfc3d083d8e91335e937fcfdb6
2024-06-27 11:41:54 +02:00
Leena Miettinen
a81e4fb277 Extensions: Edit UI text
- 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 <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-26 14:09:17 +00:00
Eike Ziller
44e36686c8 Fix lupdate issues
Change-Id: Ie71649f38e29c2fd6f644e023772f15865d6e6aa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-25 13:51:50 +00:00
Marcus Tillmanns
0214cac51d Lua: Interactive Shell
Change-Id: Iedd620abcb62b9dd3e640bcb80ae011016386484
Reviewed-by: hjk <hjk@qt.io>
2024-06-24 14:29:31 +00:00
David Schulz
6e648ee931 Lua: fix "conversion from 'size_t' to 'int'" warning
Change-Id: Ibb6b17f82ebf992a48b29570c829376ef142ea10
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-20 09:19:33 +00:00
Marcus Tillmanns
04abc375f5 Lua: Improve memory management
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 <david.schulz@qt.io>
2024-05-31 12:21:03 +00:00
hjk
efae651924 Utils: Introduce a convenience function creatorColor()
... forwarding to creatorTheme()->color(...)

Change-Id: Iefaa043495127b3e500ed225584481d3ec0f8c1f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 13:49:25 +00:00
Marcus Tillmanns
bd50ee7573 Lua: Implement Utils::Lua
Change-Id: Ib5a7f63d1c37b29beb424707962d21102db5927c
Reviewed-by: hjk <hjk@qt.io>
2024-05-28 11:55:07 +00:00
Marcus Tillmanns
b9f2808384 Lua: Add connection guard
Improves safety by limiting connection lifetime to
lifetime of lua vm.

Change-Id: I508b0814fdda169f5e30d7c3282132e3c622a0a5
Reviewed-by: hjk <hjk@qt.io>
2024-05-28 11:13:20 +00:00
Marcus Tillmanns
61119270f3 Lua: Fix compile on linux with clang and gcc std
Change-Id: I030e97678f45499973a27ba4e9e2c9d99dc3e298
Reviewed-by: hjk <hjk@qt.io>
2024-05-27 14:24:22 +00:00
Marcus Tillmanns
eec48b8f8e Lua: Add Install module
Allows plugins to install packages they might need.

Change-Id: I4948dd0a6568e093fc35e4486d2e2a084090e103
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-24 09:10:20 +00:00
Marcus Tillmanns
58f596e36a Lua: Add "printToOutputPane" plugin option
Allows a plugin to automatically forward the "print" command to
the output pane instead of only to qDebug()

Change-Id: I10fb8063bc1713eaaf77368ea7f760270df190b3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 09:22:36 +00:00
Marcus Tillmanns
657ce51467 ExtensionSystem: FilePath'ify
Change IPlugin::fileName() and IPlugin::location to use
FilePath instead of QString.

Change-Id: If473ab1e258951735f93221cbd62c505f0727eb2
Reviewed-by: hjk <hjk@qt.io>
2024-05-08 10:29:59 +00:00
Marcus Tillmanns
218f07bdef 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>
2024-05-03 12:43:55 +00:00
Marcus Tillmanns
9f99cf80f0 Lua: Fix soft loading
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: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-04-23 11:05:21 +00:00
Marcus Tillmanns
bc5b67909c Lua: Cleanup code style
Change-Id: I7d8713c87a097f113c5b9d04104f3948b691dbf9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-23 06:50:22 +00:00
Marcus Tillmanns
f91d071c66 Lua: Clean up pass
Fixing constness, removing unused function, adding LuaEngine::variadicToStringList

Change-Id: If567ac83c04e5ce6f973c819f303c9cb790b3948
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-04-19 13:54:11 +00:00
Marcus Tillmanns
6e3aab5f1b Lua: Add Lua plugin support
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 <eike.ziller@qt.io>
2024-04-16 13:11:18 +00:00