Commit Graph

62421 Commits

Author SHA1 Message Date
Miikka Heikkinen
fe1f5a644e QmlDesigner: Enable component library context menu while searching
The only item visible in the menu is remove module, as hiding
categories during search is not supported.

Fixes: QDS-5687
Change-Id: I8f5bb3f1b27eb37ae32d72b93c6ce2156dfa8eb7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-12-14 12:59:57 +00:00
Cristian Adam
42d0280360 CMake: Only set COMPILE_OPTIONS if target ClangCodeModel exists
If Qt Creator is configured without Clang the target ClangCodeModel
might not exist and CMake configuration would fail.

Amends 08cbf13199

Change-Id: I1644d183bdcb4d9a6ae65e1257d9be7b7a0e5ff5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-14 11:41:18 +00:00
hjk
16c25d99c8 Docker: Provide a means to select search paths for auto-detection
A combobox in the device dialog to select between the (docker image's)
system path and a semicolon-separated set of user defined paths.

Use it for cmake and gdb detection; qmake and toolchains currently missing.

Change-Id: I3c478ca914a1bf02dcb69ebcb9ea6e358d24aaf9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-14 11:15:21 +00:00
Alessandro Portale
2000491108 QmlJsEditor: Delay the call of registerIconOverlayForMimeType
Calling FileIconProvider::registerIconOverlayForMimeType during plugin
construction caused the warning:

Accessing MimeDatabase for application/x-qt.ui+qml before plugins are
initialized

Better register it in extensionsInitialized.

Amends: 613a9a13c8

Change-Id: I08ebcad461019464dec04954aa8b436d96f503cc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-14 10:05:53 +00:00
David Schulz
442ce3e019 Docker: prevent endless loop after shell stopped
Change-Id: Id2ee7193ab7b646e85f2a84f673cb3022fec4dba
Reviewed-by: hjk <hjk@qt.io>
2021-12-14 09:27:10 +00:00
hjk
b7d61939eb SdkTool: Code cosmetics in Settings
Simplify path operations, leaner interface.

Change-Id: I7c21b47cc221b41572401f006c98948a185a5e02
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-14 08:41:51 +00:00
hjk
7ae4e1f7fa Boot2Qt: Fix start of flashing wizard on Windows
Amends e3d87f9d0f.

Change-Id: Ib6f2548497159a1a0dae90e3d351409e942013fb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-14 07:46:22 +00:00
hjk
353314a777 Docker: Add a way to force file access via docker itself
Use a QTC_DOCKER_DENY_LOCAL_ACCESS environment variable.

On Linux we usually try to access the container file system directly
as part of the host file system. In some cases this fails, and in some
cases we might want to disable it for testing purposes.

Change-Id: Iebc8e7fbbc968cd6dfbc6da2d08d71dd53bfa097
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-14 07:45:21 +00:00
Marco Bubke
6ecd4e76b4 QmlDesigner: Fix broken tests
There were key conflicts because we do not got all type ids.

Change-Id: Ief90920cb02a0e6478ee89f9b54ed8e3158fb3b6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-13 17:45:55 +00:00
Cristian Adam
08cbf13199 CMake: Fix compilation with Qt 5.15.x and MSVC
The code was replacing the existing COMPILE_OPTIONS property and
therefore fail to build when PCH was enabled.

Amends 9d6b8727ee

Change-Id: I5c530517d1acc899ac375119ce0741a05ee52cea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-13 14:45:19 +00:00
Cristian Adam
352e66531e Debugger: Unset previous Path environment variable
Newer gdb versions (11.1) on msys2 32bit environment pick up the
`Path` value and not the `PATH` value that we set.

By having one one value (`PATH`) we fix such issues.

Fixes: QTCREATORBUG-26670
Change-Id: I3fb9da75c2a037eb43a69f6f82474c7ec4972b75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-13 10:53:54 +00:00
Christian Kandeler
8dcab74586 Utils: Better resizing behavior for environment widget
The automatic resizing to contents should happen immediately, not when
coming back to the widget the next time.

Fixes: QTCREATORBUG-26510
Change-Id: I76cafa493b2eadc5115d42badbabe3d4e0a050f6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-13 09:34:40 +00:00
Christian Kandeler
bbd4352188 ClangCodeModel: Fix flaky clangd completion test
Change-Id: I38e283146d43a9ce6e9cb07dfc5b0e9ea7eb2a76
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-13 09:34:12 +00:00
Christian Kandeler
b8d5482e9c ClangTools: Make settings UI more consistent
- Do not show filter edit when using config file.
- Use more helpful placeholder text in the filter edit.

Fixes: QTCREATORBUG-26489
Change-Id: I6c12ced505e0c9b7c048ad5521531c5d46ea4cb1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-13 09:31:49 +00:00
Christian Kandeler
1717e0b702 CppEditor: Fix indentation problem with raw string literals
Pass the necessary context information in and out of the SimpleLexer.

Task-number: QTCREATORBUG-26211
Change-Id: I8063b03f4c9734991f15b5c0e7b58ee52e3cfc52
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-13 09:29:12 +00:00
Henning Gruendl
70b3a11ebb QmlDesigner: Remove url properties on reset
Remove url properties like source from the model node when being
reset.

Change-Id: I90fd0bbf6ac7aeb375a744f2e932949e17404878
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-13 09:26:29 +00:00
Eike Ziller
f03f712791 Request restart after changing file system case sensitivity
And don't apply the changed setting until restart by just writing the
new value to the settings directly, which is then read at the next
startup.
Avoids issues where file paths are cached or used as key in a hash.

Fixes: QTCREATORBUG-25005
Change-Id: I30e4d75455124af67ba9ee1d9e8ed31924016d0d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-13 09:11:53 +00:00
Alessandro Portale
613a9a13c8 QmlJsEditor: Use the "Design" file icon overlay for .ui.qml files
Change-Id: I4f324c7a839b6f58cdee028dd9c147384a56a3dd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-13 08:35:11 +00:00
Orgad Shaneh
32d3fa755e Git: Support filtering log entries by author
+ quote arguments with potential spaces.

Change-Id: Ifd1bfecd7c30d145592432dff76c72024d2b1426
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-12-12 13:55:33 +00:00
Christian Stenger
9a172e4d4d Sqlite: Fix compile with old Xcode
Amends d4c6f06a63.

Change-Id: Ia0dce406783e353cb1b1da8064418f64975c66ea
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-10 15:06:41 +00:00
Cristian Adam
537ba23fff process_ctrlc_stub: Close child process when parent closes
When using gui applications the closing of process_ctrlc_sub launcher
application didn't have any effect on the child process.

By using a job object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE the
child process gets cancelled when parent process closes.

Fixes: QTCREATORBUG-26687
Change-Id: Id13b4d6f876589a018fa8f6841304417b87ee653
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-10 13:43:59 +00:00
Christian Kandeler
a3af941adf CppEditor: Fix highlighting of raw string literals
... with the built-in highlighter.
Pass the necessary context information in and out of the SimpleLexer.

Task-number: QTCREATORBUG-26211
Fixes: QTCREATORBUG-26425
Fixes: QTCREATORBUG-26615
Change-Id: Id72f743e07ae117ca51b0d5e527b208dda133b7e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-10 13:36:21 +00:00
David Schulz
922cce1634 Python: prefer python-lsp-server
python-language-server is dead... long live python-lsp-server.

Task-number: QTCREATORBUG-26230
Change-Id: I9343f231c732b135bc4f8a704a29541c48cc36ba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-10 13:02:40 +00:00
Eike Ziller
546148725e Fix saving of file system case sensitivity setting
Amends e160c962ac

Change-Id: I81e3c4a9010173a44a55a070f8cdfae9231b31d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-10 12:02:27 +00:00
Tapani Mattila
5621b1bf22 CMake generator: Fix Q_IMPORT_QML_PLUGIN argument
Change-Id: I1fcf397ca188b03c580ad2f76bdab4c44eec2113
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-10 11:21:30 +00:00
Christian Kandeler
f98a15d544 ProjectExplorer: Update header guards also on copying a file
... rather than only on renaming.

Fixes: QTCREATORBUG-26654
Change-Id: I5a723969a078d76cc2e833d5e505ff64a3063bbe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-10 10:34:56 +00:00
David Schulz
136026a81b LanguageClient: mark added settings as changed
In order to correctly start a language server after it was added
programmatically it needs to be marked as changed.

Fixes the issue that the python language server did not get started
right after setting it up from the editor info bar.

Change-Id: I9caec91c9d5973912b7379478ab079c87a5231ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-10 10:28:03 +00:00
BogDan Vatra
d7f68ba174 Fix LLVM tools version query
On Debian clang tools are prefixed with "Debian ":
$ clang-tidy --version
Debian LLVM version 13.0.0

  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: bdver2

Change-Id: I03886d2674a3851c0cf391afc1c1672b0349184e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-10 09:48:56 +00:00
Alessandro Portale
f1a5a1f716 Android: Allow users to select which NDK to use for kits
This adds a "Make Default" button next to the NDKs list view. The
default NDK version is then used to override the NDK version for all Qt
versions in the sdk_definitions.json.

Fixes: QTCREATORBUG-21755
Fixes: QTCREATORBUG-22389
Fixes: QTCREATORBUG-24248
Fixes: QTCREATORBUG-26281
Change-Id: I460daafdd7f2d6380c0114bcd14cb0c46226d516
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-10 09:15:34 +00:00
Ulf Hermann
7042b551fd Theme: Fully qualify parameters to invokable functions
Otherwise we cannot see the types at compile time. Fixes some clazy
warnings.

Change-Id: I69fa897b52162f74ba4044933de9d08c7563aebb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-10 09:03:04 +00:00
David Schulz
cfdf613679 Python: prefer python3 from path as default interpreter
Change-Id: Ic53fc19f59da29d55c8f59385afc74a2524d6e49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-10 08:44:15 +00:00
Christian Kandeler
5f15e1f066 ClangCodeModel: Relax check for const-ness
... when detecting output arguments with clangd.
This should lead to fewer false positives. We plan to handle false
negatives on a case-by-case basis (rather than the other way around).

Change-Id: I541b418927dc410c2ea4ea9f6c1b5a7bd291a1a8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-10 08:40:34 +00:00
Christian Kandeler
fc3b7f7ac5 ClangCodeModel: Fix access type categorization for functions
... with clangd.
The code is starting to look rather hacky and might need to be rewritten
completely at some point. Let's see how far we get with it.

Change-Id: I506dd410831970b9f9291b005129b4d70f397de0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-10 08:39:57 +00:00
Christian Stenger
3989245562 AutoTest: Allow handling of maximum warnings for QtTest
If the maximum number of warnings is reached the test will be
canceled automatically. Allow to handle this from the user side
in case it might be needed.

Fixes: QTCREATORBUG-26637
Change-Id: I239eca280cdc2ce46f6d64cd53b8f3ad0205f7f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-10 05:42:03 +00:00
Alessandro Portale
d681933a6b ProjectExplorer: Don't squeeze device combobox too much
Respect the preferred width of DeviceKitAspectWidget's device combobox.
That prevents the combobox to be squeexed together.

However, reduce the preferred minimum content length to avoid too wide
stretching of the combobox for the Kit Page.

Fixes: QTCREATORBUG-26707
Change-Id: I87d32d3ebbc559351db782eb1a9b1f248616c688
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-09 17:03:32 +00:00
Christian Stenger
1cc50c8dcc CMakePM: Prevent device cmake becoming default
When auto-detecting cmake on device ensure any found
cmake will not end up as default cmake as this would
update even desktop related kits to use this if they
had no cmake configured before.

Change-Id: I27960fc1f76d95bd7ddef6bff40f163aa46a610d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-12-09 13:48:07 +00:00
Marco Bubke
d4c6f06a63 Sqlite: Introduce BindParameterCount template parameter
The BindParameterCount is checked at compile time and then again for
the construction of the statement. So we provide an early error instead of
an some error later or even stranger behavior.

Change-Id: I860ca1f78645c222ae1accf5c7a469c77befc3bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-12-09 13:13:51 +00:00
Marco Bubke
4e69b0a689 Sqlite: Cleanup exceptions
There are now two base exceptions. Exception and ExceptionWithMessage.
We very often don't use the extra message. So don't pay for what you
don't use. Otherwise it is replacing code with using statements.

Change-Id: I213cf1f02718f6d3b2aa0e2a64626c9fc5c7c917
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-12-09 13:13:47 +00:00
Marco Bubke
596ac61872 QmlDesigner: Synchronize without updating exports
If we only update the qml file we don't have to update the exports from
the qmldir file. So if ChangeLevel::ExcludeExportedTypes is set we don't
touch the exports for that type.

Task-number: QDS-5537
Change-Id: I247228076b3f7ac7f6334d10011b408d6406df07
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-12-09 13:13:42 +00:00
Eike Ziller
d422b408e0 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
2021-12-09 12:04:32 +01:00
David Schulz
f349de45f4 TextEditor: correctly initialize automatic proposal timeout
Change-Id: I53db54b51361ce3389bb25c420880a117ede7c2d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-09 10:48:29 +00:00
Christian Stenger
420b5bf541 Docker: Start making it work on macOS
Change-Id: I450c7b19de1694da456e16e95b698c1476623a97
Reviewed-by: hjk <hjk@qt.io>
2021-12-09 10:16:30 +00:00
Christiaan Janssen
6b3191c11e McuSupport: support for Renesas Flash Programmer
Task-number: UL-5082
Change-Id: I1eb4583fa2635adfc302f878301152c2358de446
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-09 08:55:27 +00:00
hjk
b771129ded CppEditor: Remove unused CppCodeStyleSettings::{to,from}Settings()
Change-Id: I4305b6cd296b7ad60ebf8683c53cb657c28b0e3e
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>
2021-12-09 08:35:40 +00:00
hjk
3963a8a072 Utils: Copy QFileSystemModel from Qt 6.2
... and fit it into Creator's namespace scheme.

The idea is to make it operate on (possibly remote) FilePaths.

Change-Id: I469b1fa201e747d326de82f73ae5ac33e9335c10
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-09 08:35:27 +00:00
Eike Ziller
25df6b7c07 macOS: Fix requesting missing permissions
The Bluetooth key changed. Keep the old one for compatibility.
Keys for requesting access to various folders on disk were added in macOS 10.15.

Fixes: QTCREATORBUG-26666
Change-Id: Ieb5686fe129f795319132a36269bc34bc07a13a4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-09 08:32:25 +00:00
Kai Köhne
11435ebedb CMake: indent closing ) one level down
Fixes: QTCREATORBUG-26700
Change-Id: I1b6609d0adea4a2093ca2afabac72b02a2f496f9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-09 07:34:55 +00:00
Mahmoud Badri
d22a6a66fd QmlDesigner: Enable smooth resizing of views
Enable a docking widgets param that updates views sizes while dragging
the splitters between views.

Change-Id: If4fa0f8a3d4601758a2a3be0f81e306104379ecc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-08 19:01:54 +00:00
Henning Gruendl
efa8e9fd9a QmlDesigner: ConnectionEditor hide readonly
Hide readonly properties in the ConnectionEditors target item property
ComboBox.

Task-number: QDS-5718
Change-Id: Idee217714d460a0a59954faf3c51641648e0657b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-08 19:01:07 +00:00
Christiaan Janssen
da10ed2483 McuSupport: skip error when failed desktop fallback
On 1.x SDKs, if the desktop kit description is missing
we still create a desktop target from a library that is
distributed with the SDK, through a fallback function.

On 2.x SDKs, the library has been renamed, but we don't
want to create the fallback. The kit description is
mandatory. Therefore, we shouldn't show the error
for failed fallback.

Task-number: UL-5092
Change-Id: I469269b2286d33f0f13335eef09ea2467c59be2e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-08 16:05:59 +00:00