Commit Graph

81560 Commits

Author SHA1 Message Date
David Schulz
81e8c67686 Utils: add convenience function to ChangeSet
Creating a QTextCursor just for the ChangeSet gives no benefit for the
calling code, but reduces the readability.

Change-Id: I34acb6083b6f7ab54fce042e29cd6e80498338ef
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-04 10:46:40 +00:00
hjk
e1c97d4e47 Debugger: Remove some path mapping
This reverts 67607e4bc6, which seems
not needed anymore.

Change-Id: I7c995fc158bb26acf3b4a8ad4b810fa427fcf009
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-07-04 10:35:02 +00:00
David Schulz
4eceb76bd5 ClangTools: remove unused function
Change-Id: I7551f30b6b9c925290837f53b9ad4ceca66b5fab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-04 10:33:16 +00:00
Jarek Kobus
5aa3e6655c IosRunner: Do some cleanup
Move some public methods into private section.
Remove unused / no-op functions.
Make some functions const.

Change-Id: Iffcac68aef12db939bfc60b3a01272cf07c67c89
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-04 10:17:06 +00:00
Christian Kandeler
3f61223c0f CppEditor: Adapt some test data
... so that the tests pass with both the built-in indenter and
ClangFormat.

Change-Id: I0f870c507dabd80ccfc35f1d3021b2ddabe422d2
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-07-04 08:39:51 +00:00
Jarek Kobus
c1f6d70445 RunControl: Remove initiateFinish() / finished()
The only difference between initiateFinish() and initiateStop()
is that the initiateFinish() deletes the RunControl automatically
after the final state was reached.

Add setAutoDeleteOnStop() property and reuse initiateStop()
and stopped() instead.

Change-Id: I8e842978831b19587a8658b4443c96a04eb7a6df
Reviewed-by: hjk <hjk@qt.io>
2023-07-04 07:29:23 +00:00
hjk
418482b3e2 FakeVim: Assume UTF-8 for source also on Windows by default
... but make it configurable.

Fixes: QTCREATORBUG-29320
Change-Id: Ib377c78e51afb7d06167c66306250a281aa9279c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-04 07:05:43 +00:00
hjk
1d1eb9c3a2 Templates: Use C++17 compact namespaces in the plugin template
Change-Id: If4c8540e4d1d9b42efcd1c039c28f85bd0fb98fd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-04 06:52:07 +00:00
David Schulz
b721d98476 Editor: optimize annotation cache cleanup
Looking up the last visible block is not for free since it calculates
the bounding rects for all blocks between the first and last visible
block. Avoid one calculation by postponing the annotation cleanup after
the paint event and only if we reach a certain amount of cached entries.

Change-Id: Ibfab49301f82237e16d5a69ce1531539907e7ed8
Reviewed-by: hjk <hjk@qt.io>
2023-07-04 06:41:09 +00:00
hjk
1e6eb1ba28 RemoteLinux: Un-publish MakeInstallStep
... and move definition into .cpp.

It is by now only needed there, and we don't want to encourge
re-using bits and pieces of step implementation by inheritance.

Change-Id: I12899c5e6a6c94cc9cfb23a2756621a4213f5dae
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-04 05:26:17 +00:00
hjk
f2aaf68b0c ProjectExplorer: Use FilePathAspect(s) in ExecutableAspect
In the read-only case, make it look like the previously used
StringAspect with LabelDisplay.

Change-Id: Ica76c1ba23bf9b3946c227e303cc1336f3f8d5b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-04 05:23:24 +00:00
Christian Stenger
e38cd151cf AutoTest: Make scan thread limit customizable
Allow users to specify the tread limit used when scanning
for tests.
By default we continue to use a fourth of the available
logical CPUs.

Task-number: QTCREATORBUG-29301
Change-Id: Ic92a4d0908093c0664aa1ba924e0c17dfd0082f9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-07-04 05:20:48 +00:00
David Schulz
56772fbcc6 ClangTools: filepathify replacements
Change-Id: I22b6f4786cda39c79cf332dba4a6a7952fd5c8b7
Reviewed-by: hjk <hjk@qt.io>
2023-07-03 16:56:22 +00:00
David Schulz
3c051a8b88 LSP: remove unused functions
Change-Id: I56d4fbe09897b920e9a987ceb081f1da6c1706bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-03 16:56:10 +00:00
Jarek Kobus
3f6dcf6ad1 RunControl: Remove unused isStopping()
Change-Id: Ib294a3728bbd106665dc237623deff7ee8cd4bd5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-03 15:16:44 +00:00
Tasuku Suzuki
6e59fa4305 Remove unimplimented method declaration
Change-Id: Idea9e31ccca7de4a00a8cd9cde5c40491ae1dcbc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-07-03 15:00:38 +00:00
hjk
f38d08fc42 Qmake: Rudimentary support for prompt() in .pro file
This is good enough to open Qt5's toplevel .pro, but not much more.

Ideally, prompt() should not be used in files that are meant to
be used non-interactively.

Task-number: QTCREATORBUG-18220
Change-Id: I842d3c1a8c742d55cbe89a8d0980f34d179ec011
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-07-03 14:17:09 +00:00
Orgad Shaneh
ce082bb09f Terminal: Simplify OpenTerminalParameters construction
Change-Id: I4dcc2146f227e4a408c88de62f7594953c8ccb66
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-03 13:30:43 +00:00
Jarek Kobus
d222cc2dbd AndroidRunSupport: Remove unneeded overloads
Change-Id: Id6a8a5a387acb4f33752ad61ab27893a138bac9b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-03 13:30:38 +00:00
David Schulz
61fc1fd452 ClangFormat: remove identical prefix and suffix from replacement text
To reduce the changes done to the document iterate from the start and
back of the replacement text and check whether the document already contains
the proposed changes.

This also fixes the misplaced snippet part in the if else snippet.

Change-Id: I4519ed101cc03e7c49b3a9b775087361c3fd158d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-03 09:24:00 +00:00
The Qt Project
bb159da60d Merge "Merge remote-tracking branch 'origin/11.0'" 2023-07-03 08:58:27 +00:00
Christian Kandeler
a39119669c CppEditor: Format quickfix code only if formatting is enabled
... in the ClangFormat settings (rather than the default of just
indenting).
As opposed to files generated by the wizard, quickfixes are often touching
existing code, and since ClangFormat works on line granularity, users
will experience unexpected re-formattings when ClangFormat is in indent-
only mode.
Therefore, do the formatting only if the user has enabled it in the
ClangFormat settings.

Change-Id: Icb30f166f2b6fb94113a8f25c4a5f92ff8bca9b0
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-07-03 08:47:42 +00:00
Eike Ziller
26e96bfad8 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/debugger/debuggeritemmanager.cpp

Change-Id: I9d99d13feff9315f52eacbd84857c63cb69bf804
2023-07-03 10:24:09 +02:00
hjk
64c8c37bd4 Aspect: Fix recent regression in signal emission
Amends 379e7f906

Change-Id: Ia1599613e3c2575c7406cf49f3dd9487c9a1284a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-03 05:42:21 +00:00
Jarek Kobus
297ff3b9b1 AndroidRunnerWorker: Remove no-op code
Since there is no call to recordData()
with ANDROID_PRESTARTSHELLCMDLIST or
with ANDROID_POSTFINISHSHELLCMDLIST, the recordedData()
will always return empty variant.

Change-Id: I2d96ddee12181c614a0282f5103fba3fc06b6486
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-01 21:23:17 +00:00
Orgad Shaneh
a3b4006627 Terminal: Fix icons and improve msys2 integration
Change-Id: I93b994716a8c22231d42b313ca2f688ddc100de3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-30 14:45:51 +00:00
hjk
5d69944ead Qmake: More [[fallthrough]] warnings
Change-Id: I45acf2b2f6bd11a144786e076d87398d729fe2d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-30 12:45:06 +00:00
Cristian Adam
c529a87240 Terminal: fix keypad Enter key handling on Windows
On Windows it looked like nothing happened when pressing the keypad's
Enter key.

By using the same handling as for the Return key, the terminal works as
the user expects it.

Fixes: QTCREATORBUG-29348
Change-Id: Ia49f0bb98aef8393f208671042d608a124cb431f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-30 12:16:39 +00:00
hjk
5b93ecdd05 Docker: Add sanity check in start container
Change-Id: I633685402f27a3af317a58fd6f3c1d58174db989
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-30 11:44:00 +00:00
Marcus Tillmanns
6b8473a2e8 Terminal: Fix exit reporting in error cases
Previously the finished signal was sent not sent soon enough
for the Process to recognizes it correctly.

Also, the process stub would exit prematurely in cases of crashes.

The process stub should only return an error exit code if it did not
show the "waiting for keypress" message.

Fixes: QTCREATORBUG-29350
Change-Id: I86f7d75bacbdb5ee2b0009669926d94b6a75346a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-30 11:14:49 +00:00
Christian Kandeler
b1876052bd ProjectExplorer: Do not auto-remove customized run configurations
Until now, it could easily happen that a user's carefully fine-tuned run
configurations disappeared just because of e.g. a temporarily broken
build system file or simply a switch to a different build configuration.
As this is clearly not acceptable, we now make sure customized run
configurations are not thrown away even when there is currently no
matching factory for them.

Fixes: QTCREATORBUG-23163
Fixes: QTCREATORBUG-28273
Change-Id: Ic011a650d15a2897108df986c7e9fe410852e926
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-06-30 10:59:01 +00:00
Christian Kandeler
9a04490de7 Update qbs submodule to HEAD of 2.1 branch
Change-Id: Ic94bd709ec322078af14de7b4a10db1c033e21a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-30 10:58:34 +00:00
Jarek Kobus
1cbd417906 Utils: Remove functiontraits.h, mapreduce.h and runextensions.h
Change-Id: I61d0f95d4120c0de0045c1a817fd13a09eeb5402
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-30 10:00:12 +00:00
Jarek Kobus
80326d8743 FileSearch: Remove FileIterator and subclasses
Rename tst_SubDirFileIterator into tst_SubDirFileContainer.

Change-Id: I0907ff93f1d6537d200fdc9f5783cfd2a8eb0aa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-30 09:58:10 +00:00
hjk
2f7ecdaf06 FakeVim: Use a FilePathAspect for .vimrc
Even if it's not used as such, it would be the right thing to use.

Change-Id: I7f8931b581af6a97231c49c20e7adc56ad2efff6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-30 09:47:40 +00:00
hjk
5e86d20fae CPaster: Avoid some FilePathAspect::value() uses
Get in the way of splitting FilePathAspect from StringAspect.

Change-Id: Ie2e55847a9242fa4042f37597321b8d77df7e8ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-30 09:44:00 +00:00
Jarek Kobus
7e5f7a0e3f DirectoryFilter: Reuse SubDirFileContainer
Change-Id: I74cdf48927e151674e3730b51c1a6c0249cb7966
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-06-30 09:37:31 +00:00
hjk
98bba063b6 Utils: Use FilePathAspect::setDefaultValue
... instead of StringAspect::setDefaultFilePath.

Closer to the intended uniform access.

Task-number: QTCREATORBUG-29167
Change-Id: I87df385ef98873a0955010149a9a9b09a5f29daf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-30 09:34:26 +00:00
Leena Miettinen
0d75ba0293 Doc: Reorganize "User Interface" topic and move info to How-tos
Moved How-to topics into separate topics (HTML files) and
linked to them from UI Interface in QDS Manual and from How-to
in Qt Creator Manual.

Task-number: QTCREATORBUG-28996
Change-Id: I2b6defa936954c6a41085d0276f29942462ec12f
Signed-off-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-30 09:31:50 +00:00
hjk
72f269bf6a Utils: Add FilePathAspect::setValue
Phasing out StringPathAspect::setFilePath

Change-Id: If74d6b521ce6d558da83ab526057b32e8c37c243
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-30 09:20:09 +00:00
Jarek Kobus
b63d362180 SettingsDialog: Add Sort Categories check box
Change-Id: I06c343ecb8df1d9badb2f760045a71c9344ed820
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-30 08:15:58 +00:00
Eike Ziller
9e7d874bc2 File system index locator: Make sorting results optional
Some tools have sorting options of their own, and this gives users the
chance to keep that order.

Fixes: QTCREATORBUG-27789
Change-Id: I1577de9ee36b5c51e1e588f371f6bbc78a3ec22a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-30 07:50:28 +00:00
David Schulz
596cd204e1 Dumper: fix array 10000 format
Fixes: QTCREATORBUG-29196
Change-Id: I23ddb17ac3f378b6602057c1964ef5984b83e245
Reviewed-by: hjk <hjk@qt.io>
2023-06-30 07:47:27 +00:00
hjk
ca9e6a6e0e ProjectExplorer: Merge device settings file pair, part 2
Change-Id: I21d0d077f3586316b9238b6aa050e9597afb5976
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-06-30 07:25:49 +00:00
hjk
5237998e5e ProjectExplorer: Merge device settings file pair, part 1
Step #1 into the "wrong" file to keep the change small.
Step #2 will rename the files

Change-Id: I2bdcc9e2149ca764f0bbebffb3ec520da72f8098
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-06-30 07:22:59 +00:00
Marcus Tillmanns
2d1de55bdd ProjectExplorer: Fix qmlRunCommand caching
Previously the value set by the user was lost when
the settings dialog is opened again.

Change-Id: Ic6e977e2287671b460a4115d88580a44d4b10b74
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-06-30 07:00:49 +00:00
Christian Stenger
f8366c5ef2 Utils: Fix Qbs build
Change-Id: Ie89a4a6882cae7be9da8ff0a2547d874b12ddf61
Reviewed-by: hjk <hjk@qt.io>
2023-06-30 05:50:41 +00:00
hjk
b98a08587e Vcs: Use a FilePathAspect for VcsBaseSettings::path
Change-Id: Ic92ef43514f7f4004774ebbd9bb49c026dc735ba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-06-29 16:15:38 +00:00
hjk
32dc43693f CMake: Use a FilePathAspect as base for SourceDirectoryAspect
Closer to its true nature.

Change-Id: I96b86690eb138814009aef0f06c87fca8451cfe9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-29 15:16:52 +00:00
Cristian Adam
6b6b1198dd Utils: Fix inverted logic for checkableDecider
`BoolAspect::checkableDecider` was used only in CMakeProjectManager for
askBeforePresetsReload and askBeforeReConfigureInitialParams.

Now the checkbox with "Ask before presets reload" would also match with
the display of the message box.

Change-Id: I45fc7a977dbeb13df051375bd3dac36e7be7bdc4
Reviewed-by: hjk <hjk@qt.io>
2023-06-29 14:59:07 +00:00