Commit Graph

80509 Commits

Author SHA1 Message Date
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
Eike Ziller
c7bf77ae72 CheckableMessageBox: Make semantics of bool value clearer
Change-Id: I06a43ab986e6f028cf07ea5e9700c831a591cbf2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-17 10:58:02 +00:00
Christian Stenger
a468bc2f02 Fix Qbs build
Amends f84199f8b7 and
reverts 796cfceb3a.

Change-Id: I7eb686c012bd99cddf36aa16219e3f33de2b15b2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-17 10:36:29 +00:00
Alessandro Portale
3fc461e712 CppEditor/QmlJSTools: Remove settings migration from Qt Creator 2.3
This removes settings migration from Cpp Code Style Settings migration
from Qt Creator <= 2.3 to 2.3+

Let's assume that most active Qt Creator users launched a Qt Creator 2.4
or later in the last decade if they still work with their decade-old
installation.

Change-Id: I9c49dd9c1c0bd85e2b8c58a0d4eb6c393abf94a1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-17 10:15:48 +00:00
Eike Ziller
cbeac777a6 Move restoring startup session to SessionManager
It needs to be done after the delayed restoring of kits, so this now
implicitly depends on ICore::coreOpened coming after restoring kits has
triggered on the event loop before, which is ugly, but works (and is at
least guarded by a warning).

Change-Id: Ie8676b1c7f4d099fb83f0f2a0f2e5677c4a0b999
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-17 10:09:00 +00:00
Eike Ziller
667d5a8f91 Remove include of projectmanager.h from session.h
Users need to include that themselves if needed.

Change-Id: I90f8fe2784ee395cc6a4fc43e62eedebf9f05b76
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-17 10:08:52 +00:00
Eike Ziller
c3334cd1af Session: Move some settings saving to session itself
Change-Id: I306bb86f1fda03f9b34efd7101d405ed64076711
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 10:08:44 +00:00
Marcus Tillmanns
c59f3102a1 CrashHandler: Fix missing update
The change to CheckableMessageBox was missed.

Change-Id: I8b7fe1230bcf483f9e5371b878d862aff422d925
Reviewed-by: hjk <hjk@qt.io>
2023-05-17 08:31:41 +00:00
hjk
8f5703a7b9 Tests: Add a test to feed shells via stdin
Change-Id: I7e19537d0a3015aeb329849758cc92da17a67606
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-17 08:21:09 +00:00
Christian Stenger
db2b09f4eb Valgrind: Do not start valgrind if it does not exist
...and print a warning with some user hint inside the application
output instead.
Drive-by fix: silence a soft assert in case of a failed start of
callgrind.

Fixes: QTCREATORBUG-28988
Change-Id: I4fd0253e1f18489031e2f6cfa276c4df5ea4483a
Reviewed-by: hjk <hjk@qt.io>
2023-05-17 08:17:19 +00:00
Christian Stenger
796cfceb3a Tests: Fix Qbs build
Amends f84199f8b7.

Change-Id: I6a233aca13f9908451748c20c1804fa2851043aa
Reviewed-by: hjk <hjk@qt.io>
2023-05-17 08:17:12 +00:00
Marcus Tillmanns
1fc2459b62 Utils: Unify CheckableMessageBox and make it look more native
Change-Id: I5690c16f38cfd2058e01441283bec28d44cadf75
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 08:01:13 +00:00
Andre Hartmann
29371dc2f3 Git: Cache author and encoding for instant blame
Querying both may be expensive and is only
necessary when the repository is changed.

Fixes: QTCREATORBUG-29151
Change-Id: I1d37f8b8708c02a8c3dc2d89fe7e331f0f416818
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-17 07:06:05 +00:00
Andre Hartmann
ac0f273081 Git: Fix missing instant blame with line folding
When lines are folded (e.g. the license header),
the editors lineCount() is smaller than its
blockCount(). That resulted in missing blame marks
for the last document lines. E.g. if 10 lines were
folded, the last 10 lines did not have blame marks.

Change-Id: I502afb09697fd3d6a062d3ae2321357a3e565a0e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-17 07:05:33 +00:00
Jarek Kobus
f84199f8b7 Solutions: Long live Solutions!
Short live Tasking in Solutions!

Add src/libs/solutions/README.md with the motivation and hints.

Move TaskTree and Barrier from Utils into Tasking object lib,
the first solution in Solutions project.

Tasking: Some more work is still required for adapting auto and
manual tests. Currently they use Async task, which stayed in Utils.
For Qt purposed we most probably need to have a clone of
Async task inside the Tasking namespace that is more Qt-like
(no Utils::FutureSynchronizer, no priority field,
global QThreadPool instead of a custom one for Creator).

Change-Id: I5d10a2d68170ffa467d8c299be5995b9aa4f8f77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 06:29:03 +00:00
hjk
520412d147 CPaster: Use PagedSettings
Change-Id: I826030f9a691c9e9c929deb1624d9705d3222e23
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-17 06:07:54 +00:00
Christian Stenger
0672199de8 Squish: Provide object picker
Provide the object picker. Currently only partial functionality
and limited for a debug run of a squish test.

Change-Id: Ic6f765d3c76b29c732684879c2459f1e0f732978
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-17 06:07:17 +00:00
hjk
a21b96f4b6 Utils: Allow a BoolAspect to adopt an external button
This will be used by the apply machinery and allows more
complex setups than the automatically generated internal
CheckBox button.

Change-Id: I237a9283253f11bcb76e0366a0b6c5a0346fdfd8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-17 05:51:30 +00:00
hjk
337497d990 Vcs: Use new FilePathAspect in a few places
Change-Id: Idc23616dd3b7bc21301471cb48e2893116b83f0d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-17 05:51:17 +00:00
Leena Miettinen
330a30aa5b Doc: Hide text and links that only apply to Qt Creator Manual
...from the QDS manual.

Change-Id: I24be3b656922b1c10643f6ef274f1fa91c8330df
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-05-17 05:34:28 +00:00
hjk
6c5fb656d6 Utils: Make PagedSettings::readSettings() calls shorter
Ideally, this would not be needed on the user code side at all, but
there's no way to ensure the settings are read timing before sibling
constructors might need it. So keep the 'poor man's two-phase
initialization', but make it less intrusive.

Change-Id: Ica7f6510cd05072d7286f4e85cd72c494e8f10f8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-16 16:36:25 +00:00