Commit Graph

1165 Commits

Author SHA1 Message Date
Eike Ziller
a0a4d9024e Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/python/pyside.cpp

Change-Id: I1f84ed56d38355cef6076797c72693fff4c1aa78
2023-09-28 11:02:38 +02:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
Jarek Kobus
3e0f7773b8 Autotest: Ensure m_checkStateCache isn't nullptr
Fixes: QTCREATORBUG-29654
Change-Id: Ia1864756a232663c4109fdae61de1dcaf1fbcd14
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-27 10:25:38 +00:00
Christian Stenger
621a492b6a AutoTest: Guard against concurrent access
While parsing for Qt Quick Tests it may happen that an internal
map is accessed concurrently by different threads.
Guard against this. Minor drive-by optimizations.

Change-Id: Ic3b62c27feddb9a5ac5588a6c9643fc0e623ce19
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-27 09:57:15 +00:00
Christian Kandeler
3861608c63 AutoTest: Create sub-menu for "run test under cursor" actions
No need to add all four variants to the top level of the context menu.

Change-Id: Iffed7abdf06be5d6811b4dde83f27aa865627134
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-22 07:53:57 +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
Eike Ziller
b0043ed1ac OutputPane: Use setter for priority and fix default visibility
Do not show the buttons of output views with priority < 0 (instead of
only == -1). Reduce the number of buttons that are shown by default to
the essential ones.

Change-Id: I5b44f18537b3033ce9d616f044a8b54b76988783
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:51 +00:00
Eike Ziller
053c6253b8 OutputPane: Add an id() for the settings
It was using the displayName for the key in the settings (visibility and
shortcut), which is annoying when changing the language.

Change-Id: Iffa784347c59389599c90f468dcba15834599c39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:42 +00:00
Eike Ziller
409a4c972a OutputPane: Use setter for display name
Change-Id: I2e89fbd052330c9e7124272c2f2fa81a0db94de9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:35 +00:00
Christian Stenger
322336a488 AutoTest: Speed up scanning for tests
Especially Qt and Quick tests scanning takes some time,
so do some additional pre-filtering of files before
parsing them to reduce the number of files to process.
Depending on the structure of the project this can
significantly reduce the scan time.

Task-number: QTCREATORBUG-29301
Change-Id: I629beedcc02502d98d84e29282e1cd7b265cfcf0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-08 08:00:30 +00:00
Christian Stenger
6b6d9dc21e AutoTest: Speed up Qt Test parser
The look up of function definitions is quite costly. Limit
it to the test data functions as we need them when looking
for data tags.
This limitation reduces the time of a full scan here by
more than 40% compared to without limitation.

Task-number: QTCREATORBUG-29301
Change-Id: Ia692aab8cfcc1c98ca9a2d53c935d7755314f736
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-07 07:49:13 +00:00
Christian Stenger
792c74b47a AutoTest: Add report helper function
Adds a report() function which generates a simple string
holding the number of items per framework root node and
uses it inside the logging after a full parse.

Change-Id: Ib4be89de778aeab7e9c80b5c0522ee7f3f1bb587
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-07 07:49:03 +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
Christian Stenger
e26fee092b AutoTest: Allow temporarily disabling of functionality
Especially when touching headers included centrally while
refactoring bigger projects the retriggered parsing of
large (depending) parts of the project can become rather
annoying.
Adds an action for immediate disabling parsing and
respectively other test related functions.

Change-Id: I553615cce90bc88d636a4519718887306ee5215b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-30 12:21:53 +00:00
hjk
aa7c817f7a Utils: Temporarily introdce Key Id::toKey()
To avoid complications on the user code side during the Key/Store
transition.

Change-Id: I49ae9d496c9c1ee07f17245616fdefefe9abfc2e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-29 05:48:34 +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
David Schulz
5122d8addc Merge remote-tracking branch 'origin/11.0'
Change-Id: Idbf5f641aa9db7574cf2a4bd09adb8bcd03da894
2023-08-22 08:10:48 +02:00
Jarek Kobus
121d73b30f Utils: Rename ProjectExplorer::Runnable into Utils::ProcessRunData
Move it into Utils lib.

Change-Id: I3b6c16d18439cabddf59afc03116f13c1970102c
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 07:44:34 +00:00
Christian Stenger
a93040185d AutoTest: Fix used IDs
Amends f53e18ee73.

Change-Id: Ib807eaaa6f211d3661a447e5d02bc0cce108ff2f
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 06:31:45 +00:00
Christian Stenger
397cd1ba3d AutoTest: Fix using target information after kit change
Fixes: QTCREATORBUG-29477
Change-Id: I5d1f8d65ed074d912740b87eac1c7d4413ed2588
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 13:26:24 +00:00
hjk
2a07253a42 Debugger: Rename debuggerkitinformation.{cpp,h}
... to debuggerkitaspect.{cpp,h}

Change-Id: Ia6316fcdc893ca066933658a52c78ef1587a76e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:33:43 +00:00
hjk
f53e18ee73 Test: Avoid some Id::withSuffix calls
Saves cycles and is arguably clearer.

Change-Id: Ib53207704806d4b6ea184633a15ab98fb2eeb89a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-16 06:06:55 +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
2c353c37ea Utils: Base AspectContainer on BaseAspect
Change-Id: I78b11727af6e465da5731ba36bbae476d11d11ee
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-09 06:59:01 +00:00
hjk
2c56fa8084 Autotest: Hide TestNavigationWidget implementation
Also, de-Q_OBJECT-ify.

Change-Id: I6e527bb36e9f38a702604f9c6c3923e62bf921c9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-07 08:24:07 +00:00
hjk
bf5296292a Utils: Rename LabelPlacement::AtCheckBoxWithoutDummyLabel to Compact
In BoolAspect. Felt a bit too descriptive by now.

Change-Id: I0cf2eb88576da3d3741d146a8274cf8a85bc7c83
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-07 08:22:00 +00:00
Jarek Kobus
82712e12f8 Various Plugins: Simplify return QStringList statements
Amends 925bb2ca31

Change-Id: I57bee33cb7acd0ab1cdcfb6897a4847b912b4c97
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-08-02 08:18:56 +00:00
Jarek Kobus
925bb2ca31 Various Plugins: Simplify return QStringList statements
Change-Id: Id014225851e6b9f8436387c681bea42e5de3b797
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-02 05:38:31 +00:00
Jarek Kobus
eb2b4b6cf3 Various Plugins: Simplify return QList statements
Change-Id: I36633128e061d0544e4752a65804b460371283f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-08-02 05:38:14 +00:00
hjk
3ad3b6a975 AutoTest: Dissolve TestFrameworkManager
It's a handful functions around two independent lists.

Change-Id: I0a7015deef27a77d4e67488e1f9b6c7a8d71133b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-28 10:08:32 +00:00
hjk
8a6e4bea9e Autotest: Simplify framework registration functions signature
Change-Id: I249b73f0adf5a678145be9d00bee9a733097bfef
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-28 09:55:10 +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
7d9b124ea2 AutoTest: Use aspect as member in TestRunConfiguration
Change-Id: If39015ec0b10a7b77e558bb04e83d06d1367173a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-14 11:49:42 +00:00
hjk
763b694801 AutoTest: Use more concise aspect access
Change-Id: Iad5b82f697d4c32ff444b230dbb682833dbc5f82
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-14 09:00:02 +00:00
hjk
c56301f4ff AutoTest: De-virtualize some properties
Mostly a matter of taste.

Change-Id: If4f329d7f73361ee312387d0aa48d26fc1d98ff0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-14 06:08:41 +00:00
hjk
4c02bc497c Core: Add some sanity check that settings containers don't auto-apply
We use manual 'Apply' in the dialog.

Also, mark a few pages as non-autoapply that were recently changed
away from PagedSettings again which did that autmatically.

Change-Id: Id78cac2770658b18c420813802a0e77443329f39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-13 12:36:36 +00:00
Christian Stenger
fa815edae3 AutoTest: Use new approach for settings
Avoids a couple of unneeded casts.

Change-Id: Ib3361d4ad2c69e4f0e4a44c5e9b3f385cefb6084
Reviewed-by: hjk <hjk@qt.io>
2023-07-13 08:47:54 +00:00
Christian Stenger
af998dae2c AutoTest: Clean up project file
Change-Id: I85f3836915e7603cd93956ff81dbce69267e3163
Reviewed-by: hjk <hjk@qt.io>
2023-07-13 08:47:44 +00:00
Christian Stenger
f021f1503b AutoTest: Remove unused member
Change-Id: I1a3a157893a8311db48f6e41c8848720845d07ab
Reviewed-by: hjk <hjk@qt.io>
2023-07-13 08:47:39 +00:00
The Qt Project
70dbe47d6e Merge "Merge remote-tracking branch 'origin/11.0'" 2023-07-13 08:15:34 +00:00
Christian Kandeler
fdc834c0d1 CPlusPlus: Remove TranslationUnit::getTokenStartPosition()
It was exactly the same as getTokenPosition().

Change-Id: I292522faa18933ec400b556c384786eb9efdfb3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-13 07:16:29 +00:00
Eike Ziller
835201060d Merge remote-tracking branch 'origin/11.0'
Change-Id: I2e0e8dd5f9b42533c665255f8539e837938846de
2023-07-13 08:28:42 +02:00
hjk
323f29a3bd AutoTest: Merge settings and tools hierarchies [2/2]
Renaming files to match class names.

Change-Id: I3d75a79a5ad8e9d1c132530cbcc6973efc6dbadf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-12 13:08:28 +00:00
hjk
0b83f110f4 CppEditor: Make a few CppModelManager functions static
... to simplify code using it.

Change-Id: Ib2bfbb5a17a1d48088a9cf4973d4c3f006cd34e4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-12 13:08:09 +00:00
hjk
14e18fc92f AutoTest: Merge settings and tools hierarchies [1/2]
Currently living in the settings files to keep changes small,
will be renamed in a second step.

This allows the settings aspects to be used in their short form
and overall removes some indirections.

Change-Id: I099369b62239aed8192613a04bca958a660c36c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-12 12:12:17 +00:00
Alessandro Portale
f3654b8fd2 Autotest: Use LayoutBuilder in ProjectTestSettingsWidget
Change-Id: If9f67564323835334e123178806467a999ab73a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-12 07:44:14 +00:00
Christian Stenger
b5fa6be362 AutoTest: Retrigger scan if active frameworks change
...if the code parser is scanning for tests.
Otherwise we have the canceled state of the running scan.

Change-Id: Ief493c0bf66825e57c44c79193d5e8085ee98acd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-11 11:10:52 +00:00
Christian Stenger
4f50b6b791 AutoTest: Postpone removal of root node
If a root node should get removed while scanning we may end up
crashing when still getting results.
As there is currently no mechanism to stop a certain parser
postpone the removal of the root node until the parsing is done.

Change-Id: I3766f9e67780e241801166339fa67f39536314b4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-11 11:10:40 +00:00
Christian Stenger
fdf79f0234 AutoTest: Avoid crash on concurrent access
Partially reverts 91bdbb61ec as
the symbol lookup will update the snapshot's cache. As there
are concurrent threads accessing the snapshot we may end up in
a crash.

Change-Id: I2aaf5e403b10cba2b26915cbe7b4712c43c4957b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-11 06:28:20 +00:00