Commit Graph

62421 Commits

Author SHA1 Message Date
Eike Ziller
ff83642681 ClangCodeModel: Use Utils::runAsync instead of QtConcurrent::run
That works the same with Qt 5 and Qt 6.

This reverts commit c1fcaa2877.

Change-Id: I603e50c793c2477454253a57bfe01eb25ecab6e3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-12 11:00:51 +00:00
Christian Kandeler
35963fd2b8 ClangCodeModel: Fix issue pane management for clangd diagnostics
We basically forgot to implement this. A task in the issues pane was
created for every text mark, but there was no code to deal with handling
editor switches, resulting in seemingly random behavior.

Fixes: QTCREATORBUG-27260
Change-Id: Ifcc1e04db4c37dde7e80f0e1646dc7c557cd7481
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>
2022-05-12 10:29:31 +00:00
Tim Jenssen
839502650c qds: ENABLE_CRASHPAD on macos (universal builds)
using a newer crashpad version build with:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PWD/depot_tools:$PATH
mkdir crashpad
cd crashpad
../depot_tools/fetch crashpad
cd crashpad
gn gen out/Default --args='target_cpu="mac_universal"'
ninja -C out/Default

Change-Id: I782c09cb564aff725652cd1419a8dec78bc04fc5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-05-12 10:06:03 +00:00
Thomas Hartmann
442f4cd723 StudioWelcome: Add import path for dataImports
This will be the im[port path for the data driving tutorials
and examples.

Change-Id: I358de354565e9670fefeb7a4194af4aec5182184
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-12 09:10:48 +00:00
Eike Ziller
7881a49e7d ProjectExplorer: Fix compiler warning
warning: local variable 'task' will be copied despite being returned by
name [-Wreturn-std-move]

NRVO doesn't happen because "CompileTask" isn't the same type as the
return value "Task".

Change-Id: Ic9c6388d4667cd68dbbba98b6b98721c4d4fb557
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>
2022-05-12 08:23:04 +00:00
Orgad Shaneh
78b08f57a2 Git: Make git show more async
git describe --tags can take very long when there are many tags.

Run all the describe commands in parallel, and let the user work while
they are running.

Change-Id: Iee56a5d51f93e9c799521bb0b06ba08bb45cb237
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-05-12 08:04:16 +00:00
Orgad Shaneh
5d14d127d7 VcsBase: Add a convenience function execBgCommand
Creates and executes a command asynchronously, passing its stdout to a
callback function.

Change-Id: I6be7e803fadf708ca7dc587b612a5a63e9bf09c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-05-12 08:03:37 +00:00
Orgad Shaneh
71ba0b8853 VcsBase: Remove unused argument in enqueueJob
Change-Id: Ib295b9add526025f0f24c6e1463b7fe3e19d5d08
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-05-12 08:03:30 +00:00
Christian Kandeler
48abae97b6 ClangCodeModel: Fix handling of code actions in diagnostic tooltip
We need to create a sub-diagnostic for every clangd code action.

Task-number: QTCREATORBUG-27514
Change-Id: I9a12bcb390c9cc157ba7bca5015bbf51d31263da
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>
2022-05-12 07:49:48 +00:00
Christian Kandeler
031fe30260 ClangCodeModel: Update build system files
There is no compile-time dependency to libclang anymore.

Change-Id: I3b07977ba037a9c39c54d95c39f0505ae934cb02
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-12 07:49:10 +00:00
Christian Kandeler
e0ab8ad258 ClangCodeModel: Fix check for whether clangd should be used
Change-Id: I789c12b1b4098e6f11f190cf1ada6de9429c6101
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>
2022-05-12 07:48:45 +00:00
Artem Sokolovskii
2be4e8c5d5 CppEditor: Remove foreach / Q_FOREACH usage part 3
Task-number: QTCREATORBUG-27464
Change-Id: Icbe620a83b6c2cf6b6166b76d01ca5f3c65ea87a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-12 07:42:02 +00:00
Christian Kandeler
f03868bd6b ClangCodeModel: Another clangd cursor adjustment
QVector<QString|> should go to QString, not QVector.

Fixes: QTCREATORBUG-27524
Change-Id: Iceab3d9a796bbe974a13cea3fa91de9b4aaaee7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-12 07:39:54 +00:00
Eike Ziller
3784f69c9e Debugger: Fix compiler warnings
Remove unused lambda captures

Change-Id: Ibe3cc4477442ea77a86045666b629fee8f27d084
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-12 07:15:08 +00:00
hjk
7f2288d9cc ProjectExplorer: Avoid need to fix up portsgatherer command lines
... by creating them with the right device to start with.

Change-Id: Ib2f0f10b67322fe66a609287a629d3d720d83c93
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-12 06:23:45 +00:00
Eike Ziller
da0f0ac523 Utils: Fix compile warning
unused variable

Change-Id: I84523cf221029d3a43b698f941e230441338d916
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-12 06:01:17 +00:00
Eike Ziller
b3dfcfd3b7 McuSupport: Fix compiler warnings
- override missing for mock methods
- remove unused variable

Change-Id: If703b60dece417fc7dc004d67966f2b6b8281990
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-11 18:20:14 +00:00
Eike Ziller
7ee0da5107 QmlProjectManager: Fix compiler warning
Remove unused lambda capture

Change-Id: I4b17b8330f8ed4f5463f36689366d314e0159046
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-11 14:04:01 +00:00
Cristian Adam
bef1ace116 CMakePM: Use CtrlC stub for the CMake process
This makes sure that the CMake process is terminated.

Fixes: QTCREATORBUG-27518
Change-Id: Ibe227f6336be312abbe2517af421856463e9c9e8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-11 12:38:05 +00:00
Cristian Adam
8be05ca745 Utils: Remove Debug restriction for useCtrlCStub
process_ctrlc_stub doesn't generate a Ctrl+C event sent via
GenerateConsoleCtrlEvent for the child process to terminate.

So the Debug restriction to workaround QTCREATORBUG-11995 is
no longer needed.

Change-Id: Iafc8b51bce17432c80b0be0c4084978abc1c909f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-11 12:35:15 +00:00
Cristian Adam
d1ff9b8ffb process_ctrlc_stub: Remove Ctrl-C child termination mechanism
Since 537ba23fff we have on Windows a method
that lets the operating system kill child processes when the ctrlc_stub
starter process dies.

Previously process_ctrlc_stub would generate a Ctrl+C event sent via
GenerateConsoleCtrlEvent for the child process to terminate.

This had a sideeffect of terminating also Qt Creator when ran in debug
mode since it shared the console. See QTCREATORBUG-11995 for all
the details.

Change-Id: Ia6fd6240927f95895a4c977e742714f959d3fab7
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-11 12:34:56 +00:00
Jarek Kobus
49ddf8434f LinuxProcessInterface: Fix kill command
Amends f62a4d6315

Change-Id: Ib4efa3e0b9e0f4f945e338a85463b3e26fd056a1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-11 11:06:27 +00:00
David Schulz
371c5da99c TextEditor: Fix local rename off by one
Fixes: QTCREATORBUG-27531
Change-Id: Iaca7db227b9cbd563ac03260d668b93ea7328883
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-11 10:24:29 +00:00
Christian Stenger
8479cb1514 McuSupport: Fix tests
Note, this also changes how the CMAKE_TOOLCHAIN_FILE is stored
inside the settings.

Change-Id: I018cc44be37deef36d685eb856bb706f47274017
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-11 10:23:01 +00:00
hjk
dfe0776002 RemoteLinux: Avoid two explicit uses of IDevice::mapToGlobalPath()
Change-Id: I5e1e3f3de1118234dcaf1faa5690662876e85b4c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-11 10:21:23 +00:00
hjk
e2df7b7f6b Qdb: Avoid some direct IDevice::mapToGlobalPath use
Change-Id: I701ccaa0e563f9cc040625ac34d0b4d8b7229c5b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-11 09:01:07 +00:00
Jarek Kobus
257abc627c SftpTransfer: Get rid of FileTransferErrorHandling enum
FileTransferErrorHandling::Ignore wasn't used anywhere.

Change-Id: I5826fc9f7871b06cd8f423d7e3b1d01a5b6cbdff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-11 08:16:59 +00:00
Henning Gruendl
e33923ccd5 QmlDesigner: Fix compilation
Change-Id: I683ec452e8346486dd3c55fd27832245279404a5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-11 08:07:33 +00:00
Christian Kandeler
938bef8959 CppEditor: Do not offer "complete switch statement" quickfix
... if the document is managed by clangd.
We should not offer the same functionality twice, and clangd's works
better.

Change-Id: Ifd8edfa91451ab70940a50b550c8d274ee93e6e0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-11 07:43:06 +00:00
Christian Kandeler
52959ce472 CppEditor: Acknowledge the existence of clangd
Stop pretending to be super generic. Instead, let interested code know
directly whether a document is under clangd's control.
This saves code and makes the logic easier to understand.

Change-Id: Ia19d0ec6c4e83926379a7d17ca53896bee3a50e1
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-11 07:41:44 +00:00
Christian Kandeler
c1fcaa2877 ClangCodeModel: Fix build with Qt 5.15
Artificially lower the number of function parameters in
generateCompilationDB(), to accommodate Qt5's QtConcurrent::run().

Change-Id: Ide88925deb443378b9308d924406ec6f6f90e8aa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-11 07:40:30 +00:00
Mahmoud Badri
666a032840 QmlDesigner: Move QDS mime types to constants
Also:
- Rename libraryresource to asset to match the assets view name.
- Replace the outdated "bauhaus" name with "qtdesignstudio".

Change-Id: I4cacfdc33c029431b1a7b906439dabc3d9a7ee26
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-11 07:33:44 +00:00
Mahmoud Badri
d4aa9eb0b7 QmlDesigner: Integrate drag and drop into the model/views system
so that any view can easily gets notified when a drag in another view
is started/ended.
This allows a view to show a highlight when a valid drag is started in
another view without coupling the 2 views.

Change-Id: I030d3dfe23ee06e2afdc0e4bbffc0b8d0c59f2f8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-05-11 07:32:42 +00:00
David Schulz
c5f424d696 Coco: use the diagnostic foreground color as annotation color
Change-Id: I4f0991c8956b0b31a441aa4348aaf8b7d0677dda
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-11 07:21:11 +00:00
David Schulz
38ec866d57 Coco: do not open the CoverageBrowser debug window by default
Change-Id: Ib22c0475e3c2a120ca10c6d73a5e2ee0199817e0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-11 05:08:44 +00:00
hjk
e99fa02913 ProjectExplorer: Fix Introduce IDevice::filePath()
Amends 1ffaf0139a.

This is the actual introduction that got merged into the wrong patch.

Change-Id: I836a214358bd6000eaf506ee7d1fed8ad178daa3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-10 15:27:37 +00:00
hjk
aa98a479cf WebAssembly: Avoid a use of IDevice::mapToGlobalPath()
Change-Id: I79a66caad9a344d1a79d7cf22073a39352f58282
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-10 15:20:31 +00:00
hjk
1ffaf0139a ProjectExplorer: Introduce a IDevice::filePath
Same function as mapToGlobalPath, but operating on a QString specifying
the local path part. It's the majority use case and arguably the 'right
thing' to use instead of a full FilePath that can refer to arbitrary
devices.

Change-Id: Ifc8bd340e2e8859fe549f5724eb94269f587c418
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-10 15:20:06 +00:00
Eike Ziller
42e072f159 Move MinimizableInfoBars from CppEditorDocument to IDocument
Similar to the InfoBar.

The only thing that an editor implementation needs to do is to set a
settings group and the possible info bars in the document constructor.
And later call document->minimizableInfoBars()->setInfoVisible(id,
visible) to manage the state.

Change-Id: I23afb3639b70b1bfccd424579da018280a7fe2cb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-10 13:16:22 +00:00
Christian Kandeler
b5b9b7e32c ClangCodeModel: Use clangd's include path
... rather than the one from the LLVM that Qt Creator was compiled
against.

Task-number: QTCREATORBUG-27120
Change-Id: I4f211345ed547cd13f0b0774b99bc0f199a9cd44
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-10 13:16:09 +00:00
Cristian Adam
6b781b4fe9 CMakePM: Fix crash when file system progress bar was cancelled
If the user cancelled the file system progress bar, the the
m_allFiles will be null and shouldn't be used.

Fixes: QTCREATORBUG-27499
Change-Id: I92c509f1e66d0968f921ec103fd81631eed9ab38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-10 11:38:07 +00:00
The Qt Project
56576ad319 Merge "Merge remote-tracking branch 'origin/7.0'" 2022-05-10 11:33:36 +00:00
Christian Kandeler
ad8db12de9 CppEditor: Make CompilerOptionsBuilder take the actual clang include dir
This is more clear than passing in version and fallback path and
calculating the real path from them somewhere down the line.
No functional changes for now.

Change-Id: Iae2fc8015c778d787ed6e0ce898f41a7a05b2607
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-10 10:41:50 +00:00
Henning Gruendl
42857ce43f QtDesignStudio: Fix assets library external drop
Fix external drops onto assets library for ubuntu. The file paths were
missing the leading slash ("/") which caused external drops to fail.

Change-Id: I4c554df2ac4422d935ec06b835ce34de25b9e2e8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-10 10:39:10 +00:00
hjk
d458f9f5e6 Utils: Remove deviceHooks.mapToGlobalPath
Unused, and conceptually so.

Change-Id: Ia468a22e56829f7b23629df6aa28b89ea3c3eab9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-10 10:38:00 +00:00
Eike Ziller
08359cafde Warn when editing generated files
We already warn when editing a file that is not corresponding to a node
in the project and not under some project directory and not under some
project's version control.

Generated files are part of the project tree (not shown by default, if
"Hide Generated Files" is not turned off in the filter settings). So,
add another warning that the file is generated when editing a file that
is part of the project tree, but has the isGenerated flag set.

Task-number: QTCREATORBUG-27173
Change-Id: Id554d0e97bd5e033e957e7b3a863897845b7b654
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-10 10:16:14 +00:00
Eike Ziller
502223337d Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/clangformat/clangformatconfigwidget.cpp
	src/plugins/clangformat/clangformatplugin.cpp
	src/plugins/cppeditor/cppcodestylepreferencesfactory.cpp
	src/plugins/cppeditor/cppcodestylepreferencesfactory.h
	src/plugins/nim/settings/nimcodestylepreferencesfactory.cpp
	src/plugins/nim/settings/nimcodestylepreferencesfactory.h
	src/plugins/qmljstools/qmljscodestylepreferencesfactory.cpp
	src/plugins/qmljstools/qmljscodestylepreferencesfactory.h
	src/plugins/texteditor/codestyleselectorwidget.cpp
	src/plugins/texteditor/icodestylepreferencesfactory.h

Change-Id: I20ee430a7f0085774c9df1aa5487046ba4f404c1
2022-05-10 12:13:36 +02:00
hjk
e657bc8781 Utils: Introduce QtcProcess::controlEnvironment()
... and drop QtcProcess::removeEnvironment()

This shifts the meaning of the unqualified QtcProcess::environment()
to always refer to (possibly remote) "main" process this QtcProcess
wraps. The controlEnvironment is now referring to secondary helper
processes (if any...) typically(?) running on the host system.

This helps to avoid local/remote distinctions in some places.

Change-Id: Ib7cd15dd226617484b5358acd7deaed29e751883
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-10 09:53:53 +00:00
Eike Ziller
9bf0efcbb9 Merge commit 'origin/7.0'
Change-Id: I90148816d32c81b9fef982b5010c785161d83097
2022-05-10 11:45:37 +02:00
Artem Sokolovskii
bbc44cfb90 ClangFormat: Fix settings checkboxes disappearance
- Fixed settings checkboxes disappearance after open a project
- Fixed impossibility to save settings

Task-number: QTCREATORBUG-26948
Change-Id: Ia73a61bf56b99adea9ed45c9d656860b185a3d7e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-10 09:40:53 +00:00