Commit Graph

74059 Commits

Author SHA1 Message Date
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
Eike Ziller
57a69d9d0b CMake build: Avoid endless loop if plugin does not exist
get_property fails if the target does not exist, and _dep stays at some
old value.

This leads to a) a lot of cmake backtraces with an error message that
doesn't add anything useful, and b) an endless loop in
find_dependent_plugins. Which in the end leads to 500.000 lines of
useless CMake output, repeating
"qtcreator/cmake/QtCreatorAPIInternal.cmake:340 (find_dependent_plugins)"

Skip get_property if the target doesn't exist.

Change-Id: Ic694bc05b3dce5b83220a2f5dab8f063ef692c12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-10 12:57:16 +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
Christian Stenger
25930c538a Coco: Fix possible crash
..and silence warnings.

Change-Id: I179439c050ee8cc9c784355256e9f5e084261e90
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-10 07:58:41 +00:00
hjk
1602452351 ProjectExplorer: Fix the exit message fix
Amends f5c255e04c.

Change-Id: I87b13aa4504fb7aef4315eac57e8e8f0906a1a32
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-10 06:47:57 +00:00
Christian Stenger
81f33072b9 Tests: Fix compile of test app on macOS
Change-Id: I1a96bc57bae2aa3f1f7a1c0d6d4306cf5c36a78b
Reviewed-by: hjk <hjk@qt.io>
2022-05-10 06:19:33 +00:00
Christian Stenger
d10f3f8342 Dumper: Fix map dumper for lldb
Change-Id: I8adab131632b2ca04a3de8094699ab43d2de03bb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-10 06:19:25 +00:00
Robert Löhning
9c9aa75ca3 Squish: Fix findUnusedObjects for Python3
Change-Id: I4d092c5f4be682116f3313a72e17e5b1056e6866
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 15:05:49 +00:00
Robert Löhning
90bde92efd Squish: Align iterateKits() better with the way we use it
Change-Id: Ib41b4e763b0df8a74fd7b073710b29640fea17db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-09 15:03:23 +00:00
Robert Löhning
02742670d3 Squish: Reduce complexity of iterateQtVersions()
By removing dead code, code which generated unused data,
unneeded generality and needless abstractions.

Change-Id: Ie271363c5446ef02f32e48a78db3d8ef9be0ed29
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-09 15:03:07 +00:00
Thomas Hartmann
302c2e804c StudioWelcome: Disable welcome page if inactive
Change-Id: Id098579003ef63d2d06bfb1f2afaeca15c3bbc70
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-05-09 14:37:32 +00:00
Marcus Tillmanns
f849702bd7 Utils: Add missing header include
Change-Id: Id6f48a9ecbcc1c14824d782b08bf4875ff32d1d7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-09 14:36:52 +00:00
hjk
639c3a5437 ProjectExplorer: Remove ApplicationLauncher::setProcessChannelMode
Not used anymore.

Change-Id: I2b5864cf321f0fed69ae6d8586e78a6017a42d1b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-09 14:12:42 +00:00
hjk
6e1cfeaf3f ProjectExplorer: Consolidate ApplicationLauncher error access
Change-Id: I2f6dd54685c2c148f78f9853fd1d93a311eb16bb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 14:12:33 +00:00
Artem Sokolovskii
dea72a4003 CppEditor: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464
Change-Id: I352bf37bd017e7381fbd7b050fbb55c9a73bd668
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-09 13:30:46 +00:00
hjk
0a875d40ba ProjectExplorer: Always compile WinDebugInterface
Makes it easier to re-shuffle calling code on non-Windows.

Change-Id: Ia6d7e313e9eb42fc7b19a469c1a6f33d226d1e88
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
2022-05-09 13:24:12 +00:00
Christian Kandeler
026126eed0 ClangCodeModel: Remove some unused functions
Change-Id: Ibaab69aaab66998d1975663d1a1824d89aaa23a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-09 13:04:36 +00:00
hjk
f5c255e04c ProjectExplorer: Fix exit messages
Amends f9800e5a26.

Change-Id: I81ddf68d680acc9ae892c0391faa3f493250aceb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-09 12:30:47 +00:00
Eike Ziller
b0fb2de04e MinimizableInfoBars: Move to Utils
Change-Id: I6b42948c4bddaa396122b845c5c1e2aa70d8aaad
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-09 10:13:29 +00:00
Robert Löhning
83736649a7 Squish: Remove outdated comment from Readme
Change-Id: I480756cf9c6be999d0a7c08476609e8f470a1221
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-09 09:53:45 +00:00
Alexandru Croitor
b72d5b05f8 CMake: iOS: Enable automatic provisioning updates
By default xcodebuild does not try create / download a provisioning
profile for a project if a valid one does not exist locally
in ~/Library/MobileDevice/Provisioning Profiles, even if the
Xcode CODE_SIGN_STYLE attribute is set to Automatic.

Starting with Xcode 9, xcodebuild accepts a new
-allowProvisioningUpdates option.
When passed, xcodebuild will request a new provisioning profile
from Apple's servers for the current project and use it during
the build. The provisioning profile is only needed when building
for a real device, not the simulator.

When building an iOS project with qmake, the option is embedded in the
wrapping Makefile generated by qmake, so Qt Creator can simply call
make (which it does).

For CMake, there is no wrapping Makefile, so we need to pass the new
option explicitly as an additional build tool argument.

There might be cases where automatic provisioning is not desired,
which is why there is now a new checkbox in the CMake build step
configuration widget. It's default value is 'enabled', to match
qmake's behavior.

As an implementation detail, isiOS had to be moved to a header file so
it's accessible to both the build configuration and the build step.

Fixes: QTCREATORBUG-26246
Change-Id: Ic80cd965ba095d0ff379e13ad2ffb8c298c9f7c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 09:52:18 +00:00
Eike Ziller
66d78d3fa8 MinimizableInfoBars: Remove last hardcoded things
Change-Id: I6ec1e290056d97136077c0ddbc161669c7225eba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-09 09:44:59 +00:00
Marcus Tillmanns
c6b75fc615 Docker: Use generic DeviceShell class
Change-Id: Ic2afc6931f7cdb791d81344df6edbdb117cc090b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-09 09:30:57 +00:00
Eike Ziller
88eb4c03f6 MinimizableInfoBars: Consolidate IDs
For the info bar and the settings. Reduces the information that we need
to know and pass on.

Change-Id: Ia1c352dc0ed9375534fbbf2c3c0bc879725fa3d5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-09 09:21:14 +00:00
Eike Ziller
2d6a36742b MinimizableInfoBars: Remove dependency on CppToolsSettings
They were only used in the info bars, so move them there.

Change-Id: I584c98c70d1db2a5b741842da9d629469f0de73c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-09 09:15:15 +00:00
Artem Sokolovskii
5790905d6e ProjectExplorer: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I9a7b21643393852d2904ed25abb876998c543172
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-09 09:08:33 +00:00
Marcus Tillmanns
fea67b17f9 Utils: Add deviceshell generic class
Change-Id: Ibfb16a0f13f9fe119d27055db5897213127dd104
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-09 09:02:01 +00:00
hjk
f9800e5a26 ProjectExplorer: React to QtcProcess::done in ApplicationLauncher
The 'modern' way.

Change-Id: I80c0bb0b9c7c08e6aef724d430a8dbbd4b0c2777
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 08:59:03 +00:00
Christian Kandeler
e79c432291 Remove clangsupport library
Change-Id: I18455fc451b6e1b73c7183f6c75820379e26951a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-09 08:22:45 +00:00
Piotr Mućko
6b28913161 McuSupport: Move auto kit creation settings to handler"
Change-Id: I86a8588b812c10e0d547405c432f9fdc9c72aee3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 08:16:12 +00:00