Commit Graph

62 Commits

Author SHA1 Message Date
Marcus Tillmanns
7e9af008fc Lua: Fix Widget size property implementation
Change-Id: Ia5d9d8646815257318ad657480167b7f42b9dca9
Reviewed-by: hjk <hjk@qt.io>
2024-06-06 08:14:04 +00:00
hjk
b10d5581e4 Utils: Make LayoutBuilder setter setup less repetitive
Change-Id: I9113f7a97566c21cf83dcb95ce8e75e9707360b4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-04 12:15:37 +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
Marcus Tillmanns
7ad1e20a48 Lua: Add support for gzip files
Change-Id: Id342364ffb71b8dd2e60a4332fd1d88a4951e08a
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-03 09:15:09 +00:00
Marcus Tillmanns
1058f12a93 Install: Use QMessageBox as fallback
Use a QMessageBox if the InfoBar would be hidden.

Change-Id: I29f10a3af6123dcf7811db68b967259f990c5a66
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-03 09:15:00 +00:00
Marcus Tillmanns
cf1aa1d1bb Lua: Ask user before allowing to fetch
Change-Id: I58318598015a24689de19ae00bce65f004091e6b
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-03 06:33:03 +00:00
David Schulz
d8a582d813 Lua: Add function that returns the output of a process
Change-Id: I6863926a4da90adc89d96d47da1542c886b44040
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-03 05:06:41 +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
Marcus Tillmanns
4bbbf29e7d Lua: Remove wizard meta files
We removed the wizard stuff from lua, but I forgot to remove the documentation

Change-Id: I9d96d1d38ed4090c51361ee1e37fedb5a7358870
Reviewed-by: hjk <hjk@qt.io>
2024-05-31 08:44:23 +00:00
Marcus Tillmanns
1c6ea674d7 Lua: Add binding for FilePathAspect::setValue
Change-Id: Ia0c40f35c1504b72f56cb2d2b6dcdc721b1c9d7b
Reviewed-by: hjk <hjk@qt.io>
2024-05-31 06:16:25 +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
hjk
c96f502c6c Lua: Robustify LayoutBuilder integration
"Executing"  'Row { "a", b, "c" }' with unquoted b  previously crashed.

Change-Id: Ifb505c1a836a6041b05911e322cad596c3969e03
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-30 06:43:14 +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
hjk
ded8cf3fdb Lua: Make Layout-derived classes directly show-able
Change-Id: I2bea8187626c239b5b2e9ddb32d291db97ddc9ac
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-29 11:52:43 +00:00
Marcus Tillmanns
997f0fb624 Lua: Fix Layout.Span & Tab constructor
* Allows to use Span {...} or Span(...) syntax.
* Same for Tab {...} or Tab(...).
* Fixes some documentation issues.
* Adds "withFormAlignment()" and "spacing()"

Change-Id: I05ec0823617e99384e309f34a4861e29045eff94
Reviewed-by: hjk <hjk@qt.io>
2024-05-29 08:33:48 +00:00
hjk
91d0ca304a Lua: Fix off-by-ones in Layouting
Change-Id: I4b29ff453ab29a26ec2300f70c0d1232f30575f1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-29 06:18:03 +00:00
Alessandro Portale
7bc65cf9f3 PluginSpecs: Change URLs from http:// to https://
Avoid the redirect that is inevitable nowerdays.

Also, change necessitas.kde.org to www.qt.io, since the orgininal page
is offline.

Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 20:13:29 +00:00
hjk
ad2b0954d3 Lua: Add support for Layouting::Label
Change-Id: Id06f082262af1aed4e22d40790ad3ed6ba2b5dd9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-28 12:52:35 +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
hjk
971938421c Use LayoutBuilder V2
This puts the implementation introduced in acf1ecb47f into use, after
significant simplifications in the class hierarchy. CRTP is not used
anymore, and the new tag based dispatch is also used for Layout::addItem,
effectively reducing the number of different code paths.

The Lua based settings access is disabled for now.

Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-27 12:38:48 +00:00
David Schulz
3b8d4c968c Lua: track meta files in CMakeLists.txt
Change-Id: I72d0358b675f76fb39f340c748602dc24da7b08e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-27 03:59:31 +00:00
Christian Stenger
13ba5ac62b Lua: Fix qbs build
Install lua files to shared data by default.

Change-Id: I550f0f3a888376c93ad8b68bc7630b6f5f029979
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-24 12:22:12 +00:00
Christian Stenger
731068a6a3 Lua: Fix qbs build
Amends eec48b8f8e.

Change-Id: I0328f44a6cd33116f5ac51f8127519bf734b1879
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-24 12:22:05 +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
44afba5254 Lua: Add missing documentation
Change-Id: If171bc8725e4d3f5bcb9db6ca8e6b42324f7b764
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-05-23 12:21:41 +00:00
Marcus Tillmanns
969f3845c1 Lua: Add HostOsInfo.architecture
Change-Id: I6acbb9d960cc070335454d0d87674a782a7c930e
Reviewed-by: hjk <hjk@qt.io>
2024-05-23 12:21:28 +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
ce1f45cbfc Lua: Fix meta file install location
Change-Id: I3dcd16057bac3ba4b5e125253b48c6a03f1ca33d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-17 07:04:10 +00:00
Marcus Tillmanns
9160679b04 Lua: Add better error output to fetch()
Change-Id: Ic9092ff52130ac3cfc620ead9a1c69f112a864ac
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-17 05:13:04 +00:00
Marcus Tillmanns
50fbf6056a Lua: Install meta files
Change-Id: I5ea812f9b64fd80d64a3930bc5301c932554ce18
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-16 11:26:22 +00:00
Marcus Tillmanns
fde45e98b9 Lua: Add Error handling during hook invocation
Change-Id: I63bb062d87126278ad4f6670f5b98e31d59aa8bb
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-16 10:20:28 +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
898203aa6e Lua LSP: Add callback if server fails to start
Change-Id: I422baeffff96cf56a110cbf74716352c9104c5ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-16 07:15:48 +00:00
Marcus Tillmanns
f82a68221f Lua: Add helpful error message if await is called without async
Change-Id: Idc0b381a31ebe81709906e182d9a932e7ec7142f
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-08 11:37:11 +00:00
Marcus Tillmanns
9907c328f7 Lua: Add FilePath::(complete)Suffix and isAbsolute
Change-Id: Ifc9cc97b5c996a2bee8cd15d158411306dc3bd7d
Reviewed-by: hjk <hjk@qt.io>
2024-05-08 10:30:29 +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
b36ddaf8ec Lua: Simplify waitms
Change-Id: I3832134f91580e8c1aa4a3ab62445feaba2009a4
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-08 06:06:23 +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
Eike Ziller
3249b106e5 Make it possible to add wizards paths via plugin meta data
That makes it easy with Lua plugins, and is useful on the C++ side as
well.

Change-Id: I660956bed47e4c1e27a001ad8999d6701cda86ee
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-06 09:46:29 +00:00
Marcus Tillmanns
a8d6dde8e3 Lua: Change Process to directly use Async module
Change-Id: Ie91a308d55b06f35b2f2114a46b347d83e779db2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-06 05:59:46 +00:00
Marcus Tillmanns
6ecd0f4023 Lua: Change fetch module access to async
Change-Id: I32bd760e347e2bd4465bd028e31fb3c4ff220aa5
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-06 05:43:22 +00:00
Marcus Tillmanns
d76082da59 Lua: Make FilePath:searchInPath async
Change-Id: Ida94856c26bab38d95753fb4d5475d57e3315212
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-06 05:38:05 +00:00
Marcus Tillmanns
adcea41617 Lua: Make FilePath:dirEntries async
Change-Id: I0d1a918a34ca1fefe1dffdf4c5d766e6bb7aaf77
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-03 12:44:02 +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
8fa9a25d08 Lua: Fix lua Qt type registration
Change-Id: I542ce8561e61cd0753525347b42711f804b208ff
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-03 06:01:39 +00:00
Marcus Tillmanns
30901b86a4 Lua: Add more error output
We were missing error message when the error occurred
during a.sync(...) calls.

This adds error output in those cases.

Change-Id: If66772b4a71bb909aff7129243824fc5343c66a1
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-03 05:59:38 +00:00
Marcus Tillmanns
0543085a64 Lua: Add luatemplates
Change-Id: Icc9e7505156eb8749da64e1f4022f27a57018a67
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-04-30 04:48:23 +00:00
Marcus Tillmanns
87193a0311 Lua: Fix leaking Actions
Change-Id: Ia2fd5eecfd76491c34650817e09be11252be1dec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-04-30 04:28:50 +00:00