Commit Graph

76860 Commits

Author SHA1 Message Date
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
Miikka Heikkinen
242de4d3fb QmlDesigner: Fix crash on removing import
If material shown in material editor is provided by the removed import,
the selected node in material view becomes invalid.

Change-Id: I374e80288b5fe59d4eba63b6712d4c8891fd11cc
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-06 07:51:13 +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
David Schulz
9456052207 Editor: do not replace selection in drop editor
Only remove the selected text if the drag source is the editor and we
want to move the selection.

Fixes: QTCREATORBUG-28126
Change-Id: Iaa54d54c432df2da99e30ddb569e06e3ccd0df00
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-05 13:04:45 +00:00
David Schulz
c58f41face Editor: accept drop actions
In order to remove the selected text of another editor widget when
dragging text from one editor to another the drop event needs to be
accepted.

Fixes: QTCREATORBUG-28125
Change-Id: I8333fe096baf589e5669fc43370fc3519c72bb2d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-05 13:04:26 +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
Christian Stenger
82922c8ea8 Squish: Fix wrong ui string
Change-Id: I79f17ecf7110d1da819358d9e7a7f09a3fe836a3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-05 06:27:28 +00:00
Christian Stenger
61f1a40f4e Squish: Fix querying server
Broke with switching the stdout handling from handling it
directly to using a callback in 27c8e2a638.

Change-Id: I69a9058b92807b0a4083b242eb7e4e982baa9096
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-05 06:27:21 +00:00
Jarek Kobus
5047802f0a VcsCommand: Remove one runCommand() overload
Not used anymore after changing implementation of execute().

Change-Id: I0af0e61b3bd9184f30f11cd80d377d25acf805f8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-05 06:11:41 +00:00
Jarek Kobus
d26dd8d641 MercurialPlugin: Reuse vcsSynchronousExec()
Passing ForceCLocale sets the LANGUAGE env var to C.

Change-Id: I7317aeeeb95bfbc5e3fa5fb97fb4f243daaa1f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-05 06:11:21 +00:00
Henning Gruendl
824ff8f9ca QmlDesigner: Fix icon font distributeOriginNone
Change-Id: I3ff513b78876de325f139393e8902ceed8286107
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-03 12:29:07 +00:00
Henning Gruendl
7bbfbb8a7c QmlDesigner: Remove old QtQuick version check
Change-Id: I17710660fd7f362c8255a42516115a36e355798f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-09-03 12:28:56 +00:00
Henning Gruendl
f58ec15bc1 QmlDesigner: Add reset action in workspace menu
Change-Id: I497cff18c7241945c9159f01f88d26eeabe14f4a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-03 12:28:42 +00:00
Jarek Kobus
498fe53116 CvsPlugin: Reuse vcsSynchronousExec()
Change-Id: I8d30310d565c2f345ab98542c936a704108f21e2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-02 15:50:24 +00:00
Eike Ziller
b206eb211f QmlDesigner: Fix qtquickdesigner/isoiconbrowser build
Add projectstorageids.h to the dev package, because it is now needed.
Amends 35a773b2dc

In file included from <build>/qtc_build/include/qtcreator/src/plugins/
qmldesigner/designercore/projectstorage/projectstoragetypes.h:6,
                 from <build>/qtc_build/include/qtcreator/src/plugins/
qmldesigner/designercore/include/propertymetainfo.h:9,
                 from <build>/qtc_build/include/qtcreator/src/plugins/
qmldesigner/designercore/include/nodemetainfo.h:7,
                 from <build>/qtquickdesigner/plugins/qmldesigner/
isoiconbrowserplugin/isoiconbrowseraction.cpp:40:
<build>/qtc_build/include/qtcreator/src/plugins/qmldesigner/
designercore/projectstorage/filestatus.h:6:10: fatal error:
projectstorageids.h: No such file or directory

Change-Id: I257c296c8db045c024dbbc516e43fc4b031e0c05
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-09-02 15:13:16 +00:00
Eike Ziller
4c83ec2372 macOS: Do not partially switch light/dark when system switches
If during the runtime of Qt Creator macOS switches the system theme
between "dark" and "light", Qt Creator should not partially switch its
appearance. Since Qt Creator does not support switching the theme at
runtime, it must stay fixed on the appearance of the selected theme.

The code previously only forced Qt Creator's macOS appearance if there
was a mismatch on startup. So if you started a light (or default) Qt
Creator theme while the system was in light mode, Qt Creator's macOS
appearance stayed at the "default for the system", and if the system was
changed to dark mode, Qt Creator would follow that partially in the
styling of standard controls only.

Instead always force Qt Creator's macOS appearance.

Fixes: QTCREATORBUG-28066
Change-Id: I0eb8fcbc6cf9d2b3e548dd871b9a3e1e611c136a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-02 13:50:55 +00:00
Jarek Kobus
6d6346044c VcsBase: Rename vcsFullySynchronousExec into vcsSynchronousExec
Get rid of original vcsSynchronousExec(), as it was calling
vcsFullySynchronousExec().

Change-Id: I911dc786d54c34c211d03661c37df9b58d60a20b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-02 13:46:12 +00:00
Jarek Kobus
996e1bfc45 VcsBase: Reuse vcsFullySynchronousExec() in vcsSynchronousExec()
Both implementations look the same nowadays.

Change-Id: I00503f625395db3354eefa8d55326ee22f452c2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-09-02 13:46:02 +00:00