Commit Graph

27 Commits

Author SHA1 Message Date
Marcus Tillmanns
9d6c78155f Utils: Allow setting HistoryCompleter size
While the HistoryCompleter did have private functions to
change the History List length, these were not used or
accessible. This change adds an argument to allow the
caller to change the maximum size of the list.

Its used by the Lua REPL pane.

Change-Id: I6baf260db5da9d8fe58a37ff0af3ec59396a5be0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-08-06 08:07:04 +00:00
Marcus Tillmanns
61bb8d8e51 Lua: Macro support
Allows users to use "%{Lua: ...}" to execute Lua code in their macros.
Adds "Macro" module with expand() and value() functions.

Change-Id: I6315b0646fbb503a77fd0cc631aed204abf3b699
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-07-31 06:53:46 +00:00
Marcus Tillmanns
be2e5262c7 ExtensionSystem: Move Installation logic into PluginSpecs
Change-Id: I5b6d284179bf62be89d6e5157fd7e14df5e65817
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-29 11:21:56 +00:00
hjk
fa0bfa8660 Lua: Dissolve LuaEngine class
It was mostly used as namespace.

Change-Id: Ice6cdd1581d7dd70b09f6d82891b874a206a1ca0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-07-26 13:25:14 +00:00
hjk
e69ad77d3b Lua: Code cosmetics
The initialization/setup/... methods are typically called 'setupX...'
nowadays.

Change-Id: Iecdca160a54f60fbeb3dbffcc6d7aca20bc68682
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-07-26 11:58:50 +00:00
Marcus Tillmanns
1220db049e Lua: Add support for translation
Change-Id: I5398480233c830bb08c641bc8193b068fb037032
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-24 10:04:26 +00:00
Marcus Tillmanns
afa121778b Lua: Hide REPL by default
Change-Id: Ieeac4bd49cd39dc16cf9637b1a487faf024bf44a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-19 13:44:09 +00:00
Marcus Tillmanns
42e57d60ae Lua: Change TextDocument to TextEditor
Since there may be many editors editing a single TextDocument
it is more useful to start at the TextEditor level.

Change-Id: Ic1c4ea76f22ab0d0741edd6f6ecc24d6befa17e6
Reviewed-by: hjk <hjk@qt.io>
2024-07-18 12:06:34 +00:00
Marcus Tillmanns
d2e14ffe86 Lua: Cleanup Hooks
Change-Id: I8e3a1d66ea6125d2cc5ee9c8f8442cca0913fec6
Reviewed-by: <lie@spyro-soft.com>
Reviewed-by: hjk <hjk@qt.io>
2024-07-18 07:19:15 +00:00
Marcus Tillmanns
0e75f3f4f3 Lua: Add LocalSocket
Change-Id: I6601914176667100ad9007fa5e54f6d6c3f445a0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-07-18 07:04:14 +00:00
Marcus Tillmanns
3dfd1dd1a9 Lua: Add Json module
Change-Id: I533dc63b5147f00ac377e80a338cc4e2e3d0e8d9
Reviewed-by: hjk <hjk@qt.io>
2024-07-18 07:03:59 +00:00
Lukasz Papierkowski
d298244c10 Lua: Add TextDocument bindings
Change-Id: Ib713993a548f76f50c4b29fb11c445d2e38b16b3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-07-11 21:36:26 +00:00
Eike Ziller
8d99cd800b Merge remote-tracking branch 'origin/14.0'
Change-Id: Ic3c53630e16712b6493873d21485b726f0d06574
2024-07-08 10:31:06 +02:00
Christian Stenger
c43508417d Lua: Fix translation context
Change-Id: Id824eaa3c64d31e693828d90d4c0abbe7ce8dda9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-05 07:03:39 +00:00
Marcus Tillmanns
81ad004a52 Lua: Improve REPL Pane
* Replaced item editor with label to allow copy&paste
* Fixed removing global object
* Removed printing of readline prompt
* Removed keypress handler as it was unstable

Change-Id: I8091252400a3532ecc818404ad5a8edfa9451327
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-25 10:55:21 +00:00
Christian Stenger
79f7115cde Lua: Fix missing include
Amends 0214cac51d.

Change-Id: I873e9dcbe687ea579bc71ba0a687e5f2b4955817
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-25 05:58:28 +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
Marcus Tillmanns
0c0ad6e7d8 Lua: Replace -loadluaplugin with -pluginpath
Change-Id: Ic398e09dedd6ba11a73e616788b92a001e0a96bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-13 11:13:15 +00:00
Marcus Tillmanns
ddd137f3b1 Lua: Move lua plugins into normal plugin folder
Change-Id: I14ab0bb755a4279bc255673596fe084cd556433c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-13 10:26:29 +00:00
Marcus Tillmanns
249312acd0 Lua: Add -loadluaplugin startup argument
Change-Id: Ia0a57bbb94d42534857889a0d08ec41c75708dca
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 08:03:13 +00:00
hjk
42a66746e1 Lua: Rename some 'layout' bits to 'gui'
Change-Id: I1476cfe922c3d95c3c4309531bb4e063b18273e5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-31 06:15:17 +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
afae1d7093 Lua: Add macro expansion of the meta folder
Change-Id: I5c5370665002feee886aa0a7411a485edafb8469
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-23 07:19:38 +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
81bc72c8a0 Lua: Cleanup
Moves LuaEngine creation into initialize()
Removes uneccessary PluginLoader class

Change-Id: I9eddbe4d0cba7ba3c7c1ce825ec18845de7d4654
Reviewed-by: hjk <hjk@qt.io>
2024-05-06 10:11:19 +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
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