Commit Graph

75521 Commits

Author SHA1 Message Date
Christian Kandeler
8e9e457daa Utils: Make FilePath::canonicalPath() work for directories
... in the Windows implementation.
Amends 1073f89886.

Change-Id: Id264e9844634fc8d2afae5b2a7a2355882136315
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-07 07:35:42 +00:00
Eike Ziller
a6176e293b Find: Copy search string from find tool bar to advanced search
Always when pressing the "Advanced..." button it makes sense to copy the search
term to the advanced search dialog.
Otherwise if advanced search is triggered while the focus is in the find tool bar.

Fixes: QTCREATORBUG-17964
Change-Id: I96106e769238a689ed6c55fae6de451d250aa44d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-07 06:40:08 +00:00
Jarek Kobus
dbfdd334b5 Reuse FileSearchResultList
Change-Id: I2a20167faf78fcfa3b4bf392a42e0a72d92cd68e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-07 05:45:34 +00:00
David Schulz
d8fcaf0a73 Editor: paint location marker over everything else
The location marker is updated very regularly and especially while
stepping moves one line at a time. Resizing this marker when it enters a
line that already contains a marker is visually distracting. To prevent
this paint the marker over all other markers in that line.

Change-Id: I63ad72384e77eeae4dc6d2e2c2ac77c88da92c56
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-07 04:17:37 +00:00
Jarek Kobus
2f093aec66 GitPlugin: Drop unneeded namespace specifiers
We have using namespace in this file.

Change-Id: I6e9f1259c917c446e52c5e407ec2139cc29c7216
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-06 15:09:49 +00:00
Thomas Hartmann
51f493c1c8 QmlDesigner: Fix crash
Change-Id: I51678d84e268904fbde01c19ffbdd014bba35897
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-09-06 14:47:49 +00:00
Marcus Tillmanns
58b8005f03 Process Test: Skip unix only test on windows
Change-Id: Ie019af53a6b41784275d4b64b57a9c3bd493a24c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 14:33:36 +00:00
Jarek Kobus
b04b24ca81 GitGrep: Use QtcProcess instead of VcsCommand
Originally VcsCommand was created in main thread,
while VcsCommand::runCommand() has been called
in worker thread. Fix it by using QtcProcess
directly in worker thread.

Change-Id: I65f3476c0b89466c4347b0469e4cbad89c09072d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-06 14:13:42 +00:00
Alessandro Portale
bf0b81f257 QbsProjectManager: Convert to using Tr::tr
Change-Id: I7a369ee5fd3dcdd7dcf669704d4966eca4578fa2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 14:08:25 +00:00
hjk
9e16e694ee ProjectExplorer: Fix scratch buffer creation
Amends 389b1eceb.

Fixes: QTCREATORBUG-28145
Change-Id: I9e0075b1031fbe42d4d48b9dee0a80d85378cf17
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-06 13:49:43 +00:00
David Schulz
c7d3f48508 Python: remove settings object from objects pool
Change-Id: I4f21688f887c1ad99facb3ffe3a85b5918dd7daf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 12:33:48 +00:00
Marcus Tillmanns
0939b44d16 MaterialEditor: Fix warnings for unused parameter
Change-Id: I39b153692860397bf1d8aec25271d02604dedc70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 11:53:36 +00:00
hjk
ba2956984c Utils: Add a private FilePath::encodedHost() helper
Change-Id: I7ce1c7e1e892b3a14f9d31e106b58e8340d574d8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-06 11:09:40 +00:00
hjk
b94d4f75d0 Utils: Code cosmetics in tst_fileutils.cpp
Change-Id: I2afc6e96f53d8bc2a7c9a8125bdd8ba9b6510baa
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-06 10:56:07 +00:00
Marcus Tillmanns
9eef925133 docker: Improve Docker Device Wizard
* Added Sorting of Images
* Added "Double-click to accept"
* Added "disable list until sucessful"
* Added "Show unnamed Images" option
* Added Loading indicator

Change-Id: I9bb822753ffc8af1d2e54f5279a6884cb5c4f1b0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-06 10:56:05 +00:00
Eike Ziller
6adca44116 External Tools: Force console output for Qt based tools
Depending on platform and configuration and where they are run from
(terminal or not), Qt applications can send some output to a different
output stream than stdout/err (like Windows debug stream, or Linux
journald). This is a bit confusing because e.g. we capture that kind of
output for user applications run in Qt Creator. By default prevent it
with the corresponding environment variable. Can still be overridden by
setting QT_LOGGING_TO_CONSOLE=0 if that really poses a problem.

Fixes: QTCREATORBUG-27828
Change-Id: I7e3f9930b045fc887144753384ba246ecdc52d90
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-06 10:15:21 +00:00
Eike Ziller
b1fd3f6e33 Fix build of sdktool
QStringView::first was introduced in Qt 6.0, use QStringView::left
instead

Amends a8145ff6c9

Change-Id: I6983eb0f35cc6f4887160f1d201a43db0fee361b
Reviewed-by: hjk <hjk@qt.io>
2022-09-06 09:33:54 +00:00
Eike Ziller
29f9f0d822 Improve Clangd settings page
- add tooltips to the labels
- move the completion settings together
- move the "threshold" settings together
- move the indexing option together with the worker threads option
- mention that we fallback to a built-in indexer if clangd background
  indexing is turned off
- add tool tip to worker threads option that mentions that this is also
  used for background indexing
- adapt documentation

Fixes: QTCREATORBUG-28071
Change-Id: I89b00a586fa79fd5ba25c4d187e36d5cfc2d4903
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-06 09:11:06 +00:00
David Schulz
a634833720 Docker: detect python in docker images
Change-Id: I841cdb7ce1cb8f34565a5e6993c5c825937e3eab
Reviewed-by: hjk <hjk@qt.io>
2022-09-06 08:47:01 +00:00
David Schulz
407082bcb2 Python: restructure settings
Change-Id: I32b3bed5581e06e981863b561b9b2f2bb125b82e
Reviewed-by: hjk <hjk@qt.io>
2022-09-06 08:46:56 +00:00
hjk
6f0f982356 TextEditor: Use filePath() instead of rawFilePath in find in files
The only consumer is gitgrep and doesn't expand the path by itself.

Change-Id: Ic05d29f82a6d277731439ffc032a79f7cbc6f496
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 08:18:02 +00:00
hjk
aeb460286c CMake: Replace PathChooser::path() uses by filePath()
Change-Id: Id375c83d7b038bcf2af95318df0b5a04290edbaf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 08:17:34 +00:00
Christian Kandeler
a42ff26d4a CppEditor: Do not get confused by aliased files
... when looking up a source file's project part.
This prevents misleading "This file is not part of any project" messages.

Task-number: QTCREATORBUG-27869
Task-number: QTCREATORBUG-28031
Change-Id: Ia9a25af24ddf3f2ab8474deb7b2c5a8d64eb47ea
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-06 08:15:41 +00:00
Christian Kandeler
1073f89886 Utils: Try harder in FilePath::canonicalPath()
On Windows, we now also resolve SUBST drives and NTFS alias mounts.

Task-number: QTCREATORBUG-27869
Task-number: QTCREATORBUG-28031
Change-Id: Ia6b16787e8a691118d56579c0825bb20b066f9b8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-06 08:15:11 +00:00
David Schulz
8fab2011ba Editor: remove html from default mime data
This is known to be expensive and a lot of users actually prefer plain
text in the copied mime data to avoid unwanted coloring in 3rd party
tools. Add a separate action (Edit > Advanced > Copy With Highlighting)
that preserves the original functionality.

Change-Id: I0f3c529146ab94d0cd9ce9e3b997c8501a577f03
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 08:13:51 +00:00
David Schulz
77b5613cd9 Editor: do not hardcode default colors for function search result
Using white and black as the defaults results in unpleasant colors in a
dark color scheme. Instead rely on the fallback to the colors of C_TEXT
that are used in the SearchResultColor constructor.

Change-Id: I110aadbae9f07f59fefac07c7ef8fa2af2f3b596
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-06 08:13:29 +00:00
Tim Jenssen
6955841afd qds: fix build
Change-Id: Ib791d2bdae8ee52fc69d99566334844596975676
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-06 08:07:37 +00:00
hjk
c75c146b72 Squish: Replace PathChooser::path() uses by ::filePath()
Change-Id: Icb1c47d95b7a160d4c3cb37a6e63b50aad3af67e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-06 07:46:12 +00:00
Piotr Mućko
fe5fdce2d6 McuSupport: Compare OS specific paths in unit test
Change-Id: I95cae23dc1aebfa5f9d7ff7c6cb36f984b2d53a5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
2022-09-06 07:42:03 +00:00
Jarek Kobus
a9eb732ce6 FileSearchResult: Use FilePath for fileName
This saves about 2 seconds out of 5 seconds spent in
displayResult() for converting from QString into
FilePath in main thread (use case: gitgrep with
2 million hits).

Change-Id: I6334e8559986501c34c90a5c7c6b4acc9a6953e0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-06 07:02:15 +00:00
Christian Stenger
b842620810 Squish: Support other files of test cases as well
There may be additional script files or other files located
at the same level of the test script or located in a
folder structure beside the test script.
Gather and display them at the navigation tree.

Change-Id: Ia9598afeae764e44020a654e04086ccdfd2c4faf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-06 06:23:41 +00:00
Christian Stenger
d2b23f6e40 Squish: Support testdata of test cases as well
Change-Id: Icac4a08a6c3506b715c31fe79e2fb67f6b819fc6
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-06 06:23:36 +00:00
Christian Stenger
d63689e3e1 Squish: Add minimal support for shared files of suites
When opening a test suite shared files of this suite will now be
displayed inside the navigation tree beside the test scripts.
This only applies to shared data on the suite-level and will not
add globally shared data automatically.

Change-Id: I2ec4a76c668c8873fba2e7d3ce07c1f7471623e1
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-06 06:23:31 +00:00
Marcus Tillmanns
ef11da3629 Fix: Initial CMake run does not have PATH set
If certain tools are not in the systems base PATH, as can be the case
on macOS where Ninja might be located in /usr/local/bin, the initial run
of cmake for a new/clean project would fail as the PATH (and the rest
of the environment variables) would not be set for a freshly initialized
CMakeBuildConfiguration.

This change fixes that by calling
updateAndEmitConfigureEnvironmentChanged at the end of the build system
initialization.

Change-Id: Ib2ebe4da60a6284548eabed124240212178c67e1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-09-06 06:04:47 +00:00
hjk
1567d24980 Utils: Replace PathChooser::{fileP,p}athChanged signals
... by a new PathChooser::textChanged signal.

They were both emitted in reaction to the underlying line edit's
textChanged() signal.

Use 'textChanged()' as name to mimic/match the Qt side. This also
makes it more clear on the user code side, when this happens.

Some textChanged() consumers should probably use editingFinished()
instead, but that's left for later changes.

Change-Id: Ib07347f616cbf1c5d09bc2f8671ca860d185d1f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-06 05:01:51 +00:00
Christian Stenger
b0defb65c2 Squish: Avoid crash
Change-Id: Ic4c71aecb1a53252e2df1fde862101f1da827740
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-06 04:49:00 +00:00
hjk
10e8a21630 ProjectExplorer: Let JsonWizard react on PathChooser::textChanged
The other code path to trigger rawPathChanged is not relevant here.
Helps in a follow-up change.

Change-Id: Ifa70a763d8b3c82484b3c4e3c62d91ba2ca8e998
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-05 14:40:27 +00:00
Eike Ziller
87df45dde7 QmlDesigner: add another missing header for isoiconbrowser
Change-Id: If7d3e7c903d1c0b3e14ab0a904295097627c3213
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-05 14:05:54 +00:00
Orgad Shaneh
661994c288 Debugger: Fix cross-endianness display for arrays
Debugging a BE target on LE host showed wrong values when expanding an
array.

Change-Id: Icad9db8be11c3093de3b7bab52df815bf56f1677
Reviewed-by: hjk <hjk@qt.io>
2022-09-05 13:55:14 +00:00
Alessandro Portale
389b1eceb9 ProjectExplorer: Use more FilePath in wizards, mostly JsonWizard*
JsonWizardFileGenerator's path member variables become FilePath and
GeneratedFile gets the QString based file setter and getter removed.

Also, a couple of other function parameters become FilePath. TODOs notes
added for further changes.

Change-Id: Ic4b791ed71c3c03adb8f15771e2dfa9af593abd8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-05 12:34:35 +00:00
Orgad Shaneh
40a1a719fe Debugger: Improve ABI compatibility matching
Debugger ABI compatibility is not the same as the implementation in ABI.
For instance, GDB can support multiarch targets, so matching the arch is
not good enough.

Use DebuggerItem::matchTarget and adapt it to consider ABI mismatches as
MatchesSomewhat for GDB/LLDB, which are potentially build with multiarch
(unfortunately there is no easy way to tell, at least for GDB).

Amends commit c04f3a94ea.

Fixes: QTCREATORBUG-28020
Change-Id: I555c4e886c641bfdf50ca660eda499c18260f6f4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-05 11:13:41 +00:00
David Schulz
497b20ade7 Python: use consistent pyls naming in settings
Change-Id: I8a36e4089812802c3629ac52ce52499dde53eba8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-05 10:57:54 +00:00
hjk
a8145ff6c9 Utils: Replace FilePath::m_root member by a int m_rootLen
... and keep the string data as part of m_path.

Change-Id: Iaa43183906b59a419ddd78ed0102fe48c686bbb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-05 10:15:15 +00:00
Christian Stenger
14a64254da ProjectExplorer: Fix hovering over cleared issues
Avoid providing clickable file paths of non-existing items.

Change-Id: If2da6c5a2efdfc57faab12f8a9b97682adb6034e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-09-05 10:13:48 +00:00
Christian Stenger
5f88511fe7 Squish: Extract functions
Slim down server start function.

Change-Id: I33d2d26c42eca710d25fca9c5e10ad10f50be0c8
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-05 09:52:02 +00:00
Jarek Kobus
9087547eaa GitGrep: Don't pass SuppressFailMessage with SilentOutput
SilentOutput defines SuppressFailMessage already.

Change-Id: I80761ed2041f809968890464573863c47b3fac84
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-05 09:14:06 +00:00
hjk
d139ee15fa Debugger: Simplify legacyGdbTargetAbiString handling
Change-Id: Iafcd998b8e05e8ce64e0fd2e3cefc4c944374153
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-05 09:09:39 +00:00
Christian Kandeler
2fc5dba1c3 ClangCodeModel: Implement per-session mode for clangd
Fixes: QTCREATORBUG-26526
Change-Id: If9e018475b4e2f0557d9bf64ad9a7921c9dd6046
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-05 09:07:13 +00:00
hjk
eae5de0fa3 QmlProjectManager: Replace a use of PathChooser::setPath
... by setFilePath

Change-Id: I1842ec8f5b4d308e5447069ca88f5130b637a1fe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-05 08:42:26 +00:00
hjk
81abaeb2ed Utils: Drop a direct use of QFileInfo
... in buildablehelperlibrary.cpp

Change-Id: I21ffe1a97672e4d0053982b6581c518bca62eb97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-05 07:15:50 +00:00