Commit Graph

62421 Commits

Author SHA1 Message Date
Marcus Tillmanns
1ba366c5c0 Debugger: Fix environment when initializing
Previously when detecting / checking debuggers the process would be
started with the Host environment set. This was incorrect for remote
debuggers.

Change-Id: Icd210dbfc9437e9abd2e0c4248e5503129bf6d8b
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 13:08:14 +00:00
Alessandro Portale
43ba40530c CMakeProjectManager: Set ANDROID_USE_LEGACY_TOOLCHAIN_FILE to OFF
Task-number: QTCREATORBUG-28442
Change-Id: I190ba68df5a71ae352c49c96a64e9a3777880368
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-17 12:56:52 +00:00
Marcus Tillmanns
c699249bc4 QMake: Fix path cleaning
The .pro file path is QString compared when trying to import
an existing buildfolder. This broke since resolvePath() does not
necessarily clean the path anymore.

Fixes: QTCREATORBUG-28409
Change-Id: I10286f086762b8f8dd9020aa4003317ff6180e12
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-17 12:13:11 +00:00
Alessandro Portale
9fc27b3bb4 Utils: Fix "unused parameter" warning for non-macOS
Change-Id: I4dc8a02a0476a34535352b110e140d98077b59d5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-17 11:47:51 +00:00
David Schulz
895f88f63a ProjectExplorer: create a root path without scheme for host device
Change-Id: I966db6378dca533c73635803fb177d31b2c625ac
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-17 09:39:35 +00:00
Marcus Tillmanns
74d915d6aa Docker: Add default search path for docker binary
Change-Id: I86e02f726e9dac7302c3435f53fdb47c70fffafd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-17 09:11:58 +00:00
Jarek Kobus
1ecde217a0 QtcAssert: Print the time of log
Sometimes, after I close Creator, I notice a bunch of logs
being written to console. However, I really don't know when
these logs happened - on close of Creator of much earlier
(e.g. 1 hour ago). Having times in log may help to link
the log content with the recently executed actions inside
Creator.

Change-Id: Id53c1eecd315917211b04adbd82669eb8865be81
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 09:09:15 +00:00
Christian Stenger
de286be2dc Valgrind: Fix plugin unit test
Amends a7956df3ca.

Change-Id: I281df7e8c8a971de6398d78c0afc09bfc3625b71
Reviewed-by: hjk <hjk@qt.io>
2022-11-16 14:42:33 +00:00
Kwangsub Kim
c39d89199e McuSupport: Avoid empty string for cmake toolchain vars
At the first run of Qt Creator after its installation, MSVC toolchain
command is set lazily after it's detected, so an empty string can be
set to cmake toolchain variable when a Qt for MCUs kit is created
automatically. It needs be avoided to keep the cmake variables valid.
Even when the command is not updated, it will work correctly with the
default variale (%{Compiler:Executable:(C,CXX)}).

Task-number: QTCREATORBUG-28457
Change-Id: I5de277831e7f1e696f67724193938d6eef7a12dd
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-16 14:27:35 +00:00
Kwangsub Kim
86c8d2166e McuSupport: Remove empty packages correctly
The effect of rehashing on removing an item from a set was not
considered, so the empty packages were not removed completely in
the packages set of McuTarget and it randomly caused an invalid
status of the McuTarget.

Task-number: QTCREATORBUG-28457
Change-Id: I964862330cf4f8d2de88647125f65c2959db417c
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-16 14:26:40 +00:00
David Schulz
c1edc1e9df ProjectExplorer: Fix starting a docker project on windows
... by mapping the executable and working directory to the target
device.

Change-Id: I0a220fe9bae980cb279fae776962f23335eac248
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-16 14:01:55 +00:00
hjk
2d8dc4c779 Debugger: Disable re-running
It's currently broken in a lot of configurations.

Change-Id: Ic948bb619c4860ba0c0d81a383412e6d0b007367
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-16 10:10:33 +00:00
hjk
779dc52a97 Utils: Fix interrupting local processes on *nix
Change-Id: I6e722379ad62c98d1e8e6d445c1eeea171ff141b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-16 08:04:01 +00:00
hjk
ef658663aa Utils: Remove internal /./ relative path marker
Some creeped into settings earlier, making the paths that were
meant to be empty look non-empty.

Also add a test for FilePath::isEmpty().

Change-Id: I99e3dd673294206558f9fee9b7c7874d2441327e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-11-16 07:23:46 +00:00
Jarek Kobus
f8a3a4d04e SshProcessInterface: Don't use DeviceShell for control signals
It looks like starting device shell is fragile in some
circumstances.

Fixes: QTCREATORBUG-28072
Change-Id: I1a51d1fb939bd42884a55e1492de808bee89219f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-15 15:49:18 +00:00
Christian Stenger
8bbeef1f98 Core: Tweak handling of scratch buffer
If a temporary file is stored by using "Save As..."
the temporary state should get lost to properly handle
other actions, like closing a modified file, putting it
into the recent files list, or similar.

Change-Id: I94b3141bad1bd476056a774756071df5f60137aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-15 13:14:41 +00:00
hjk
e3b84dca1a Revert "Debugger: Avoid some temporary containers when parsing escaped chars"
This reverts commit 19ef8e5c7a which
introduced the following regression:

FAIL!  : tst_protocol::parseCString(octal) Compared values are not the same
   Actual   (parsed)  : "abc\u00C3\u00A4\u00C3\u00A9def\u00C3\u00B1"
   Expected (expected): "abc\u00E4\u00E9def\u00F1"
   Loc: [/data/dev/creator-out/tests/auto/debugger/tst_protocol.cpp(32)]
FAIL!  : tst_protocol::parseCString(hex) Compared values are not the same
   Actual   (parsed)  : "abc\u00C3\u00A4\u00C3\u00A9def\u00C3\u00B1"
   Expected (expected): "abc\u00E4\u00E9def\u00F1"
   Loc: [/data/dev/creator-out/tests/auto/debugger/tst_protocol.cpp(32)]

Change-Id: I59509fd61a54c335ab0a34f8ca0dffb3d75da696
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-15 11:40:29 +00:00
Jarek Kobus
adac83367c LinuxDevice: Fix stopping remote app when run in terminal
Before, the SshProcessInterface was trying to run kill
command (on remote host) for the running processId. However,
in case of terminal process the returned processId is an id
of ssh running through creator process stub, not the id of
remote process. The fix is to redirect a call to sendControlSignal
into the internal terminal process.

Change-Id: I57509fd61a54c335ab0a34f8ca0dffb3d75da696
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-15 11:11:39 +00:00
David Schulz
4b126550c1 Editor: completely repaint annotations on changed bounding rects
If the rectangle of an annotation changes we need to completely redraw
the annotation since the content might have shifted and the eliding
character is now at a different position.

Fixes: QTCREATORBUG-28411
Change-Id: I41b0f38a73b287e6a5d5318ba797aac6e2ff71b0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-15 06:50:59 +00:00
Robert Löhning
80885d12e0 SquishTests: Update tst_installed_languages
Change-Id: Ic06b6241df913ebcfe685936f3c509875a2897bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-15 06:45:00 +00:00
Alessandro Portale
993815cb06 ProjectExplorer: Fix build device retrieval in BuildDirectoryAspect
Change-Id: I40aeb4a775a99df7395f4c23476bae7f98201b69
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-14 12:46:35 +00:00
Rainer Keller
9bfc0a5b26 McuSupport: Sort displayed UI elements
The elements are sorted by their CMake variable to keep the order
consistent. Otherwise they would be sorted by their pointer, which leads
to a random order every time.

Task-number: UL-6614
Change-Id: Ie3520fb312044ccca4c9dc853e00ae2710b28d1c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-11 15:14:21 +00:00
Christian Stenger
8dd939bb27 Vcs: Do not expose passwords to the output windows
Partially reverts bbde6ac9bf and
3be9f52980.

Fixes: QTCREATORBUG-28413
Change-Id: Iccfb787a5261f3963e862554fa266d62ac49ca50
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2022-11-11 14:28:11 +00:00
Christian Stenger
a44bd1643b Squish: Fix creating test cases
Change-Id: Iad0e20a213d0a45a2b7d8a43d18d320e02949179
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-11 13:58:07 +00:00
Christian Stenger
47353584f9 Squish: Fix adding object by copy and paste
Pasting an object should directly add the object at the
right branch of the tree if necessary.
So, in case of having a container or widget property
the new item has to be added as a child of this.

Change-Id: I0d7398eec8ae7b5bf6414a525e695d52b13b1113
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-11 13:58:02 +00:00
Christian Stenger
b55c10f189 Squish: Fix object map handling on Windows
Ensure we are using UTF8 all over the place especially when
using external tools and their stdin or stdout streams.
This fixes bad encoding issues on Windows when having unicode
characters inside the objects map file.

Change-Id: Ic8e66a876abe0903308002cd25315b1eaa3788b1
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-11 13:57:56 +00:00
David Schulz
574d64436a ClangCodeModel: fix memory leak
amends 45317da25a

Change-Id: I27d3332f1a99676c174f18ff06d0cf0cea396b70
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-11 12:08:37 +00:00
David Schulz
cc196096e7 Editor: Fix relative line spacing
Amends 26bb95331b

Fixes: QTCREATORBUG-28438
Change-Id: I824ca3cea5578bcc0bd72bc30108f717d7194e83
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-11 10:19:43 +00:00
Christian Stenger
7b02984088 Core: Fix handling of displaying shortcuts in context menus
Change-Id: I19f93780bd2c21a3a54e0a4c1b9db87e2327d5ed
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-11 07:35:52 +00:00
Jarek Kobus
643d205364 TarPackageCreationStep: Make it cancelable
Change-Id: I7130ec6039383c3abb8c1266c4473205bded382e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-10 14:46:13 +00:00
Marcus Tillmanns
a71c036822 Boot2Qt: Fix default deployment method
This fix addresses two problems:

1) If no boot2qt device exists yet, no deploy step is created.
This is hard for the user to debug.
2) As the device supports rsync, an RsyncDeployStep would be created.
This is not optimal when the build device is remote, as the fallback
would not check if the target file is up-to-date first.

Therefore this fix adds another possible deploy step that will always
be created if either no device is available, or the build device is a
remote device.

Additionally this change adds an RSync deploy step if neither a remote
build device is set nor a target device.

Change-Id: I8959408e13d690d484ade9e837e7fa65eb106676
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-10 11:08:57 +00:00
hjk
cb11763641 Utils: Fix nullptr access when shell script process fails
When the QtcProcess failed to start, we immediately delete it.
Later it would try to access it to retrieve the command line
for the error message, which would crash.

Change-Id: Ibac942e9a1a91001d90ce7e73d5463c51af81590
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-10 09:36:17 +00:00
Artem Sokolovskii
39d04fb9e7 QuickFix: Fix generate function definition with unsigned type
Fixes: QTCREATORBUG-28378
Change-Id: Ic94901e430d08aab22c8f4c394eda1f8a93398bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-10 09:04:09 +00:00
Marcus Tillmanns
421e5d9c59 Utils: Better prerequisites check for DeviceShell
Check the existence of all commands used by the DeviceShell
script before trying to start it.

Change-Id: I7a69957a979f8eb021c45e54615ad8d38353d28b
Reviewed-by: hjk <hjk@qt.io>
2022-11-10 07:59:36 +00:00
Christian Kandeler
c89bef9dcd ProjectExplorer: Do not pop up the issues pane while not building
Otherwise, the issues pane can pop up due to a key press, as code models
refresh their diagnostic entries.
Amends 04a23c38f0.

Fixes: QTCREATORBUG-28330
Change-Id: Ic7e63a1bbbf3e4c37383849cfad05529bac23e9b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-09 15:07:28 +00:00
Christian Kandeler
45317da25a ClangCodeModel: Auto-start header file completion on trigger characters
That is, recognize '"', '<' and '/' as activation characters, like the
built-in code model.
Note that we do not actually start the LSP completion procedure for
these unless we really are in an #include directive.

Fixes: QTCREATORBUG-28203
Change-Id: I85727d0e392a27efa8549e7d6fa5f18f953774b4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-09 14:49:33 +00:00
Jarek Kobus
4e9eef339c TarPackageCreationStep: Secure data access
Don't read or modify private data from worker thread.
Move Preparation of the deploy file list into the caller
thread, as it is using e.g. pointer to Kit object, what
doesn't look to be safe when used from non-main thread.

Change-Id: I6523e8f46541f5f96d46fa98f0ba941c2ec46e74
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-09 13:36:10 +00:00
Kwangsub Kim
0be6ba955d McuSupport: Expand variables for automatic kits
An MCU kit that is created automatically also requires variable
expansion before the kit is generated. The same preparation for
the variables will be done as the MCU option page.

Task-number: UL-6603
Change-Id: I915f6f6e8c6e2a90409c527951e469c555002cff
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-09 13:00:00 +00:00
The Qt Project
5434de83b9 Merge "Merge remote-tracking branch 'origin/8.0' into 9.0" into 9.0 2022-11-09 11:28:25 +00:00
hjk
19ef8e5c7a Debugger: Avoid some temporary containers when parsing escaped chars
Change-Id: Ia9af6801de6f745388e464fc806297d396c66160
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-09 10:54:30 +00:00
Tim Jenssen
63d3a6bd3d Merge remote-tracking branch 'origin/8.0' into 9.0
Conflicts:
  src/plugins/qmldesigner/components/assetslibrary/assetslibrarywidget.cpp
  src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
  src/plugins/qmldesigner/qmldesignerplugin.cpp

Change-Id: I24216ae3f83cdde3493b4a6274e24a72f75820fc
2022-11-09 11:45:25 +01:00
Marcus Tillmanns
06838e3e5e ProjectExplorer: Fix potential race condition
When using BuildStep::runImpl() it was possible for the async part
to still be running while the BuildStep is already deleted.

This change returns the Future so that users can wait for it to finish.

Change-Id: I27c0fc8741c59851c5ab8f5cb858fbcda923c14d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-09 08:33:37 +00:00
Christian Kandeler
f93c316b73 ClangCodeModel: Adapt to new upstream feature
See https://reviews.llvm.org/D130015.

Change-Id: I2c2590265f2d7a2c2b5e966b0dc65ceff6b1b3e6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-08 14:21:25 +00:00
hjk
9364304f81 Debugger: Remove some debugging code
Avoids a possibly large temporary string.

Change-Id: Ic20cccedc35df0172c3586054f098e2c0f4b69c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-08 13:25:42 +00:00
David Schulz
08002c6278 Editor: delete assist interface in lsp/clangd support
The complete memory management in the code assistant needs an overhaul.
For now just delete or at least track the assist interface with scoped
pointers.

Fixes: QTCREATORBUG-28408
Change-Id: I0bd4cfaa36a660b6fd5bb467af3b13414ed76e63
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-08 12:07:56 +00:00
Eike Ziller
3c6435387b QmlJS: Fix cursor position and breakpoints when reformatting
Use the intelligent partial text replacement logic that is also used for
e.g. the Beautifier formatters.

Fixes: QTCREATORBUG-28349
Fixes: QTCREATORBUG-25218
Change-Id: I9ae4052df27c8aa2012106a8ef8f624ba5f3c30b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-08 11:38:54 +00:00
Marcus Tillmanns
bb3e9c44be Android: Fix reference to out of scope variable
Change-Id: I49ea5c059ed68230e368d8de2aaddca979019bfa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-08 11:37:26 +00:00
Alessandro Portale
657cc181fe CMakeProjectManager: Deduplicate string "-DQT_QML_DEBUG"
Change-Id: Ice9bc9b1ee17d477a484b9f4d630737f6633c06c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-08 10:52:03 +00:00
Kwangsub Kim
d881932695 McuSupport: Update library path for Windows platform
The Qt shared library for Windows desktop platform has been
moved from Qul 2.3.0 to support MinGW toolchain. The updated
library path needs to be configured correctly.

Task-number: QTCREATORBUG-28303
Change-Id: I7cf8150bfb4a66731904ea49089849496305f22e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-08 10:24:18 +00:00
Christian Stenger
c392cb8acf MesonPM: Only set tools if possible
Avoids triggering a soft assert.

Change-Id: I86dd6fd3876504abc3ecf5b543e7c86d886bb4c2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: hjk <hjk@qt.io>
2022-11-08 10:09:57 +00:00