Commit Graph

74059 Commits

Author SHA1 Message Date
Alessandro Portale
17ff9317cd Debugger: Ensure termination of lldb.exe
LLDB 12.0.8, which is included in NDK 23.1, hesitates to termiate when
being told to. Setting UseCtrlCStub to true helps with that.

Fixes: QTCREATORBUG-27723
Change-Id: If14f196cc18f0c6943b59702aca117101b66d02c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-16 06:16:44 +00:00
Christian Stenger
924806e10b AutoTest: Fix catch2 parsing when using prefixed commands
If Catch2 is used with CATCH_CONFIG_PREFIX_ALL the relevant macros
get a prefix. This patch enhances the respective parser to be able
to handle these appropriate.
This does not really take into account whether the define is set or
not, so the parse results will only be correct if the project can
be built.

Fixes: QTCREATORBUG-27704
Change-Id: I935de752ac6106524c45c027af3e0f43673c4578
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-16 06:16:38 +00:00
Christian Stenger
3b7029fbdc AutoTest: Fix handling of test cases with comma
Fixes: QTCREATORBUG-27705
Change-Id: I6e22df4e401dc52e8d8599cc8b4de16200093b03
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-16 06:16:31 +00:00
David Schulz
a91043d8ba Docker: assert on starting process in non device working dir
Change-Id: I7dd1040c77b3a7f7378b5567b7b5568af5f57848
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 12:59:48 +00:00
David Schulz
a750961f4d Python: make sure working dir is on python device
Task-number: QTCREATORBUG-27536
Change-Id: If9c8f88f2a871ec71b200020689a4ae9df1e8a6a
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 12:11:36 +00:00
David Schulz
d80a713b89 LanguageClient: move relevant snippets to the front
If a snippet starts with the current prefix move it to the front of the
proposed completions.

Fixes: QTCREATORBUG-27566
Change-Id: I568d34e4da596a8cf4f08eb88eb1ee865edbed70
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-15 12:11:20 +00:00
Eike Ziller
a7d8698bf2 Fix generating .user files when creating projects
Amends 525ea8a1ec

Change-Id: I04b2e55b986278b93ae88dd3163e63cafefdd546
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 10:52:58 +00:00
hjk
44764bc54e ProjectExplorer: Replace a non-FilePath based mimetype use
Change-Id: Icac2f3b2b79f725151a6947a0a6f544f51b31fd7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-15 09:30:21 +00:00
hjk
56a3afef3c Utils: Remove mimeTypeForFile(const QFileInfo &fileInfo, ...)
Use the FilePath based overload instead.

Change-Id: I048bcbf891f10683428c73130db882253c169333
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-15 09:27:39 +00:00
hjk
a29944c68e Core: Remove another use of mimetype from FileInfo
Change-Id: I9f0b789f60c78de059bf10c36aab2d6a60da9f3e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-15 09:25:57 +00:00
hjk
5304042d2b QmlProjectMananger: Remove a use of mimeType via QFileInfo
And a bit cosmetics.

Change-Id: I3e64b661d86cadad22422c2bffad0ed1262283b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-15 09:23:39 +00:00
Christian Kandeler
9ecc7b356b QtSupport: Make sure Qt 6 matches a Qt 5 version requirement
... of a wizard.
For example, the QtQuick application wizard specifies "Qt.5.6" as a
required feature, which has the implicit semantics of "Qt 5.6 or
higher". On the C++ side, a QtVersion adds its exact version x.y plus
all lower ones down to x.0, in an attempt to somehow implement
versioning semantics using tags. This means that versions 6.0 and higher
did not fulfill the 5.6 requirement anymore, which was very likely not
the intention.
We therefore extend the mechanism to major version x-1, though in the
future we should probably come up with a less absurd approach.

Fixes: QTCREATORBUG-27612
Change-Id: I41d60809a02f0caddba7e702c91c01e86ecbd4ac
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-15 08:44:59 +00:00
Christian Kandeler
71b914b828 ClangCodeModel: Do not dump compile_commands.json into project dir
We can't know if it's safe to put there; e.g. we might overwrite an
existing one.

Fixes: QTCREATORBUG-27573
Change-Id: I928408996759aaccb84332fcf95cf43d7f3bf083
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-15 08:43:59 +00:00
Christian Kandeler
56e838da70 CMakeProjectManager: Check for generic ninja error message
... in the output parser.
This improves the user experience for the edge case that the failing
tool did not emit a (known) error message, and does not hurt otherwise.

Fixes: QTCREATORBUG-27606
Change-Id: I74cd327b1daff80ea2f46620e9d169a3db73578e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-15 08:42:35 +00:00
Christian Kandeler
04a23c38f0 ProjectExplorer: Pop up task window on first error
... rather than only at the end of the build process.

Fixes: QTCREATORBUG-27702
Change-Id: I114ef2898f26904e29d96b2cf65dcae4ee9a6121
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>
2022-06-15 08:38:10 +00:00
hjk
7f7768cdd1 Debugger: Add simple dumper for QSettingsKey
Change-Id: Ieaa702051066e7dcf7f0bd44d869e5a231c19112
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-15 06:29:55 +00:00
hjk
386c462a72 Designer: Use more FilePath
Change-Id: I9571c25c6c3dd430ccd3f7233a4f7290c9ba508b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-15 06:20:30 +00:00
hjk
a9245bf186 LanguageClient: Use more FilePath
Change-Id: Ia4ffec1fd2c6bd8dc2cce40efa49e3b4a4634f15
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-15 06:20:22 +00:00
David Schulz
9b08363d82 Coco: update annotation color on font settings change
Change-Id: I7812fccb047d696701d477ae85697facdb1c0361
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-15 05:46:44 +00:00
David Schulz
2b428d5de0 Python: prefer python from path when detecting python for document
Change-Id: I794a741fa7257833f0b4efbc25dfae43b8748427
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-15 05:44:46 +00:00
David Schulz
02bfd03c22 Python: simplify detect python for document path
Change-Id: I49b943e8b89db32c11b12ee66c0ad3add9a695af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-15 05:44:42 +00:00
Christian Stenger
3341fa827f Debugger: Fix handling breakpoints of same file names
...while qml debugging.

Fixes: QTCREATORBUG-24803
Change-Id: Ieedeb13236f8129a1f6d445de5218462c8d0676a
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 05:27:51 +00:00
David Schulz
601cb16893 Debugger: set the inferior executable when attaching to a run control
The inferior is used to verify that the bitness of the selected debugger
matches the inferior bitness on windows.

Change-Id: Ide7703a1ecc63a7d69101df779ce7f2660fecdbc
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 04:37:03 +00:00
Alexander Akulich
2bf46d9e7f TextEditor: Add an option to hide file line ending combobox
Change-Id: Iae8160f7cd567fc6d42116837fc367fa6dffdc4b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-14 20:11:26 +00:00
hjk
525ea8a1ec ProjectExplorer: Remove last use of mimeType via QFileInfo
Change-Id: I7097a1198fd99540bd945ea203bc2033fbcfef6c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-14 15:02:56 +00:00
Christian Kandeler
33f78fa27d QmakeProjectManager: Also consider the "Forms" virtual folder
... for the "Hide Sources and Headers" setting.
A .ui file usually corresponds to a source (and possibly a header) file,
and the user very likely wants the option applied to it as well.

Fixes: QTCREATORBUG-27482
Change-Id: I8652d8a9e7686239bcaef8f90d070c794fd5f993
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 14:26:26 +00:00
hjk
79e467a8b8 CppEditor: Remove one use of mimetype via QFileInfo
Plus some cosmetical changes I could not resist.

Change-Id: Id2634d3876437a5dfe7ddb4aaa53db396f37e02a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-14 14:26:10 +00:00
hjk
bf8bf1adc0 Utils: Also use device name when trying to disambiguate path displays
With two /tmp/foo.cpp from different devices there is no directly
visible difference in the Open Documents. Adding the device path
for remote cases introduces a difference.

For local files there is no visible difference.

Change-Id: I6f1632d6f51ff24573831af3161492989c5c0bec
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 13:50:54 +00:00
Christian Stenger
734035194b PE: Move ResourceFileNode to ProjectExplorer
Avoids additional dependencies later on. No functional change.

Change-Id: Idc21ed856f4f31d68d55742b5796243227b254dc
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 13:44:42 +00:00
Christian Stenger
b28f907114 AutoTest: Use QtcProcess for test runner
Change-Id: I29b15a08a260aaf8d2c4071d5ea71d49902d8ef6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-14 13:33:20 +00:00
Christian Stenger
dcbeb354f4 AutoTest: Only display function name if we have one
Should normally not happen, but may happen if we face sanitizer
issues.

Change-Id: I5e99fb99f241e24f507f94bce9009c2212188691
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-14 13:33:01 +00:00
hjk
91b8433cbd ProjectExplorer: Remove an explicit mimetype from FileInfo use
Change-Id: I96e6cfcb5c8f42487d693e1a55448b3441d796ba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 13:31:05 +00:00
Eike Ziller
fd90cf0a82 Fix debugging on iOS
The RunControl nowadays asks
DeviceManager::deviceForPath(runnable.command.executable) to get the
device, instead of passing that through the runnable.

Since the runnable's command executable is set via
IDevice::filePath(pathOnDevice), where "pathOnDevice" by default is from
the executableAspect, IDevice::filePath should actually return a
"global" path in the form of "device://<device-id>/<path-on-device>".

Since we do not want "device:...." paths for the desktop, return the
simple path in that case only instead.

Fixes: QTCREATORBUG-27709
Change-Id: I75f9406cf3254980e1fee203275b0e72202b7b6d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 12:59:37 +00:00
hjk
4e69aece65 RemoteLinux: Hack in a way do make the MakeInstallStep work with docker
A proper solution would be a proper step handling the copy from
the build container to the device. Instead, rely on the (unchecked)
mounting of build directory from the host file system.

Task-number: QTCREATORBUG-27325
Change-Id: I1a364460c08f205dbc341fa0dc941cf1e3c950ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-14 12:48:27 +00:00
Christian Stenger
6c4d5ef3c7 Modeling: Fix crash while reset model
Fixes: QTCREATORBUG-27226
Change-Id: I1333379a99ff5ebd08b121f2f014c6971a192699
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 12:47:59 +00:00
Christian Stenger
a370c154d0 QmlProjectManager: Fix crash when building with Qt5
Change-Id: Id5af5b6dfe4613f2a0669febee4622944854a999
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-14 10:35:38 +00:00
Eike Ziller
7bd703d123 Increase ctest timeout for tst_qtcprocess
Default is 5 seconds, which is by far not enough.

Change-Id: I4a5851de3ec2268bd68b6a386efa8dfa181e0af3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-14 09:59:59 +00:00
Jarek Kobus
0b2899215f Introduce ProcessBlockingInterface
This replaces the ProcessInterface::waitFor...() methods.
It's not obligatory to provide this interface when
implementing ProcessInterface subclass. In this case
generic blocking implementation will be used.

The generic implementation usually isn't as efficient as
the custom one, however, for some sophisticated implementations
of process interface, like e.g. SshProcessInterface, providing
custom implementation is really difficult and error prone.

That's why we try to keep a balance: we provide two custom
implementations for QProcessImpl and for ProcessLauncherImpl,
as they are relatively easy to implement, and rely on
generic implementation for others.

Change-Id: Ifc8bd354479ec67b2e8f74f1510f8de8883e9b94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 09:45:28 +00:00
Jarek Kobus
0efb8d3346 GenericLinuxDeviceTester: Don't continue testing when echo fails
Change-Id: I4b21e1b914816271d59f9001122aedf1eda342dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 09:19:02 +00:00
Jarek Kobus
12dde16e3e DeviceSettingsWidget: Fix testing newly added device
Save settings before starting a test, otherwise the
test for newly created device fails since the new
device was added only for the clone of device manager.

Change-Id: Ia36d2ef68740907d7fce51e31c352328de83421c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 09:18:29 +00:00
Jarek Kobus
17ebce2a7d Fix public key deployment in device wizard
Since there is no easy way to make device temporary added
into cloned device manager, we construct a full ssh command
manually inside PublicKeyDeploymentDialog.

Fixes: QTCREATORBUG-27706
Change-Id: I28e368a5bff0d89094115e9eaee1395b388359fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 09:03:58 +00:00
Cristian Adam
50bbe41acc GitHub Actions: Update Qt version to 6.3.0
To be in sync with coin and packaging jobs.

Change-Id: I71e95e8283c70a17c42dadeb893ad4b24977f574
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 08:36:15 +00:00
Christian Kandeler
1bc188222a ProjectExplorer: Fix crash in toolchain widget
Amends d73d5fe0b1

Fixes: QTCREATORBUG-27696
Change-Id: Id94f39cd4fc6768af3f66039f808ed7c974cfeed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 07:51:42 +00:00
Eike Ziller
db2cc2ba27 Add install command to wizard generated CMake files
Add a default install(TARGETS ...) command.
It doesn't hurt on desktop and mobile targets, and it is required for
deployment on remote Linux devices.

Change-Id: Ib39c6130b63a9a699ff5cd81756c2913b1246142
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-14 07:45:00 +00:00
Cristian Adam
f4bf5f5cd7 GitHub: Add pull request template
Add a pull request template to inform the potential contributor that the
github Qt Creator presence a mirror is, and that the only way to
contribuite is through gerrit.

Change-Id: I5ddc93f182aaaa87e465677a28705ac5efa04f7f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-13 15:26:31 +00:00
Christian Kandeler
75502f2998 CppEditor: Fix check for static-ness
... in generate getter/setter quickfixes.

Fixes: QTCREATORBUG-27547
Change-Id: I29e937ae28c0bce7cd7745b92f371b97876f3e01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 14:10:25 +00:00
David Schulz
9c13db448b CppEditor: remove unused function hint provider
Since we removed the libclang based backend both implementations of
ModelManagerSupport::functionHintAssistProvider returned a nullptr.

Change-Id: I113c5a08cf604eb1bb2a64a851f022ecd5c908d6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-13 12:11:24 +00:00
Jarek Kobus
a1bb539c50 LiteHtmlHelpViewer: Handle mouse back/forward buttons
Fixes: QTCREATORBUG-25168
Change-Id: I856743040e81a0164e666f14ea7efd10f208f865
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-13 11:09:56 +00:00
hjk
f974488128 ProjectExplorer: Move makeInstallCommand()
... from Project to BuildSystem.

More direct and less use of Target::activeBuildConfiguration().

Change-Id: I148381d23be0f9ab0750ed1440e1b2b3e25aded0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-13 10:22:40 +00:00
Christian Kandeler
9a411245d3 qbs build: Require Qt 6.2 for QmlDesigner
As in the cmake build.

Change-Id: Iedd7032093682e7cf6f423909724201f6c5840d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 10:09:09 +00:00