Commit Graph

62421 Commits

Author SHA1 Message Date
Jarek Kobus
a85fa172c2 DesignModeContext: Don't leak context on shutdown
Make passed widget a parent of the context.

Fixes: QTCREATORBUG-27570
Change-Id: Ifbc9db8d5b3fb95566e2c6b83df9c10d02f7c0e5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-01 08:37:01 +00:00
Alessandro Portale
f27eb94669 Android: Deduplicate identical ABI conversion code
...and use Utils::transform instead of a loop.

Change-Id: Ie4127f5e1e8408a544bb7b44ceae3091a21d2644
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-07-01 08:29:16 +00:00
hjk
212527ecd5 Debugger: Use FilePath for remote core files
Change-Id: Ie5782c18ecafcd9725c89da51b118560e668861d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-07-01 08:17:06 +00:00
Marcus Tillmanns
cd86b048cd kitdetector: Fix detection on macOS
On macOS calling clang sometimes produces some output to stderr.
This would be captured by "runGcc" when detecting the triplet, which
would then show up in the preferences and had negative effects
on abi detection later on. To work around this, we only capture
the first line of output.

On macOS the auto detection code incorrectly assumed that if the
architecture is different it would not be able to run on the host.
This is not true if the Host is Arm, and the target is x86.

Change-Id: I3cd151dc6ad83142fb9643ba7b03a155e754c6d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-01 07:28:38 +00:00
Eike Ziller
6063f5c89c Fix mnemonic conflict between Edit > Preferences and Paste
Change-Id: Ib9a991c960c694338a1f75148a1715f669caaa45
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-07-01 07:25:20 +00:00
Christian Stenger
3ac57b0340 Tests: Fix expectation in sdktool test
Change-Id: I421517b069ba5aca6b89eb9b5cf04face286b86e
Reviewed-by: hjk <hjk@qt.io>
2022-06-30 14:10:29 +00:00
Christian Kandeler
88956d1e9b CppEditor: Try to find clangd include path more generically
Linux distributions can get creative with the location of the clang
headers. So if we find a clang executable alongside clangd, ask it for
the base directory and try the hardcoded paths only as a fallback.

Fixes: QTCREATORBUG-27760
Change-Id: I9480b170df05598255c01be44be4b0312d0929f8
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-30 13:02:05 +00:00
Miikka Heikkinen
e661135d13 QmlDesigner: Remove QML Image level caching of items that can change
Icons generated for components can change if the component is edited,
so don't cache them locally at Image level.

Also increased the compression timeout for component library updates as
200ms can sometimes be too short during project load.

Fixes: QDS-7068
Change-Id: I98a0920c4237a1147e9fb5da834e1dc235ae28f5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-30 12:04:57 +00:00
Miikka Heikkinen
3cda011608 QmlDesigner: Only notify possible and used import changes when needed
Fixes: QDS-7193
Change-Id: I5d24392c0550c9c5506ee64af329883a52554fe3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-30 12:04:25 +00:00
Marcus Tillmanns
2d82f2173d Ssh: Use DeviceShell in LinuxDevice
Change-Id: I165f888dbb1e7072c35ec88ce5fd8a7ae4562139
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-30 10:55:43 +00:00
Artem Sokolovskii
2f18256633 Clangformat: Brings back some of checkboxes
Brought back checkboxes: format while typing, format on save.
Brought back format while typing feature.
Global checkboxes will be hidden in project settings,
and visible for global.

Change-Id: I193cf9e13b10de22091edb5fe04aef957dd74586
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-30 10:36:49 +00:00
Marco Bubke
b604389b6b QmlDesigner: Prevent reformating
The QmlDesigner predates Qt Creator and is using longer line limit. To
prevent strange formatting this .clang-format file is relaxing the
limits a little bit. It's is still 100 letters but it can be longer if
otherwise "strange" line breaks are introduced.

Change-Id: I26bfdf4e7a62ed2daf09b5673dac30be7b3cec5c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-30 10:11:21 +00:00
David Schulz
7899fd6fc4 Core: fix opening multiple broken Files
Fixes: QTCREATORBUG-27777
Change-Id: Ia606fe3b8a72ff32478002e3b3f672a4821fe115
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-30 09:28:36 +00:00
Henning Gruendl
4972b8fad6 QmlDesigner: Add icon section to AbstractButton
* Add icon section to all property editor specifics related to
  AbstractButton
* Add icon as a banned property for MCU
* Fix disable state in FilterComboBox
* Add QQuickIcon as a special type in node meta info

Change-Id: I77595337a049952ab030210d90bc1a11327cf79c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-30 09:14:07 +00:00
hjk
3be472c8d2 ProjectExplorer: Use FilePath for sysroots
... and reduce to the relevant part when passing to cmake.

Task-number: QTCREATORBUG-27229
Change-Id: I7cde2ff04530caf439d6707c2c6d15a8e734ae0b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-30 09:06:29 +00:00
Jarek Kobus
6b8a5aeaf4 McuSupport: Don't call waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: Iec035eb6c433fc354c83123f2d7f2c3517bd6bbe
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-30 09:02:14 +00:00
David Schulz
d09081d07c CppEditor: Initialize pointer member with nullptr
... when generating missing Q_PROPERTY infos.

Fixes: QTCREATORBUG-27770
Change-Id: I31d13ae6d6ed5b2be354097d48303d0cadfa253e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-30 08:48:55 +00:00
Jarek Kobus
214ba16fee QbsSettings: Get rid of call to waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: I35ebd4020b99d2498d903d4b02a65eb61f6ab1f9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-30 08:26:25 +00:00
Jarek Kobus
bdf79d41b2 AbstractProcessStep: Don't call blocking waitForStarted()
Connect to started() signal instead. Delete the process
later when process failed to start.

Change-Id: I9901a52c90b018af06348892e2bd97cf967418af
Reviewed-by: hjk <hjk@qt.io>
2022-06-30 08:26:15 +00:00
Jarek Kobus
369ec34d05 BaseQtVersion: Get rid of call to waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: If2f419aca9856c5413754e0be15d828be01eb353
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-30 08:25:53 +00:00
Jarek Kobus
360f9ed7c6 DebuggerSourcePathMappingWidget: Don't call waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: I7dbc7c8ddb3ab52513420aae1bada2a7260ad687
Reviewed-by: hjk <hjk@qt.io>
2022-06-30 08:22:49 +00:00
Jarek Kobus
ac4a4ded6c FormatTextEditor: Don't call blocking waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: I40a25e87bf5a5d1ece50715d72e2c48f4209344d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-30 08:22:15 +00:00
hjk
e22f50814d Utils: Hide some uses of FilePath::rawPath()
This basically inlines the current rawPath() implementation
on the user code side, keeping behavior the same.

Baby steps towards the originally intended swap of rawPath()
and rawFilePath() implementations.

Change-Id: Ib61887bfdc4485a17856c0dbc7c7c5dba7c3e0e3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-30 06:24:18 +00:00
David Schulz
b1eadd3bc6 Editor: hide "Hide mouse cursor while typing" option on mac
The mouse cursor is hidden unconditionally in Qt, so do not give the
impression that this can be disabled. Also we have a bunch of bug
reports that claim that the cursor does not come back if the mouse is
moved after typing. This might be caused by the double hide of Qt
Creator, Qt and the moon phase.

Fixes: QTCREATORBUG-27572
Change-Id: I11b39cac6cd8eb0717fca00d1812a4e052223f21
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-30 06:22:17 +00:00
Jarek Kobus
a12169a006 QbsProfileManager: Don't call blocking waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: I9191cc40d98f496f12537fdd12634cfb09dffdbb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 16:12:12 +00:00
Jarek Kobus
b07763c3f1 SshKeyCreationDialog: Get rid of call to waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: Ibeaeca8019ff3da98bedba75c96171b2a4ccc651
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 15:42:21 +00:00
Jarek Kobus
e8cbfb7614 TerminalImpl: Don't call blocking waitForFinished
Use close() in order to finish running process instead.

Change-Id: Ie9ba02ef75432ff4a54761b586b9a04a6af2d5f8
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 15:29:54 +00:00
Jarek Kobus
35e5520331 CppCodeModelSettings: Get rid of call to waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: Ifc63feb2abbbc38bf4b119489ceb07320c383499
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-29 15:26:39 +00:00
Jarek Kobus
953a3abe92 IosSimulator: Get rid of call to waitForStarted()
This is unneeded when followed by waitForFinished().

Change-Id: Ief0e786290d590ed749dc2373bf53936e320b841
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-29 15:25:54 +00:00
hjk
29bd1b025a RemoteLinux: Translate manually provided gdbserver paths
Similar issue as the one in the referenced task.

Change-Id: I71d7c50d2e6192ec7d8dca0294e087f7c8d6361a
Task-number: QTCREATORBUG-27752
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-29 15:13:25 +00:00
Eike Ziller
6c98721efc Merge remote-tracking branch 'origin/8.0'
Change-Id: I552d201d09d62d21655176467088c6e48b8a2fe2
2022-06-29 15:29:49 +02:00
David Schulz
56faa204bd Editor: update ksyntaxhighlighting engine to v5.95.0
Task-number: QTCREATORBUG-22558
Change-Id: I475730f342e7cc822fecdf7c9db64dc47baea83a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-29 13:01:18 +00:00
Cristian Adam
5edbf915a4 CMakePM: Fix registering CMake as version 0.0.0
When importing a CMake build, the CMake version that's used in the build
could be registered as "CMake 0.0.0". This is obviously wrong.

Fixes: QTCREATORBUG-26999
Change-Id: I1401106806c4356516e8235a3767d9615e4d428d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-29 12:41:34 +00:00
Eike Ziller
f4c60fdf58 Git: Do not run 'git --version' synchronously at startup
We can easily delay this, and if git acts up for some reason, we don't
have to block startup.

Task-number: QTCREATORBUG-27765
Change-Id: I25aa6f8d04d1fd4b9d87f8ccf7ffd591f7bbe519
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-29 12:39:28 +00:00
Christiaan Janssen
75b5d1baf1 McuSupport: add template for qmlproject-based projects
Adds a new option for creating qmlproject-based MCU projects
in the "New Project" wizard. The generated qmlproject file
contains all the supported properties and nodes, prefilled
with their default values, for easy tweaking by users without
requiring to dive into the documentation.

No extra fonts, translations or images are generated, but
empty placeholder nodes for them are found in the qmlproject file,
for the user to fill in.
One custom module with a simple Text item is generated, in
order to demonstrate how to use the modules feature.

The required QmlProjectExporter version for building the project
is the one packaged with Qt for MCUs 2.3.0.

Task-number: QTCREATORBUG-26042
Change-Id: I4569306f2f6e7b9370dfa65cacd0b65c2e4fcb06
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-29 12:27:34 +00:00
Eike Ziller
b364cfde23 Install and ship change logs
And add a menu entry Help > Change Log... (macOS: Qt Creator > Change
Log...) for looking at them.

Change-Id: If444b3ff2465290b9beb4ccbb8d0ddf32a636db4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 12:04:37 +00:00
Artem Sokolovskii
8f1a9ea6d7 Revert "ClangFormat: Remove format while typing feature"
This reverts commit 323ba720db.

Reason for revert: The feature is needed

Change-Id: Iaf09ef91c49ff0c85c1b5906a1c1464bd8e4cae6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 11:53:04 +00:00
Mahmoud Badri
234958a47a QmlDesigner: Enable drag-n-drop a material to a model in Navigator
Fixes: QDS-6694
Change-Id: I2fb32052559b1d459cc8025e9f30368b0189e8ab
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-29 10:32:03 +00:00
Jarek Kobus
a0de1f1848 QmlProjectPlugin: Don't leak action on shutdown
Detected by memory analyzer.

Change-Id: I5c1ba80e9a1e1ca620b496ebe6cd9bb600e8b800
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-29 10:09:56 +00:00
Cristian Adam
175a61ad1b CMakePM: Better error message for no CMake present case
Currently if no CMake has been registered and a CMake project has been
openend the user will get the error:
"CMake version  is unsupported. Update to version 3.14 (with file-api)
or later."

With this patch the user will get the error:
"The kit needs to define a CMake tool to parse this project."

Change-Id: I555884fff1eac321052998d1ef7970a49b2f44af
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 09:40:44 +00:00
hjk
bbf16bba37 CMake: Use a more correct exclusion of auto-setup.cmake
It currently can't work for any remote setup, not just for docker.

Change-Id: I597dc9a0d51f0dafb6c45c635bef0cd047a4ab2c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-29 09:27:15 +00:00
David Schulz
61e291688f LanguageClient: outline drag support
Fixes: QTCREATORBUG-27502
Change-Id: If5b8226c03886fb7c050c9d99941c9942ef47593
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 09:16:33 +00:00
Christian Kandeler
9cbe2439dd CppEditor: Do not highlight macros as preprocessor statements
Macros are used like identifiers; there is no reason why they should need
to have the same highlighting as a preprocessor directive.

Fixes: QTCREATORBUG-23548
Change-Id: I186befc06ccb36a00451fd707c41e3687a84af14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-29 09:08:27 +00:00
Alessandro Portale
83c380665d Android: Try harder to get a valid ABI in apkDevicePreferredAbi
For AndroidDeployQtStep::gatherFilesToPull to pull the right
app_process, the first attempt at getting the ABI is a peek inside the
APK.

If that APK does not exist yet (due to clean 1-st time build), it falls
back to get the "AndroidAbis" from the project node. That fails in the
case of CMake because AndroidAbis is only set by qmake, and never by
cmake.

Thich change adds another fallback to query "AndroidAbi" instead.

Fixes: QTCREATORBUG-27737
Change-Id: I2e944d6d30a61047b4c66ed73211296c87d57b51
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 08:46:36 +00:00
Leena Miettinen
b1f7172077 Python Language Client: Fix typo in translatable text
Change-Id: I11a0161b76661fd876b47dc5aa23ce2449258ae0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-29 08:24:54 +00:00
Marcus Tillmanns
3958087124 deviceshell: fix hang on multithreaded access
When outputting a commands stdout / stderr / exitcode,
the shell was free to interlace different outputs.

This could trip the parsing of the output, leading
to the shell missing the exit code of a command.

When that happened, the caller might wait indefinitely
for a result that would never come.

To workaround, the shell script now writes each command output
to a temporary file first, which is then written to stdout
by a single subshell, that way guaranteeing that the output
of multiple commands will not interleave

Change-Id: I9d8e7e788f5922c612ff533e5ba063f61a22aa8c
Reviewed-by: hjk <hjk@qt.io>
2022-06-29 07:28:46 +00:00
David Schulz
8130d895c8 Revert "Editor: Update current argument in function hint"
This reverts commit 7d4d57165c.

The change signal should be send from the editor widget, so no need to
call it again from the function hint widget, since it also cancels the
automatic proposal timeout that triggers the automatic completion
request.

Fixes: QTCREATORBUG-27305
Fixes: QTCREATORBUG-26959
Change-Id: I37810e0a6083396bd0375b4ae28aa07389a5079c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 04:43:56 +00:00
David Schulz
b20ffaa109 LanguageClient: sort outline items
The order we get from the server might not be in the order of appearance
in the document.

Fixes: QTCREATORBUG-4346
Change-Id: I0badba7fd40619b2aa20a81b6a86b43dc9e6a1b1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-29 04:39:43 +00:00
Jarek Kobus
e5942932f4 QtcProcess: Remove unused signals
Change-Id: I5ceca4310de670dc52542607c549a159cbe697f9
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>
2022-06-28 17:30:23 +00:00
Jarek Kobus
a1ad64a50b GitClient: Don't call blocking waitForStarted()
Connect to done() signal in order to detect the start
failure and try to start a gitk from different path.
All trials of starting gitk are done sequentially
and non-blocking.

Give process a parent in order to avoid process leak
on shutdown.

Change-Id: I1d74bfeaca23d38643f3d2f262428732314aefe4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-06-28 17:29:50 +00:00