Commit Graph

288 Commits

Author SHA1 Message Date
hjk
1f5fef5132 Meson: Use Utils::FilePaths in parser
Change-Id: Idb256110e519c642420580ebd159bcffa11c0f1b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-02-05 07:08:12 +00:00
hjk
508189339d Meson: Consolidate parsers
Change-Id: I9c09d22af12a116ea15fcda793bcccd5a12ff840
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-02-05 07:06:44 +00:00
hjk
3569dbd42e Meson: Fix crash
Amends 4cbdd443fe. The captured pointer died too early.

Change-Id: I82433bee4ee41d913e1cf47db5c9b9446f501520
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-30 15:43:15 +00:00
hjk
4cbdd443fe Meson: Use ActionBuilder to set up actions
Change-Id: If84acd6cf89d9375714de703c2aed889bc2cb75b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-30 13:56:03 +00:00
hjk
0e531fa453 Meson: Use setup function for MesonActionsManager
Remove the now-empty MesonProjectPluginPrivate.

Change-Id: I58d9d9338a2ad96d574daa407e35cf8f26843719
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-30 08:33:49 +00:00
hjk
0ef72f3c6c Meson: Use setup functions for more plugin items
Change-Id: Ibbb2526d1db980389487e599ddf53e4785d97b5e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-30 08:01:16 +00:00
hjk
9a44a543a5 Meson: Use setup functions for a few plugin items
Change-Id: I849698315cd8c03ab44317d90dd3754dcfe46146
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-30 08:00:30 +00:00
hjk
ce1e565a10 Utils: Also rename parameteraction.{h,cpp} to action.{h,cpp}
Change-Id: I203909d9b2d460012b9347d507ac7a701700c48a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-29 14:23:39 +00:00
hjk
66b50438d8 Utils: Rename ParameterAction into Action
It became the defacto-type for action when ActionBuilder started
creating them as default.

Change-Id: I1008d60b78ea83919ce1c80a7ef828527fe9902c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-29 13:01:29 +00:00
hjk
d0d0d3b83a Rename a few more ToolChain items to Toolchain
Change-Id: I78e12e6923242fcb72cdde6284185574b8792fc6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-23 11:09:32 +00:00
Jarek Kobus
290121bc21 Process: Use more rawStd{Out,Err} const methods instead of mutable ones
Avoid using readAllStandard{Output,Error} mutable methods if possible.
Use non-mutable methods when we are not connected to
readyReadStandard{Output,Error} signals.

Change-Id: I2e830e571b9eab2177fd856bbe06dfc5137d9c01
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 17:21:25 +00:00
Jarek Kobus
04b80f092a ProcessProgress: Add setExpectedDuration() method
This is not the same as process timeout, so make these two
settings orthogonal.

Change-Id: I3fc774c183282fe770feb49258d77d0ce3637b38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 10:13:46 +00:00
Dominik Holland
c81efc39c8 Create RunConfiguration specific DebugWorkerFactories
Instead of relying on the DebuggerRunWorkerFactory to match for all
RunConfiguration, every plugin needs to create a WorkerFactory for
its own RunConfiguration.

Similar to the SimpleTargetRunnerFactory there is now a
SimpleDebugRunnerFactory which makes the setup easy.

Change-Id: I25aaabcd70f7ac649baeab4eb4c7e88d53dac91e
Reviewed-by: hjk <hjk@qt.io>
2024-01-17 10:17:41 +00:00
hjk
016936a450 Clean up some lambdas
Change-Id: Id947c0935b1aa4579e1c64d3e510db41103fbe27
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-12-12 10:55:32 +00:00
hjk
27ef041d28 ProjectExplorer: Some more ToolChain->Toolchain renamings
Change-Id: I5cb2adf544a846f45f7fe7ce60f67b10ad100d91
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-12 08:14:59 +00:00
hjk
3bbda8f9da ProjectExplorer: Rename Tool{C,c}hainKitAspect
Change-Id: I74460b6402ab00f972c208023f03fac617982a11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 13:35:28 +00:00
hjk
c28fb1fdbe ProjectExplorer: Rename ToolChain to Toolchain
Change-Id: Ibb520f14ff3e2a6147ca5d419b9351c50c141063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 15:18:24 +00:00
Alessandro Portale
f96feadad0 Fix missing overrides and redundant virtual
Change-Id: Id2a247b6032602c2295d928067c2462d3f9b5221
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-14 14:27:45 +00:00
hjk
fc7c11fb65 ProjectExplorer: Consolidate creation of KitAspect's "Manage..."
Change-Id: I001a21f41bcd5ff0614bdf98893b56137c06546f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-08 09:52:26 +00:00
hjk
2a5a2ca9f0 Meson: Remove dependency from CppEditor
Not needed anymore.

Change-Id: I597821a56d374a8d800f2fde43b78805ee1e0278
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 14:53:03 +00:00
hjk
b89baec2c1 ProjectExplorer: Promote CppProjectUpdaterInterface
... to ProjectExplorer::ProjectUpdaterInterface and generalize it
regarding language, but create a convience function for the C++
case, as that's the only user right now.

Also add the self-registering factory boilerplate and adapt all
buildsystems.

Change-Id: If928512609d41c25fad2aa58633c8bffabc4c48f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 14:50:10 +00:00
hjk
5c52bdd0e9 Meson: Hide plugin class definition in .cpp file
Not meant to be used outside.

Change-Id: Ic9de5cd19d01e25c2d24ee3b03dd60c61fc6f205
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-02 12:24:37 +00:00
Orgad Shaneh
96abaa9d5d Meson: Add missing member initialization
Coverity-Id: 1568464
Change-Id: I13baf0f7c807475d4a8452771579407565d6a3e2
Reviewed-by: hjk <hjk@qt.io>
2023-10-02 08:22:48 +00:00
hjk
071416fde3 Meson: Move some code out of visible plugin setup
Background for the activity here is that this plugin's setup activities
take on my machine around 0.2s on Creator during Creator startup and
I'd like to reduce that a bit.

Change-Id: I880a0b5ce5c4dce52a041b6a3ef9dc3cef346adb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-28 07:04:03 +00:00
hjk
7bf1b6e586 Meson: De-noise project parser a bit
Change-Id: Ic0b19e5a1e10057f750c2ad13f61c09f1105d05d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-28 07:03:57 +00:00
hjk
895f8e7396 Meson: Merge MesonProcess into project parser file pair
Only used there.

Also remove the translation line in the test project to help
with incomplete Qt 5 installations.

Change-Id: Id7029b499cec69a7e1733e2ac4ade9026c522951
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-28 07:00:21 +00:00
Christian Kandeler
a217fa0c22 qbs build: Clean up testing infrastructure
- Rename ambiguously named "testsEnabled" property to "withPluginTests"
  and fix the wrong uses.
- Move AutotestRunner out of main project file and into tests.qbs.
- Move "withAutotests" property into qtc module. We cannot remove it
  from the main project file just yet, because some manual tests do not
  make use of QtcManualTest at the moment.
- Do not remove the autotests from the project tree if autotests are
  disabled. Instead, just disable the products.

Change-Id: I74a4cc717d9adbe53d37536b2565111e1617115b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-19 13:16:28 +00:00
hjk
a475632c66 Utils: Make TreeViews use setUniformRowHeights by default
When applicable, the flag makes a significant difference in
performacnce. However is easily forgotten in cases where it
is applicable, and cases where it is accidentally used are
easily spotted visually. So arguably, opt-out is a better
default than opt-in.

Change-Id: I88aeb05b42533ba4e23c39573a3ddd016343cd55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-05 07:24:21 +00:00
hjk
9679412a23 Replace QFile::exists by QFileInfo::exists
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.

Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-01 10:24:31 +00:00
hjk
41184bc9fc Utils: Use numberedKey(Key, int) more wildly
Will ease transition to a key class that doen's have ::number()

Change-Id: Ib2f2957c916f41b0731a2033422bfbf7e429bcc8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-30 09:57:23 +00:00
hjk
23149b27ab Utils: Introduce variantFromStore and storeFromVariant
These are functional replacements for
  QVariant::fromValue(QVariantMap) (or QVariant::fromValue(Store)) and
  QVariant::toMap() (or QVariant::toValue<Store>())

We will have a few code paths in the end that need to explicitly
operarate on both QVariantMap and Store (e.g. actual reading/writing
to keep format compatibility etc), so these can't in the end be
simple to/fromValue(OneType) but need an internal 'if' or such.

Change-Id: I954f3cb24fa8fe123162b72bbd25d891dd19b768
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-28 11:16:40 +00:00
hjk
8d0aa34bfc Plugins: A bit more Keys and Store
Change-Id: Iee55eeaa881dd9f2047fdbe95ad8d827f4ba34e0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 08:00:02 +00:00
hjk
5254765e16 ProjectExplorer: Re-organize KitAspect layouting related functions
Less obscure as it's fairly close to the standard pattern now.

Change-Id: I4680465fbdb9fb6a458c18ef0534e4d8a4a31d1e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-24 08:40:32 +00:00
hjk
6e307be365 Utils: Rename the new Storage to Store
Apparently that's what the young people on the web use for such a thing.

Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-24 05:56:57 +00:00
hjk
dc6b40a5c0 Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-23 14:30:50 +00:00
hjk
6216c0e924 ProjectExplorer: Don't use object names for KitAspectFactories
Not used. Also the debugger knows the typename and these are
singletons.

Change-Id: I577241876318aa2930bbc36f454846ffa47cb571
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-23 05:38:50 +00:00
hjk
b509006d1c MesonProjectManager: Hide KitAspectFactory implementations
Change-Id: I7ba81771475905f63f4696b3d9073311eea0ee0a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-21 09:54:21 +00:00
hjk
e02de2ddde ProjectExplorer: More KitAspect related renamings
Change-Id: I10ad7aacaaf7346f91cadec479f4bba8481b1502
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-16 15:09:32 +00:00
hjk
4cb6858410 Meson: Remove unused header file
Change-Id: Iff0793eef63094b5ab680c436963e77c92f278c8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-15 09:33:59 +00:00
hjk
aa25fdcc69 QtSupport: Rename qtkitinformation.{h,cpp} -> qtkitaspect.{h,cpp}
Change-Id: I12229e5e98b468101d32edd35be74bbda0921d89
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 08:59:52 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
hjk
bb06155f09 Meson: Rename some of the KitAspect related classes
... and split out the static interface.

Change-Id: Iaa92ab8e0b29e47736af6c2b5ed146369f2d7294
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-11 07:00:43 +00:00
hjk
fde372b81e ProjectExplorer: Rename KitAspect related classes
KitAspect -> KitAspectFactory
KitAspectWidget -> KitAspect

KitAspect::createConfigWidget() -> KitAspectFactory::createKitAspect()

Possibly not perfect yet, but closer to what it does and is.

There will be follow-ups to rename derived classes.

Change-Id: I226f6f025f1e6462c348b68663f776f5a2e8c42d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-10 13:03:21 +00:00
Jarek Kobus
aa016cc5a7 Various Plugins: Add context object into connections
Change-Id: I360677bebfef16a3233b3b8177cff6da57ec7c31
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-02 08:55:37 +00:00
Eike Ziller
a419670ff5 Build: Change plugin json.in files to CMake style
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.

Adds a fatal message if it detects the old style in a .json.in file for
easier porting.

Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-25 13:21:16 +00:00
hjk
1c4f973365 ProjectExplorer: Replace the fromMap error return value
... by some out-of-band mechanism, keeping previous functionality.

The driving reason is to get the same fromMap signature as in the
AspectContainer base, however, the whole mechanism seems rather useless:
There are only a few places that actually ever could report errors,
in those places "moving on" looks ok, too, and these few places
are not conceptually different than a lot others.

Removal of this (new) mechanism is left for later.

Change-Id: Ibe7a0456bc3b84a84e942231f14446e783372d76
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-24 06:31:51 +00:00
hjk
53d06feecd ProjectExplorer: Change ProjectConfiguration::toMap signature
To match better with the rest, especially the base AspectContainer.

Change-Id: Ide0966cab3219800aa6b7b9e6012731a3fbe7a6f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-21 16:12:15 +00:00
hjk
3e2e0d9393 Meson: Delay settings creation
Change-Id: Ib4de981670c9f70e5ddd4c6e0b31bfd4b6a61851
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-19 05:14:01 +00:00
The Qt Project
70dbe47d6e Merge "Merge remote-tracking branch 'origin/11.0'" 2023-07-13 08:15:34 +00:00
hjk
ec92d47103 Meson: Inline MesonBuildSystem::init() into ctor
Change-Id: I94c33f824dcbdf97562ecf1353fb83dcf726f040
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-13 07:19:10 +00:00