Commit Graph

68765 Commits

Author SHA1 Message Date
Christian Kandeler
b986ce5175 CppEditor: Make all actions available in Tools menu and context menu
The differences seemed rather arbitrary and were possibly unintended.

Change-Id: I68151739875e6bb6bf5fedf8cc7ae54d4b70f42c
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-09-27 12:13:21 +00:00
David Schulz
2c298097e9 Python: detect pythons async
Change-Id: I74484a4f2c33c4fd7754f87bfbf3b9d711542741
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-27 12:08:36 +00:00
Olivier De Cannière
eb5cdb4293 Revert: qmljs: add check for comparisons not depending on values
The warnings produced by these checks have always been somewhat broken.
Ever since they were added people users complained about the M325
warnings because they were confusing or because of false positives.

Fixes: QTCREATORBUG-29601
Change-Id: Ifac1ed0819a05251b3c4b583627cc45553e3d680
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-27 12:07:35 +00:00
Aleksei German
38500a5c68 QmlDesigner: Fix unenclosed multistrings
Task-number: QDS-10681
Change-Id: Ide92c93c85f0d61b48c4c1cb0096cd8db201238d
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-09-27 11:27:40 +00:00
Jarek Kobus
4e90ca1b59 CMakeToolManager: Add static readFirstParagraphs()
Reuse it in CMakeEditor and CMakeFileCompletionAssistProvider.

Amends d04585b519

Change-Id: I8dbd59c815e017404ff215ca1ff68740d6653e91
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-27 11:21:50 +00:00
Marco Bubke
85da9d7af5 Utils: Remove disabled warning
Seems to work on my GCC but lets see if older GCC can handle it.

Change-Id: I2932798da3691201f7dd4c8c981ae0dc29d01a86
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-27 11:02:00 +00:00
Marco Bubke
a914b550ed Utils: Workaround warning about missing disabled warning
Change-Id: Icae1e30176fa5439a9e60be69b4eca754aca94d9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-27 11:01:51 +00:00
hjk
3d0ff7ef29 ProjectExplorer: Simplify detection of "built-in" clang
This is also the only case that triggered the short code path in
findCompilerCandidates().

Change-Id: Id8a88a275655526733e80c30250800db66ac6653
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-27 10:31:46 +00:00
Marcus Tillmanns
cbc6809b28 SSH: Fix Askpass on Windows 11
The standard openssh on windows 11 will not use the "askpass" unless
SSH_ASKPASS_REQUIRE is set to "force".

see: https://github.com/PowerShell/Win32-OpenSSH/issues/2115

Change-Id: I96a32e333a39e0cf5f5dab4c0f9c201b20daf533
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-27 10:27:56 +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
hjk
d6fe357d81 Utils: Use a proper class as Key
The Key encapsulates now a QByteArray.

Plan is to use QByteArray::fromRawData on literals, but that's not
active yet due to an unclear ASAN report, see the gerrit discussion.

For now we also paddle back when interfacing QSettings, instead of mimicing
writing a QVariantMap (and fail in some corners), always convert
the Store. This is meant to go away in the future when code paths
are better controled.

Change-Id: Id1206a434d511f8003903d5322c7c9bd5f5fb859
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 09:41:44 +00:00
hjk
d3b9b9b2d1 ProjectExplorer: Move some compiler detection path setup one level up
Not the big win yet, but doing the activity just once instead of
previously nine times.

Change-Id: Ibe8a782e1261228ef1ea8891878c45ea19e9bcf2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-27 09:26:29 +00:00
Christian Stenger
cd5cbd64f7 SquishTests: Fix finding line edit on wizard
Change-Id: I26be629e11e2d768b3afed518cd6026028d2e17a
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-27 08:43:11 +00:00
hjk
0df7fe319d ProjectExplorer: Remove some repeated checks
This should already bark in the ToolchainDetector nowadays.

Change-Id: Id835b4e2946f78cf508b13d75aeb08a289346806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-27 08:41:19 +00:00
hjk
fa58a55b4f ProjectExplorer: Move path collection in gcc autodetection one level up
Closer to doing it just once.

Change-Id: I8d9c7d8c4d3b7bd3afb57eb612eaae9bc4f7b616
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-27 08:33:48 +00:00
Jarek Kobus
d04585b519 CMakeProjectManager: Remove unused arg
Make some methods static.

Amends 05614ab740

Change-Id: Ia72a95c0c3bf0acf7a94e1bac0a162db23aa0c77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-27 08:17:19 +00:00
Eike Ziller
288d2e76bc FancyLineEdit: Fix some warnings
- initialize opacity (was never used uninitialized though)
- fix include

Change-Id: Ic3a9f8154f1c4bd77e759b6b45ee06b20a394c8d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 07:58:06 +00:00
Ali Kianian
1bee70d07b QmlDesigner: Modify the background color for the ComboBoxes on ToolBar
Task-number: QDS-10706
Change-Id: Id67479d771ee0f8ac6b6116703ad2821517374cd
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-27 06:51:52 +00:00
Ali Kianian
2df11c8bf7 QmlDesigner: Tweak the Lowest Common Ancestor function
* LCA function accepts generic containers as the argument
* LCA returns an invalid node as the result if a node belongs to a
different model
* An additional condition is added to check the validity of the parent
nodes for the cases which a node has an invalid parent

Change-Id: I9d9c1891e75a3a6a84e797deed5210c02fd92522
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-27 06:50:05 +00:00
Ali Kianian
abc0139b58 QmlDesigner: Rename CollectionModel to CollectionSourceModel
Change-Id: Ic6ec8809061f4fe235d71ebcdf3e9e92c6df7654
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-27 06:32:47 +00:00
Eike Ziller
0a1439f8d7 Merge remote-tracking branch 'origin/12.0'
Change-Id: If690e9455a4ca5a26fae0974b3cdb8bd5338677b
2023-09-27 08:28:46 +02:00
David Schulz
7adee4da24 Utils: allow specifying the requested extension for searchInPath
Reducing the expected executable extensions can improve the performance
for search in path on Window. Especially if PATHEXT and PATH has a lot
of entries, since we collect file attributes for PATHEXT entry count
times PATH entry count file paths. Use this optimization in the android
toolchain to search for java.exe on windows.

Change-Id: I2c2865d685c2de0c03a0fa1fbe7e8afd283174da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-27 04:32:11 +00:00
Marco Bubke
d5f66a07e2 QmlDesigner: Fix build for project storage
Change-Id: Idd2285f7266dde85110af200e8b0d046edaa34ee
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2023-09-26 16:01:57 +00:00
Marco Bubke
5f20ccfde7 QmlDesigner: Don't use view in model node
Change-Id: Ic4d41a975355f4b386de50622fe2ca6ec217c97e
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-26 15:39:04 +00:00
Miikka Heikkinen
8da35ac06d QmlDesigner: Show snap interval on drag tooltip in 3D view
Fixes: QDS-10751
Change-Id: I7c13075ae726c1f33992ec52c554491a21f7e5c1
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-26 14:42:15 +00:00
hjk
fbbb78ee7e ProjectExplorer: Actually instantiate the DeviceTypeKAFactory again
Task-number: QTCREATORBUG-29647
Change-Id: Ic2d29ae8d053f6526d6c5e4f4370153ab5b7d902
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-09-26 12:03:22 +00:00
Cristian Adam
ec13beff1c CMakePM: Initial import of the RSTparser
Change-Id: I45bc3d53df3358c1f52ca219b53a1dec8e85a4ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-26 10:43:34 +00:00
Semih Yavuz
ef88a5c3d0 designer: Fix livepreview crash
Show Live Preview can be triggered with key sequence Alt+P even if you
are not in the designer view which results in access to invalid
pointers. To fix this, replace the check in action handler with
safer isValid which checks the validity of view and initialize live
preview for valid contexts.

Fixes: QTCREATORBUG-29642
Change-Id: I9dd1741f1de2722a7ac715a2726b6effbe91529c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-26 10:30:46 +00:00
hjk
75cfa8a222 Project: Avoid a temporary in gcc toolchain autodetection
Change-Id: I4bd1ee6b63cf2e18ddd83649ee869566011b990f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-26 10:24:58 +00:00
Marcus Tillmanns
bb8961c893 CompilerExplorer: Cleanup
Split up EditorWidget constructor into member functions.

Change-Id: I4c762671263b802612a750568f608ac1823b41a4
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-26 09:57:28 +00:00
Marcus Tillmanns
6e1c9825e8 CompilerExplorer: Add python template
Change-Id: If838a2a89df98763dc424fb6285daa4699cce7ab
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-26 09:57:21 +00:00
Marcus Tillmanns
b60a4705d0 CompilerExplorer: Add wizard template
Also include "src/plugins/**/wizard.json" into .gitignore.

Change-Id: Ib0576df15af4c112a4a27101d337522db6c19f25
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-26 09:57:10 +00:00
hjk
9e241add5f ProjectExplorer: Remove an unused include
Change-Id: I46e5a2e3cdd4b3abc6108a8d07f35d7a4d6a51f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-26 09:47:10 +00:00
hjk
e5f74d217b Core: Merge mainwindow and icore file pairs
So far the main window acted a bit like ICore's pimpl.
Aim at making that a bit more similar to other places.

The files are kept for now to not have to adjust #includes
all over the place and there's some hope to move code back there.

Change-Id: I150e2dd0971bfab44cba89e0c51bb3f37062b8d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-26 09:41:45 +00:00
Orgad Shaneh
1c24ef6406 Welcome: Fix initial display of side area
If the main window un-maximized size is small (below the threshold for
hiding the side area) and the maximized size is large, the resizeEvent
is called twice - once with the original size, and then on show, it is
called again with the maximized size.

The second call (with the delayed QTimer::singleShot), is called after
delayedInitialize() is done, so the side area remains hidden for a few
seconds before it reappears.

The commit that exposed this behavior is 0b85fc5aa0, which changed the
expensive toolchain loading to happen in delayedInitialize.

Solve this by emitting the signal only after the widget is visible.

Change-Id: I0ad2c16a42742046da6847a5f108b797f91fabff
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-26 09:33:33 +00:00
hjk
4d2f3e8b01 ProjectExplorer: Merge GccToolChainFactories further
This replaces the four classes from the GccToolChainFactories
hierarchy by a single (parametrized) GccToolChainFactory, but
makes the "RealGcc" one responsible for all autodetection.

This is a hack to move closer to a "scan only once" setup, and
temporarily necessary as there is currently one factory creates
one type of toolchain, so we need four factories for the current
four gcc-ish toolchain types.

Change-Id: Icbecb1be6e89cf5efad76baf92ef38ac63be074f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-26 09:26:59 +00:00
Marcus Tillmanns
61048fa737 Utils: Add AspectList::clear()
Change-Id: Ic3e90bc76d271c1bb3b84e545fae5ba1c7a10468
Reviewed-by: hjk <hjk@qt.io>
2023-09-26 09:02:45 +00:00
Christian Kandeler
873a719174 QmakeProjectManager: Speed up project importer
Change-Id: I0cc5661f76c1d8f9182473d5f8da18452e3f85bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-26 08:55:06 +00:00
Christian Kandeler
25c7390d0a ClangCodeModel: Start fallback clangd on demand
E.g. when a non-project source file is opened.

Fixes: QTCREATORBUG-29576
Change-Id: Ia99346a7a1016c4c7dcdb41ad6c8dbbc85ed95ff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-26 08:52:28 +00:00
Christian Stenger
658e2a3197 CMakePM: Fix build with Qt6.2
Change-Id: Iac128851da0aa7895d5c2352be550702fbc1e7f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-26 07:49:03 +00:00
Marcus Tillmanns
a43191497d Utils: Fix StringSelectionAspect
Previously the undo state was not updated when the value
was set from the outside before the gui model was setup.

Change-Id: I380916f888edd120f512089bdb94762977c11978
Reviewed-by: hjk <hjk@qt.io>
2023-09-26 07:37:44 +00:00
Marcus Tillmanns
d7ef2f816c CompilerExplorer: Fix saving
Change-Id: I7f6770170c76d636fa2d3631d9ff462da9e227bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-26 07:21:10 +00:00
hjk
e85f750deb ProjectExplorer: Remove a few toolchain friends
Change-Id: Ibc665d3ce0c9e1d65a5eee5dcc31e9c3369fd331
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-26 06:40:39 +00:00
David Schulz
6ff28649c2 ProjectExplorer: speed up clang-cl toolchain detection
Do not guess the extension when we already it's clang-cl.exe

Change-Id: Ifd0d069f466d4b01bc3cfadc456ea6c97ea30743
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-26 05:24:05 +00:00
Tim Jenssen
8e0e097f55 QmlProjectManager: use qmlpuppet as qmlRunCommand only at host
Change-Id: I7a8e33bdf1007f26e45514abde378ca9b6799c81
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-25 18:34:27 +00:00
hjk
359f6e54b8 ProjectExplorer: Reduce scope of projectexploererconstants include
plus a bit of cosmetics.

Change-Id: I744b28ebf4285bd61b948988a0192632f5b360a8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-25 15:55:40 +00:00
hjk
e0f6ed0fe7 ProjectExplorer: Move some code from derived GccTCFactory classes
... to base as preliminary step to merge the factories. Combining
the code paths is not part of this change to keep it mechanical.

Change-Id: Ia1a43000a1e3978eae85be36493a67a18ba0c3e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-25 15:53:21 +00:00
Marco Bubke
53e2115f63 QmlDesigner: Move the static function from ModeNode to ModelUtils
ModelNode is already quite big and there is no need add more utility
functions.

Change-Id: I5e81c320c4934fc452c05f21b3c878354f857424
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-25 14:22:27 +00:00
hjk
a7d2658520 Utils: Bark when encountering a default-constructed QDir::Filter
This would always result in no hits, contrary to NoFilter.

Change-Id: I22591581373eed10fb1d1f660f705992e9653d5a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-25 14:13:44 +00:00