Commit Graph

68765 Commits

Author SHA1 Message Date
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
Leena Miettinen
c4bc23e86f Welcome: Add a "Learning" category to the Tutorials tab
With links to videos from the learning courses.

Change-Id: Id2f3d32fcbe39c729ae5c3140b064b88f112283b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-03 08:59:36 +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
Miikka Heikkinen
ffb1bb11d1 QmlDesigner: Require explicitly enabling qsb generation for shaders
Attempting qsb (Qt Shader Baker) file generation for some reason fails
the lights baking process. Since autogeneration of qsb files for
shaders is only necessary to be done once, disabled it by default in
NodeInstanceView, so only the main instance of NodeInstanceView will
attempt to do it.

Fixes: QDS-10206
Change-Id: Ie2b273929c9dde4ab857f6ab47f7daef47808f19
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-06-30 11:20:38 +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
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
Mahmoud Badri
d4cfd52035 QmlDesigner: Reset bundle effect's position after drop
Fixes: QDS-10200
Change-Id: I90f47c714219a334f9d60832a69330dd9a57e999
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-06-30 08:29:31 +00:00
Mahmoud Badri
2f5b6aeb8b QmlDesigner: Hide effect bundle from components view
Fixes: QDS-10194
Change-Id: I4b5deea65211e8063a7d88e18a7f3d1b27aec94d
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-06-30 08:29:15 +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
Thomas Hartmann
878c921f96 StudioWelcomePlugin: Fix potential crash
Change-Id: I00b9b59c645e086860dd904c0545858f9a82e07c
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-06-30 08:06:41 +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
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
Marco Bubke
941e890804 UnitTests: Fix flacky tests
There were multiple reasons why the tests were flacky. First
Utils::reverseCompare had a bug. Now

std::lexicographical_compare(first.rbegin(), first.rend(),
                             second.rbegin(), second.rend())

is used.

Second the check StorageCache::checkEntries was not const. So it would
change the vector which it was iterating. So the iterator could be an
dangling.

Fixes: QDS-10197
Change-Id: I84fca6a2b24e1cae9fb85a01b6208de7e58240df
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-06-29 18:06:25 +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
Marcus Tillmanns
83111bb3f6 Utils: Make validation async
Changes FancyLineEdit to accept two types of validation functions:

AsyncValidationFunction, which returns a QFuture and takes the new text,
or SynchronousValidationFunction.

Especially PathChooser is changed to use async validation function to
improve snappyness of settings pages that do heavy validation,
for instance the Debugger page.

Change-Id: I1677e7d8acc29e36c69a867850304b7913e6ae7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-06-29 13:25:03 +00:00
Marcus Tillmanns
bb6a53240e Copilot: Additional search path for vim plugin
Fixes: QTCREATORBUG-29335
Change-Id: Ib86dc2dc5e4f0df8188dc8e4351f7117cc73710a
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-29 13:20:40 +00:00
hjk
569e73c5ed Perforce: Some more direct FilePath use
Change-Id: I78e28714fef577a9129e39b03273f3651de8adcc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-06-29 12:52:41 +00:00
hjk
a998456338 Perforce: Use a FilePathAspect for the p4 binary
Change-Id: I9bdb04192887f72d37bee04d13450cb9f85f9bc2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-06-29 12:45:42 +00:00
David Schulz
3cfa1902c6 AutoTest: simplify TestVisitor::visit
Change-Id: I26e8eb8788da80afbfbd266f01828b860fc0622a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-29 12:41:06 +00:00
hjk
d702ff02b2 ProjectExplorer: Re-add row break in build aspect
Change-Id: Idf689b86637bb73efa4bff3e8a7191c1b7a4c7c3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-29 12:39:56 +00:00
hjk
fe7b45e374 Json: Fix two fallthrough warnings
gcc 12.2.0 says
warning: this statement may fall through [-Wimplicit-fallthrough=]

Change-Id: I2deec77b4a79d3ef62339fb71f5ce5b52e2b9ee5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-29 12:34:45 +00:00
Miikka Heikkinen
65f45d31f0 QmlDesigner: Fix material browser focus proxy
Introducing StudioQuickWidget caused additional widget to be
added between MaterialBrowserWidget and the actual quick widget
showing MaterialBrowser.qml. Updated material browser's focus proxy to
point to the correct widget.

Fixes: QDS-9104
Change-Id: I25f69ab6ad8d05a6ff98f34053c9585aa23402d8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-06-29 11:55:16 +00:00
Christian Kandeler
bcd49bafdd CppEditor: Add test case for quickfix formatting
Also fixes an off-by-one error in the formatting code that was uncovered
by the test.

Change-Id: I013194e21cf37f318bb806bb60ea659b91b99fbf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-29 11:51:19 +00:00
Alexey Edelev
1e81f206b0 Android: Pull android debugging related files to a subdirectory
When building the project in QtCreator using the Debug configuration,
android deployment procedure pulls app_process from the device to
establish the debug environment. This operation litters the project
build directory with the libraries and executables that don't belong
to it. Instead of pulling the files to the root build directory, it's
better to isolate these files using subdirectory.

Fixes: QTCREATORBUG-29336
Fixes: QTBUG-113851
Fixes: QTBUG-111284
Change-Id: I32c3403dc5f79c42b1ff2bd676c2cf3ae8d43ec3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-06-29 11:41:02 +00:00
hjk
379e7f906e Utils: Rework aspect implementation
This avoids some repetition and could be a step towards
having type storage in (or rather accessible from) the base,
so we can have aspects for more complex data (treemodels...)
that are not easily converted to QVariant.

Change-Id: I9797b3d5646195705212db1830d2b415291ac651
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-29 11:25:44 +00:00
Mahmoud Badri
fcaa050d4e QmlDesigner: Update effects bundle empty state initially
Fixes: QDS-10195
Change-Id: Icdaba14879ac19743d9ebe91beed1d7947837362
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-06-29 10:10:34 +00:00
Mahmoud Badri
cca5b38233 QmlDesigner: Select added bundle effect
Fixes: QDS-10184
Change-Id: Id7bb1f0087f658c1eb3c17d5862dbcf36a663628
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-06-29 09:37:12 +00:00
Mahmoud Badri
2b3ffe61c9 QmlDesigner: Add effects bundle to the Content Library
Fixes: QDS-9683
Fixes: QDS-10167
Fixes: QDS-10171
Fixes: QDS-10191
Fixes: QDS-10192
Change-Id: Ia6f764737783277c719109b28fad248ae3ea2990
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-06-29 09:30:59 +00:00
hjk
699d718051 Core: Also strip accelerators from custom option page keywords
This way the custom keywords can use the same translated strings
with the actual use of the thing in the gui.

Change-Id: I56c7b25b594a0b92980516806ab7d999d7de7937
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-29 08:55:55 +00:00