Commit Graph

80529 Commits

Author SHA1 Message Date
hjk
5e059db065 CMakeProjectManager: Robustify buildAndRunOnSameDevice helper
Change-Id: Ib3559f81f2ff71ad5fc04d982ad6286df0d4390e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-22 12:48:27 +00:00
Alexander Pershin
cb05304858 MiniProjectTargetSelector: Ensure selected item is visible on show event
Is useful when project contains large amount of targets and you have
to switch between them more or less often. Change also applies to other
tree views in selector but they are less likely to contain large
row counts.

Change-Id: Ic2cd920335adeef618d85202b3347a4cd042871c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-22 12:43:57 +00:00
Assam Boudjelthia
cae4dd01a8 Android: Skip "Build APK" for non-app builds
For projects using Qt 5.15 and Qt 6, the deployment settings
file is generated by CMake/qmake and not Qt Creator, so if
such file doesn't exist or it's been generated by Qt Creator,
we can assume the project is not an android app.

This is mainly a workaround for now to avoid a more involved
fix which would need to potentially remove the method
AndroidManager::deploymentSettings() (and it's use cases) which
is used to generate a minimal version of deployment settings
file, which was added some time ago where the build system
CMake and Qt wasn't handling that generation, but now with Qt
5.15 and Qt 6, that shouldn't be a concern of Qt Creator.

Fixes: QTCREATORBUG-27167
Fixes: QTBUG-111334
Task-number: QTCREATORBUG-26888
Change-Id: I15657f3b67acc52c28c92e6af24668f778432a19
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-22 11:22:26 +00:00
Christian Stenger
c5818cfe6d Utils: Fix pathchooser handling for aspects
..especially when entering a path manually. Fixes some
soft asserts regarding the call guard and re-allows to
type a backslash directly to separate path from sub-path
instead of using wild workarounds like adding a dummy
character and adding the backslash before this.

Change-Id: I8cc8aaccf414d0fd9acc03d7c69e10ddd88dbfd9
Reviewed-by: hjk <hjk@qt.io>
2023-05-22 11:18:31 +00:00
hjk
dfcfea478e PerfProfiler: Re-organize general command line construction
... to avoid unnecessary argument splitting.

Also, make a potentially missing access to the settings
more noticeable to the user.

Task-number: QTCREATORBUG-28701
Change-Id: I7b7f7f5f6a68357dbec064516370bacbf00746dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-22 07:56:51 +00:00
Eike Ziller
07934fadcf Examples: Use Qt logging instead of environment variable
Use logging category qtc.examples instead of a custom
QTC_DEBUG_EXAMPLESMODEL environment variable.

Change-Id: Idbd6d4b29dbd7b9e8c5976eca6efeb232bf7fa5f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-22 07:42:13 +00:00
hjk
d0881f5542 Utils: Remove a unused aspect ctor parameters
Change-Id: I6e3c6ce7b04a7817f35da10f1975ae2fec62b9e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-22 07:16:23 +00:00
hjk
d740a355bb Utils: Rework CheckableMessageBox
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.

Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:

...removing  aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect.  Arguably, the latter is not needed
and could be done on the user side.

Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.

Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.

Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-22 06:40:13 +00:00
Marcus Tillmanns
c0ebf227a7 ProjectExplorer: Fix inverted if statement
Change-Id: I94c9d8d5ff335ee53002fdb1ea75ca882e858d71
Reviewed-by: hjk <hjk@qt.io>
2023-05-22 06:02:28 +00:00
Assam Boudjelthia
e6875aa01e Android: don't stop deployment if kit's abis list is empty
If the kit's detected abis list is empty for some reason,
avoid blocking the deployment process.

Fixes: QTCREATORBUG-27103
Change-Id: I9e7b01c123666f087c6d48e56af6e6637e147442
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-20 08:14:12 +00:00
Jarek Kobus
c098b261dc TaskTree: Refactor Group internal data
Introduce the GroupData structure. In this way it's easily
possible to add extra properties of already used types, e.g. int.

It's also possible to easily create elements with multiple
properties.

Simplify internal TaskItem::Type enum.

Get rid of special ParallelLimit and Workflow elements.
Provide global parallelLimit() and workflowPolicy() functions.

Make global items (e.g. parallel, stopOnDone, etc...) const.

Change-Id: Ic5628255b542fd6c5a5565b055ff11804c8d7b68
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:30:15 +00:00
Jarek Kobus
56fda87389 TaskTree: Get rid of OnGroup... elements
Change-Id: Id1b600999d2051eff8d2207db8235ad08eb6e663
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:30:04 +00:00
Jarek Kobus
0793b945f3 TaskTree: Replace usages of OnGroup... with onGroup... functions
Change-Id: I06ce6c917ac28b6362ad2cdef42355e5aa28f4eb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:29:55 +00:00
Jarek Kobus
04382d39a0 TaskTree: Introduce onGroup...() functions
The OnGroup... elements are going to be replaced with
these functions.

Change-Id: Ia271a89062cc9c6b18384607b20b1f68d273bcde
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:29:42 +00:00
Jarek Kobus
ceff14303a TaskTree: Prepare for OnGroup... -> onGroup... renaming
Change-Id: I52b695999b53b80fb8dbb77895080f6c1b86a58f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:29:35 +00:00
hjk
6f31d87444 Use more FilePathAspect
Change-Id: Ib348df1460f8610607251498b07010df58d51ddf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-19 15:07:17 +00:00
Jarek Kobus
2274847bfe tst_SubDirFileIterator: Fix build with Qt < 6.3
QDirIterator::nextFileInfo() was introduced in Qt 6.3.

Change-Id: I3ed6293d4262b0ff2bb4423eb37c35c7b3650e97
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 14:54:27 +00:00
hjk
0c425540de Fossil: Replace one qAsConst
Change-Id: Ia03f9aa81d41e03b9611da823c6999082d243864
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-19 14:52:48 +00:00
hjk
c597961d7d Beautifier: Simplify GeneralSettings implementation
Change-Id: Ib8b8f0b1cab3d9bbacf24009c0bd546660c19906
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 14:37:35 +00:00
hjk
40d7fcc1d4 Utils: Remove check against 'autoapply' for some volatile aspect value
This was based on the wrong assumption that on !autoapply aspects
(i.e.  aspects in settings pages the non-applied value would never be
needed by user code. This is, however, not the case when e.g.
temporary checkbox states or values in comboboxes are used to
enable/disable parts of the ui while interacting with the page.

Change-Id: I4fe6a0df8137083a0a0faecc3ba20792caa5a747
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-19 14:32:40 +00:00
Alessandro Portale
b1b9f54de7 WebAssembly: Make caching code less cryptic
Change-Id: Ib768e6f41fe8c5218875287dd0e60c76cbe0053e
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 14:03:34 +00:00
hjk
22af1a0255 Core: Even terser layout setup for option pages
Change-Id: Id39c841da70c87d47c125903b390a75c4414cc2f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 12:35:30 +00:00
hjk
d4cf9b667b Conan: Simplify plugin setup
Change-Id: Ic60d2626384c2d15b81614f51db447a197640156
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 12:35:05 +00:00
Alessandro Portale
b0f68a916f Vcpkg: Use Utils::FilePathAspect
Change-Id: I7532536186d500748e3ad30794801436c0a997e2
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 10:32:11 +00:00
Alessandro Portale
5acecd4ef9 WebAssembly: Base Settings handling on Core::PagedSettings
Change-Id: If28afd8046367eb1b8b12e54d2dae4235dbc821f
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 09:55:30 +00:00
Jarek Kobus
7501d7587f TaskTree: Introduce WorkflowPolicy::StopOnFinished
The policy is useful mainly in parallel mode.
It stops executing the Group when any task finishes.
It reports the task's result.

Change-Id: I7aa98365cdc4c1eb869ab419d42d0cc5438d43bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 08:40:24 +00:00
Jarek Kobus
7bfc3197aa TaskTree: Add missing include
Amends 9c78ef983a

Change-Id: Id912771b2d23c6856233705a054c0e8e1e9b5a41
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 08:33:16 +00:00
Jarek Kobus
3763370ab9 TaskTree: Add Q_DISABLE_COPY_MOVE() into internal classes
Change-Id: I1b599902dfeebed93378a4d38bd3deb786f572b9
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 07:38:59 +00:00
Jarek Kobus
c603e01535 TaskTree: Don't derive TaskNode from QObject
It reduces the time spent inside TaskTree::setupRoot()
by ~30% for big trees (~7000 tasks).

Change-Id: Ic65ed0fdf511977d9cc2fe22bdac814516e9883d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 07:34:38 +00:00
Jarek Kobus
5ae82a88cf TaskTree tasks: Make task naming consistent
Task-number: QTCREATORBUG-29102
Change-Id: I96dfde58b684a3b48704778b92cdf2f869bbb7b1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 07:29:10 +00:00
Jarek Kobus
376c1cf246 FileStreamWriter: Add some comments into d'tor
When d'tor of the parent Async<void> runs, it busy waits
for the WriteBuffer's thread to finish, and afterwards
QObject's d'tor deletes the child WriteBuffer object.

Change-Id: Ifc696b3e56735e697d8c54c2471f89e323d3c0d1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-19 07:23:57 +00:00
Jarek Kobus
f0acaecc63 tst_Async: Reuse TaskTree:runBlocking()
Change-Id: Ia5dd76bed15014d920e44f51de1774323be0b9a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 07:19:46 +00:00
Jarek Kobus
6a8e8f5fbd tst_Tasking: Reuse TaskTree:runBlocking()
Get rid of the OnStart enum - that's checked indirectly
through the runBlocking() call.

Change-Id: I190de0f911c68195c31e722bcb1823b678cb0bd4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-19 07:19:33 +00:00
Jarek Kobus
2b174a763f FileStreamer: Reuse TaskTree::runBlocking()
Reuse it also in FileSystemAccessTest.

Change-Id: I6ce1c926bd5d3a617b8badb0905e7b2fd58b4745
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 07:17:46 +00:00
Jarek Kobus
686a40d199 SubDirFileIterator: Add manual performance test
Compare the total time spent on iterating a big file tree
with 3 different time iterators:
- Utils::SubDirFileIterator
- manually written iterator using QDir::entryInfoList()
- QDirIterator

The iterator run through about one million files (including
about ~100K directories). The more files above this
number to be iterated over, the bigger the relative time
difference of SubDirFileIterator compared to other iterators.

The number of generated files depends on the running
machine's core number. In my case:

Number of cores: 24
Number of generated files: 898753
Number of generated directories: 112345
Time spent on generating file tree: ~2 seconds
Time spent on iterating using SubDirIterator: ~80 seconds
Time spent on iterating using manual iterator: ~8 seconds
Time spent on iterating using QDirIterator: ~4 seconds
Time spent on removing generated file tree: ~2 seconds

Task-number: QTCREATORBUG-28892
Change-Id: I94d7cf0169a470820dc27f39c9cdb4150eea51c1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-19 07:17:01 +00:00
Jarek Kobus
9c78ef983a TaskTree: Add runBlocking() helpers
To be used in non-main threads and in autotests.

Change-Id: If37be854f65c9cfe94eb781a28dc8db4365809e1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-19 07:16:48 +00:00
Alessandro Portale
caad8074de WebAssembly: Prevent null pointer access
The detector.device can be nullptr

Amends: cacc4aeede

Change-Id: I5b9b6aa722c8e6e8a96d05cdf2f1b214735db858
Reviewed-by: hjk <hjk@qt.io>
2023-05-17 15:37:16 +00:00
The Qt Project
7057962e44 Merge "Merge remote-tracking branch 'origin/10.0'" 2023-05-17 14:23:50 +00:00
Alessandro Portale
07b2a30dfe Qt Quick Application Wizard: Unify Qt version combobox entries
The "compat" variant, which was around for a long time, had a Qt version
combobox with entries following the "Qt x.yz" scheme. This change adds
the Qt prefix also to the combobox of the new wizard.

Fixes: QTCREATORBUG-29126
Change-Id: I4cd59f09248ba487077c2dcdd0828222311dd9a7
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-05-17 14:12:20 +00:00
Christian Kandeler
aa5ddaf412 ClangCodeModel: Let user decide how to do the header/source switch
While clangd's AST matching can find source files at any location, it also
has a number of annoying bugs that break the functionality for some
users. This patch brings back the previous "try built-in first" logic, but
also lets users choose their preferred backend.

Task-number: QTCREATORBUG-29175
Change-Id: I6b854ed05652e6468509e5748a83a8f9bf76fc20
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 13:52:40 +00:00
Jarek Kobus
5abb1959c5 ScopedTimer: Make it possible to provide optional message string
When optional message argument is provided, both macros
print the message instead of __FILE__ and __LINE__ info.

It helps to ease the identification of the exact place in code
when many macros are added - custom message may be more
informative that the file and line location.

Change-Id: I7a3ccbdaca2858b44dcbd51a8f9330160dab73e9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-17 13:43:32 +00:00
Christian Stenger
23b0082b20 Tests: Build text tests with Qbs as well
Amends 1a98dda5c4.

Change-Id: If563437141ac75bb2b72a9d550d1fb507a89e63c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-17 13:36:18 +00:00
hjk
5ad790d5c8 FakeVim: Maintain highlighting on split
Fixes: QTCREATORBUG-28914
Change-Id: I4e0b82e49bd97f19eb513f21e1dc405ea9f0700c
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-17 13:24:41 +00:00
Eike Ziller
8e8ebc8f88 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	coin/instructions/build.yaml

Change-Id: I697b0107e75c6259989247de2180437d7987ff37
2023-05-17 14:55:02 +02:00
David Schulz
b2e30e7ef8 Utils: add Position::fromCursor with tests
Change-Id: I1cd989eaf7e75bc04f171989f9f9fe932402abef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-17 12:53:22 +00:00
Eike Ziller
2cd2324963 CheckableMessageBox: Simplify checkbox setup
If the dialog is shown, the checkbox must be unchecked, because
otherwise the dialog would not have been shown.

Change-Id: I34e8034975baef710997e0cdb3c7d2f8b0c94cd2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-17 12:13:34 +00:00
Christian Stenger
8121575067 Core: Fix item view find
...when there is only one matching item and we are starting
search from there.

Change-Id: Icfffd37d9330c83058fb81356762e72b183f24e8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 11:40:01 +00:00
hjk
95d21f3966 Use new FilePathAspect in a few more places
Change-Id: I910a802255c8d54a31313dcccb0d1a48ec577b7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-17 11:22:48 +00:00
Eike Ziller
a928fee108 Separate session loading from project manager
Move the generic parts to session manager and let the project manager
load its parts separately.

Change-Id: I14ee3311ab0c0f40444674b82cee1e4bb0fb9daf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-17 11:07:21 +00:00
Eike Ziller
b512f414bd Session: Minimize direct use of reader when loading sessions
Instead of directly reading things like the project list from the
reader, add a map of "session values" in the session and read these from
the reader once, then use the session to access these values while
loading the details of the session. This is in preparation of separating
the session loading from projectexplorer.

This is similar to Session::(set)Value. We cannot use the same
(set)Value methods directly though, because of differences in the
handling of these values during implict and explicit default session
loading.

Change-Id: I9a4f38a9f958734d20d6e6eb7253f9e44ba1285e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 11:04:55 +00:00