Commit Graph

80529 Commits

Author SHA1 Message Date
Jarek Kobus
e22d79fbb5 ClangModelManagerSupport: Drop namespace scopes
Change-Id: Id8d9474a35e367469b435d10b3eba0700dffc304
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 10:48:54 +00:00
Christian Stenger
36ca97d32b PE: Silence soft assert
Change-Id: Ie07d261cc49a20fd57d885e9be9d63c4b4a8743f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-05 10:11:34 +00:00
hjk
663bbbfb0e Utils: Also list dot files when using the ls fallback
Change-Id: I6763280134e8cb040b6bc627b4f67d595dc2fb5e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-05 09:44:10 +00:00
Alessandro Portale
a73c1b47f6 CppEditor/ClangTools: Version tooltip for clang tools path choosers
Change-Id: Idaacb8449ef298dfe9e54a06cefd373816011360
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-05 09:22:55 +00:00
Marcus Tillmanns
cb4074713f Dumpers: Fix std::string for clang >= 15
libc++ has changed the layout of std::string again.
(see https://reviews.llvm.org/D128285)

This patch adds checks to differentiate between the two versions.

Fixes: QTCREATORBUG-28806
Change-Id: Ic21c488cf1c173120beddf414ca39040dfaba096
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-04-05 09:16:45 +00:00
Marcus Tillmanns
c378df273c Docker: Fix windows terminal
Do not send the marker when running in a PTY. On windows it gets encased
in junk and duplicated otherwise.

Change-Id: I9017066b0f1d22d4700704bfa2120c4f5d66daa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-05 09:15:24 +00:00
Alessandro Portale
c53c9592fa CMakeProject templates/examples: Fix the install line
The installation command needs to define
  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

Fixes: QTCREATORBUG-28999
Change-Id: If3f6ed15ef248eb07628bdc9fa4d11a678839a27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-05 08:47:20 +00:00
Jarek Kobus
3108892c5c DocumentLocatorFilter: Refactor internals
Avoid use of LocatorFilterEntry::internalData inside
LspCurrentDocumentFilter.

Change-Id: I5eb4831919281ab11a630bf7810890a72a1423bb
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 08:00:35 +00:00
Cristian Adam
9f6209a228 CMakePM: Do not check for changes for CMAKE_PROJECT_INCLUDE_BEFORE
This was the case previously when the path was tied to the Qt Creator
version.

This fixes the docker case when the expanded value gets replaced with
the unexpanded value from the initial configuration.

Change-Id: If005d410bc4408403fd79fa619c58217a499d3a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-05 07:53:29 +00:00
hjk
e3565d41b8 Utils: Code cosmetics
Change-Id: I34b566371fc4d6666439ed14c8ba95417584f0f5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 07:23:48 +00:00
Marcus Tillmanns
4c2e08912c RemoteLinux: Fix control signal if running in PTY
Change-Id: I8bc6c5f686a2e20ead1742e1567ad5530dd13eaf
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 07:23:14 +00:00
hjk
de546ff3ec Debugger: Support piping dumpers into gdb
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.

Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 06:26:11 +00:00
hjk
808f5c0e1d RemoteLinux: Use only ID based creation of install step
Also for configuration fixes due to upgrades.

Change-Id: Iba48313fabfb0ae605cb56052ea9c0fe7fc414e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-05 06:25:27 +00:00
Jarek Kobus
a22e3acf28 LocatorFilterEntry: Discourage the use of internalData
Drop internalData from c'tor. The internalData is going to be
removed, soon. Drop also the icon arg from c'tor since
LocatorFilterEntry instances are usually created in non-main
thread, while operating on QIcon instances isn't really safe
in non-main thread. The use of QIcon inside this struct is
a subject to change in the future, in a way like it was done
in other parts of code that generated icons from non-main thread.

Change-Id: Ic6aa719a64e5fbd65883c54149796057c632780e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 05:33:57 +00:00
Jarek Kobus
79c8e60a22 WorkspaceLocatorFilter: Get rid of prepareSearchHelper
Filter out in advance the clients for which locators are
not enabled.

Change-Id: I74234fb39db737db86a0d6320f53297bcaa89a8a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-05 05:29:27 +00:00
Jarek Kobus
da7009ac16 Python: Remove unneeded mutex
The mutex may potentially block concurrent calls to
Pip::infoImpl().

Make infoImpl() a static method in cpp.

Change-Id: I06e2de08674b5669e58684743d67a569da43d662
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 18:50:33 +00:00
hjk
fbd3285a7f ProjectExplorer: Add functions to iterate over FolderNode child subsets
Will be used to avoid some of the temporary lists created by
FolderNode::{file,folder}Nodes.

Change-Id: Icc4bd1473a480971230a0d2426b993afb82648e0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-04 15:08:11 +00:00
Christian Stenger
5a5d6f7548 Android: Silence soft assert
Change-Id: Ie4916e2de2cb51388df674219a45df0e7d4d5abf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-04 15:04:52 +00:00
hjk
f10a524f05 Remove some QList::toVector() no-ops
Change-Id: I4d7ecf26a2d18b7e58e8bbae8d1b12f3e73924d9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-04 14:34:16 +00:00
hjk
2534226d26 RemoteLinux: Move RSyncDeployStep implementation out of sight
Not needed publicly anymore.

Change-Id: I07f36c2fb7f4f42a970c43a4c7ad957b0b1dfce1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 14:33:52 +00:00
Jarek Kobus
b571bf847c ModelEditor: Reuse CppLocatorData::findSymbols()
Instead of using CppModelManager::classesFilter().
Avoid reusing LocatorFilterEntry::internalData.

Change-Id: Ic59daa01b0596dee46ae4ae362e833aea4610546
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-04 14:16:24 +00:00
Jarek Kobus
605dfa23cd ILocatorFilter: Don't store IndexItem::Ptr as internalData
Currently it's never read.

Change-Id: If89486ad8ad74c3431fe420d83fbec9a22855f04
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-04 14:13:26 +00:00
Alessandro Portale
06427a038b Android: Force reset/update of pre-existing toolchains
Toolchains are only (re-)created if the NDK changes. And till now, the
environment for the toolchain was only set during its creation.

However, if the user only changes the JDK location, we don't want to
recreate the toolchain but to still update the JAVA_HOME variable for
the environment.

This change does so that resetToolChain() is called also for pre-
existing toolchains (not just the newly created ones). That triggers a
call of addToEnvironment(), which sets the potentially updated JAVA_HOME
variable.

Fixes: QTCREATORBUG-28827
Change-Id: Id55f59f3ef3c8bfbb2b811052e0f60f495843dc3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-04-04 14:00:17 +00:00
Alessandro Portale
a854c3d273 Debugger: Put DebuggerRunConfigurationAspect into a DetailsWidget
Mainly in order to put the fields into a visual frame. By default
expanded.

Fixes: QTCREATORBUG-27151
Change-Id: I9920d2c9f3872860e75e938ea90a9165aee5b92f
Reviewed-by: hjk <hjk@qt.io>
2023-04-04 13:55:09 +00:00
Jarek Kobus
031f51794a Python: Don't leak running futures on shutdown
This patch fixes the following assert on shutdown:
"Shutting down while process /testenv/bin/python is running\"\n".

Change-Id: I4c32ead5e4952b69ffc6037739fd417a632eda1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 13:20:06 +00:00
Christian Kandeler
f019dd14e0 qbs build: Fix qtc module
There should be no symbol "Qt" in that module's scope; it's a qbs bug
this worked so far.

Change-Id: Iddf69669656b41fa7a7a96b2fae4f6584275812d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 12:25:19 +00:00
Marcus Tillmanns
ca0bee902f ProjectExplorer: Create BuildDirectory on device
The BuildDirectory is now assumed to be on the build device.

The default build directory template path is resolved against the
project path mapped to the build directory.

Change-Id: Ie1d147d135e9e551f2ac46cbec583374d524d2d7
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 12:17:49 +00:00
hjk
6977d28f55 RemoteLinux: Fix new port gatherer approach
We need the shell to expand the glob pattern.

Amends e0694c52d9.

Change-Id: Ibc8b7b68f52b17d1abe367f2b8672f40fd3bc1ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 11:37:14 +00:00
hjk
9c182911d3 PE/Qnx: Disentangle BuildStep factories from downstream further
The idea is to only expose factories with properties and not the actual
step implementations.

Change-Id: I72dc3944993f898f12b6a9bec11317f87e45c648
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 11:13:09 +00:00
Marcus Tillmanns
ee52d204e6 ProcessStub: Read correct channel
Change-Id: Ib26c75f069c90290f7930becdec42bf6ff5aa3d9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-04 10:52:39 +00:00
Marcus Tillmanns
53e8144330 Utils: Remove unnecessary code
Change-Id: I3844d71d3f77d49f7e84c4feae910679391fa91a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-04 10:33:11 +00:00
Robert Löhning
41c1b76af0 SquishTests: Stabilize tst_rename_macros
Change-Id: I9d77bf9daa66b46e2b16c8618e1848538cb797aa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 09:51:26 +00:00
Robert Löhning
892ccd2097 SquishTests: Add function for finding elements of project tree
Change-Id: I08c3c22a404d2b58bdb1205f22e5cf937c6027b0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 09:51:01 +00:00
Marcus Tillmanns
4fbc56d453 Utils: Change macro expander to use FilePath
Change-Id: Ib7787d1b7f72f6b4728893636f6844e4297fcecd
Reviewed-by: hjk <hjk@qt.io>
2023-04-04 09:19:25 +00:00
David Schulz
4d688c932b Clangd: do not modify the default replacement string
Fixes: QTCREATORBUG-28321
Fixes: QTCREATORBUG-28910
Change-Id: I4cfaf5ea3916a0ecbf0b0bae4d0c231513671c73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-04-04 08:55:15 +00:00
Christian Kandeler
3c0c26f7b3 ClangCodeModel: Adapt to updated clangd tooltip format
The header file path is not the last line anymore;
see https://reviews.llvm.org/D146244.

Change-Id: Ifbc2b55c0a82c661454d487c287fe4fb5a950d38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 08:53:57 +00:00
Marcus Tillmanns
a374dd8bfe Utils: Fix PathChooser validation
Change-Id: I5b0ad8a1011f51c5db732fe454c409812b406c17
Reviewed-by: hjk <hjk@qt.io>
2023-04-04 08:41:31 +00:00
Marcus Tillmanns
27fbe0c51d ProjectExplorer: Add device root path macro
Change-Id: Ie2a046c71194d2af20fb8483440bd0ffa22fda0f
Reviewed-by: hjk <hjk@qt.io>
2023-04-04 08:26:05 +00:00
Jarek Kobus
36463f3c87 CppLocatorFilter: Don't repeat CppLocatorData arg in c'tors
It's always the same instance of:
CppEditor::CppModelManager::instance()->locatorData().

Change-Id: I7d8aa2da6f0055d91b519efb6ebdf2177794e0b7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-04 08:08:09 +00:00
Jarek Kobus
f83dbc3316 CppModelManager: Avoid using ILocatorFilter::allLocatorFilters()
Use dedicated CppModelManager::functionsFilter().

Change-Id: Iafc93ae9d1d1f6a4767289238e2fd36b276611c2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 08:00:47 +00:00
Marcus Tillmanns
07a6d53daa ProjectExplorer: Add BuildConfig::BuildDirectory
Change-Id: I7a05d8199c0ec12142438b4f23857abda14b87f6
Reviewed-by: hjk <hjk@qt.io>
2023-04-04 08:00:27 +00:00
Jarek Kobus
16b9539a40 CppLocatorData: Introduce findSymbols
Reuse it inside cppquickfixes.cpp. Don't use global
CppModelManager::classesFilter, but more specialized and
much faster CppLocatorData::findSymbols.

The return value of CppLocatorData::findSymbols is a list of
IndexItem::Ptr instead of LocatorFilterEntries, so that we
may avoid using internalData for passing IndexItem::Ptr.

Change-Id: I14591b3fcf4de34d6fea23b9f354fe898123c9af
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 07:50:10 +00:00
Christian Kandeler
0319542937 ClangCodeModel: Do not try to rename macros and namespaces with clangd
Unfortunately, clangd refuses to rename macros and namespaces.
Fall back to our old two-stage "find + replace" approach for macros
(which clangd can find just fine) and employ the built-in code model for
namespaces (as they don't get indexed at all by clangd).

Change-Id: I08b1088ff4de9220427e089ef0700dbf2a944081
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 07:26:49 +00:00
hjk
432d8e6e63 RemoteLinux: Proper double-remote
There seems something wrong with quoting the sed command for port
access which should be fixed independently.

As it is not crucial for plain deployment / run, make the test optional.

Change-Id: Id82bdc7c25a7fb6e2f8799676b869216a7720cfa
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-04 07:01:39 +00:00
hjk
305ccfe259 Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).

Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.

Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:56:55 +00:00
Orgad Shaneh
9956740905 FilePath: Optimize string compare in setParts
Change-Id: Ibc390ee943ed41dfef30fbbd07e2e681d82379ba
Reviewed-by: hjk <hjk@qt.io>
2023-04-04 06:14:12 +00:00
hjk
0edf909b45 ProjectExplorer: Remove unconnected applicationTargetChanged
Change-Id: Id6a283118c904ad13e8bcfc4b23b9dd76b3cc83f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:02:59 +00:00
Marcus Tillmanns
b999e5700e Terminal: Fix docker cmd for terminals
* Fix env for terminals

Change-Id: Ie16a74aeca3ad34a76af1dee0c5a01e607aabebb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 05:59:35 +00:00
Marcus Tillmanns
f1f5a7412a Utils: Send __qtc marker from stub
Docker and ssh devices need the real process id on the
remote device. The process stub now send this if it receives
it as the first line of output.

Change-Id: I5d3af39651958fc88d21c3854a0fa1d7f51547a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 05:59:25 +00:00
hjk
242d19c19d CMakeProjectManager: Give some hints why deployment data looks wrong
Change-Id: If42b32ca80f4144b86ff882e0db243ba9f0f5cbf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 14:39:36 +00:00