Commit Graph

68765 Commits

Author SHA1 Message Date
Artem Sokolovskii
178c0abbd3 ClangFormat: Fix preview updating
Fixed the behavior when the preview does not update when the Override
checkbox was not enabled initially. Currently, the preview is updating
when Override the checkbox is enabled.

Fixes: QTCREATORBUG-29043
Change-Id: I8a2a6f3cd5890b66d4bffd0c84aeafb5a29fba48
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 11:21:58 +00:00
Eike Ziller
5adb656550 Show locator filter descriptions more prominently
- Sort items in the menu.
- Disable items for disabled filters.
- Show a tool tip when hovering over the magnifying glass menu.
- Add descriptions to all filters and make them more consistent.

Change-Id: Ic03e303c50422f9de5dd3c512fe32bbdc958d2ba
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-18 11:19:17 +00:00
Eike Ziller
4e6877753a Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp

Change-Id: I1628528dbc0ffe874b49bbe022da5933b1348057
2023-04-18 12:53:45 +02:00
Christian Stenger
ebfcb8af65 QmlJS: Fix compile with Qt6.2
Amends 15a06b77c0.

Change-Id: Iefac198e1d566fcbda77e22bcab289dda15fa1ba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-18 10:27:32 +00:00
Eike Ziller
f2c6af064b Update qbs submodule to HEAD of 2.0 branch
Fixes build with Qt 6.5

Change-Id: I9aaae5ade6b9165e54c248d246d20dd0665967bf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 10:24:31 +00:00
Jarek Kobus
07b1e1c5fe LocatorFilterEntry: Add Acceptor field
Add also AcceptResult structure, returned by acceptor.
The Acceptor, being a member of LocatorFilterEntry,
is going to be used instead of virtual ILocatorFilter::accept()
method. By default, when no Acceptor is provided, the
locator widget is going to call EditorManager::openEditor()
with a LocatorFilterEntry instance.

Change-Id: Ic9697492738d65fd1331bbd0872bc374285c4e53
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-18 10:08:42 +00:00
Artem Sokolovskii
0c37fc356e ClangFormat: Fix wrong indentation numbers with separator
Fixes: QTCREATORBUG-29033
Change-Id: I70ba12828d3805cb8087a797d14e0ee24611418f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 10:07:35 +00:00
Ali Kianian
c98eb99957 QmlDesigner: Update material browser view model after state changes
Task-number: QDS-9485
Change-Id: I65e650b6929b9c83b1de968ef1d77ec46c027c88
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-04-18 09:28:35 +00:00
Eike Ziller
abf7dd23ed Show filter description in locator settings
Directly in the items, instead of just in the tooltip.

Change-Id: I631598ef3e38967a6fcf84fd70f22bccc8b97ea7
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>
2023-04-18 09:19:43 +00:00
Jarek Kobus
ed120516f6 DocumentLocatorFilter: Get rid of the arg from c'tor
It's always LanguageClientManager::instance().
Pimpl LanguageClientManager's filters, so that they are
constructed after the managerInstance is being assigned.

Change-Id: Ib1f6f0c96d57d0e4cb7332ce322f6c4e9ef9fdb1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-18 09:03:14 +00:00
Jarek Kobus
c8ac10b4c1 LanguageClient: Introduce workspace matchers
Change-Id: I958e83f140ce5d12a5fb6734b9fbfd8a5f95a787
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-18 07:20:15 +00:00
Christian Stenger
bb551f4b60 Android: Fix compile with Qt6.2
Just removed redundant check.
Amends 2d01003c4e.

Change-Id: Ie7ce3836804199bcb561b8c34a70814856a4033a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
2023-04-18 04:25:40 +00:00
Thiago Macieira
8db29850b1 Clean up legacy content from Qt 5's QProcess::setupChildProcess()
We needed a derived class because in Qt 5 we needed to override the
setupChildProcess() virtual. Now have setChildProcessModifier(). The
actual subclassing was removed in a prior commit; this merely cleans
stuff up.

Drive-by fix the arguments to setpgid: processId() always returns 0 in
the child process.

Change-Id: Icfe44ecf285a480fafe4fffd174d1073c0e1ddc3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-18 00:20:49 +00:00
Tim Jenssen
a73358b3aa Merge remote-tracking branch 'origin/10.0' into qds/dev
Change-Id: I9520e55c8b7248afb297168395d7099829ed42c7
2023-04-17 20:59:36 +02:00
Thomas Hartmann
c609baf73b QmlDesigner: Set QML_DISABLE_INTERNAL_DEFERRED_PROPERTIES
Task-number: QDS-8545
Change-Id: I3ef92bba9c488586a85bb81ba9a244645b748dd8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-17 16:15:02 +00:00
hjk
cacc4aeede ProjectExplorer: Run toolchain autodetection on startup
... explicitly only for the Desktop device. This was implicitly done in
some cases by assuming 'no device' == 'desktop'. Make that explicit now.

Change-Id: I2ce86702a9b5b795fb4832301a11a8c8b40e77ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-17 16:08:42 +00:00
Cristian Adam
bbe61a965d CMakePM: sanitize preset initial configuration values
The task-number below has a sample where CMAKE_C|XX_COMPILER was set to
"cl.exe" and the CMAKE_PREFIX_PATH was set to "C:/Qt//6.5.0/
msvc2019_64".

These values would cause "red" values in the CMake configuration, which
is not that nice.

This patchset will make sure that everything is nicely configured.

Task-number: QTCREATORBUG-28982
Change-Id: I21289d1936ef075ce02364fc675709c52c76c3ed
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-17 15:03:59 +00:00
Cristian Adam
45faec05e5 CMakePM: expand macros for all configure cacheVariables
Fixes: QTCREATORBUG-28982
Change-Id: Iabbf39b815ed7477a9d272a320308f320a31adbc
Reviewed-by: hjk <hjk@qt.io>
2023-04-17 15:03:53 +00:00
Marco Bubke
d14c38e873 QmlDeesigner: Add feature to disable error on warnings
Change-Id: Idc0cbf2c6fd4069d84fe18de190d91ed94610a8a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-04-17 15:01:13 +00:00
Marco Bubke
86e2426ac6 QmlDesigner: Improve ownership of text editor
Handling raw pointer can easily lead to mistakes. So it's better to
remove unique pointer. In this case a deleteLater pointer is added.

The pointer has not be tested for null  because of:

23.11.1.2.2 unique_ptr destructor [unique.ptr.single.dtor]

2 Effects: If get() == nullptr there are no effects. Otherwise
get_deleter()(get()).

Change-Id: I97eeb86b7316fc93fbed89707644ab7dde7f89f6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-17 14:59:38 +00:00
Marco Bubke
49c85bbf70 QmlDesigner: Let ~LibraryInitializer() throw exception
Because LibraryInitializer has no state it should be fine if it is used
like intended. The exception is anyway fatal.

Change-Id: I397e5b03e63d69f1468b46a8f333522629f1d882
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-17 14:59:31 +00:00
Marco Bubke
df6d690304 QmlDesigner: Fix warning
Change-Id: I029356618a748f48d09deba0e7e32fb48b953779
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-17 14:58:54 +00:00
Jarek Kobus
3b76420e0f CppLocatorFilter: Introduce cpp matchers
Change-Id: I7a9d3713a941c46ea8412a26743cdfcfa5791892
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-17 14:04:28 +00:00
Christian Kandeler
8304f3c576 ClangTools: Give the tool main windows unique object names
Somewhat surprisingly, the object name is relevant: If we use the same
one, then clang-tidy and clazy have the same issues view.

Change-Id: I5ce32301780e5ae63c82fdb2ce3b1bca63ef85d5
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-17 12:56:52 +00:00
Jarek Kobus
2eba3584a1 ILocatorFilter: Introduce LocatorMatcher
This machinery is going to replace
ILocatorFilter::matchesFor() and filter usages outside
of locator scope, e.g. in find unused functions.

In contrary to LocatorWidget, which calls
Core::Internal::runSearch() in a separate thread
and the latter executes matchesFor() sequentially for all filters,
this patch offers a possibility to run all filters in parallel.

Change-Id: Ia59463c95294299090173f3d510d57c9f8c7f993
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-17 12:32:20 +00:00
hjk
d8de6c88e9 Avoid creation of temporary lists of ProjectNodes
Change-Id: Iac84f7f95291fb3b12a071a066d358aaab309c52
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-17 11:05:39 +00:00
hjk
6b661ef1be RemoteLinux: Let sftp work on the last hop
... even if the final target is not directly accessible.

This does not affect existing use cases but allows one more:
DesktopDevice --ssh--> Source/Build --sft--> RunDevice, with
the RunDevice not directly accessible from the Desktop.
That setup exists in reality for our QNX CI machines.

Change-Id: I5cda28cc835af914f2438f99d6a3facf584c74c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-17 10:15:43 +00:00
Jarek Kobus
20a4954cbd Revert "CommandLocator: Use Acceptor for LocatorFilterEntry"
This reverts commit 962888cb02.

Reason for revert: Applied too early and produced a conflict

Change-Id: I98a2895a81196b61cf7020a187d3740be231f671
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-17 09:21:09 +00:00
Eike Ziller
bdfa412b14 Examples: Automatically enable showing categories for Qt >= 6.5.1
Supposedly that is the version that will have a sensible amount of
examples sorted into categories to not look weird.

It is still possible to force showing the categories with
QTC_USE_EXAMPLE_CATEGORIES.

Fixes: QTCREATORBUG-28546
Change-Id: Ia1e6afa97d9b1b86763c29209fcf6f674d0844f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-17 09:13:56 +00:00
Christian Kandeler
81b294d1b1 Update qbs submodule to HEAD of 2.0 branch
Change-Id: Idc7a0d5d0f2c50b2e6606eb92ae49756db49ddf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-17 09:13:07 +00:00
Jarek Kobus
962888cb02 CommandLocator: Use Acceptor for LocatorFilterEntry
Change-Id: I965cf7117d882afe4ac60df7d16dc67d4dac3891
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-04-17 09:10:46 +00:00
Jarek Kobus
7ab0fd56ae RunExtensions: Move onResultReady and onFinished into asynctask.h
Change-Id: I96dbf5b0253251224ae678172cd5fca12b34326a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:10:33 +00:00
Christian Stenger
2abe6bbe2c CMakePM: Fix passing library search paths
Amends 305ccfe259.

Change-Id: Icd08697720224e84cb4ad282d21191f80728865e
Reviewed-by: hjk <hjk@qt.io>
2023-04-17 07:50:40 +00:00
Artem Sokolovskii
cbaeee89d6 Debugger: DAPEngine improve breakpoints handling
- Added proper "Insert" breakpoint
- Added proper "Remove" breakpoint
- Fixed errors with engine states after pause and continue

Change-Id: Icbe1b4cf549cee633809d0a1c9ab19dbf877dbf0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-14 15:05:36 +00:00
hjk
6932c6ca23 Qnx: Fix Abi detection for remote toolchains
We were suddenly ending up looking into the local file system.

Change-Id: I4911206e6d29f10a9dfaa9bc97307b28e383c14c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-14 14:45:52 +00:00
Semih Yavuz
15a06b77c0 Fix tst_qml_reformatter auto test
Add source location to pragma library writer so that the comments before
.pragma line are also written.

Fix tst_qml_reformatter by skipping the blankline comparisons. Line by
line comparison with the non-formatted code is not a good idea to test
 reformatting. Ideally test should have compared the formatted file with
the original one character wise, yet it is not worth changing into that
at this point.

Amends 0ce57fcf5e90f8bf8cfbe681f2954a0c1ef0e945

Change-Id: I39bcee2c881e1a0928c17ebb45aa1c85e6cf3b99
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-14 14:23:14 +00:00
Zoltan Gera
2d01003c4e Android: Automotive debugging capability
Android Automotive images use special system users to run Android apps
and activities. To maintain compatibility with all Android flavors not
only the process ID but also the user ID of the process should be
detected in order to be able to start the debugger with the correct
user credentials. Failing to do so caused the debugging server to
terminate upon not being able to connect to the app to be debugged.
This also disabled the native debugging in Qt Creator.

Task-number: QTCREATORBUG-28851
Change-Id: Ib4cd0ba7f252096cb7b8b14f959c8f0c743d8bf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-14 10:51:44 +00:00
Jarek Kobus
e2bccfde24 DocumentSymbolCache: Don't schedule duplicate requests
Avoid scheduling a new request for the uri when
a request for the same uri is currently running.

Change-Id: Iac056b275c62e8640bf43a0ec9b6b6561b44eaed
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-14 10:50:15 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
David Schulz
b1415a0ea5 TextEditor: reuse resetReloadMarks in documentReloaded
Change-Id: I41721e8c08fa70bf713154d7096753e0f49afb8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-13 13:13:20 +00:00
Eike Ziller
9650a2bded Examples: Limit categories to single row and allow showing all
Limit the items shown for categories to a single row (two rows for first,
"featured" category), and add a "Show All" link/button in the heading,
that shows all items in that category only (with a "Back" button).

The "Search in Examples" input ignores categories.

Change-Id: I7c8561a306ad86c3b537587621d3fd030cd08af8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 13:05:32 +00:00
Christian Kandeler
4028777743 ClangTools: Prefer .clang-tidy file by default
... and move this setting outside the diagnostic config.

Fixes: QTCREATORBUG-28852
Change-Id: Ie3b19ba7bec2bc96451f3216fa06a6941cad4c94
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:52:04 +00:00
Christian Kandeler
de0e0fab18 CppEditor: Fix tests
Amends 8fb258b85e.

Change-Id: I0b9339a60da459557c0335b0680f258ce689b45f
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:51:48 +00:00
Christian Kandeler
b795b42980 CppEditor: More special rendering for string literals
Display prefixes and suffixes different from the actual string, like we
already did for raw string literals.
This uncovered some minor bugs in both lexer and highlighter:
  - Wrong length for a setFormat() call in highlightRawStringLiteral()
  - Missing check for user-defined literal in raw string literals
  - Missing check for user-defined literal in multi-line strings

Fixes: QTCREATORBUG-28869
Change-Id: I018717c50ddc1d09c609556161c85dfb0cc29fab
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:36:12 +00:00
Christian Kandeler
02f2a93503 ClangCodeModel: Let clangd handle cuda sources
Fixes: QTCREATORBUG-28984
Change-Id: I7fbf5a671ff6f1d1ecd928d9be1f619dc32563a9
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:35:22 +00:00
Christian Kandeler
8fb258b85e ClangCodeModel: Make use of QT_ANNOTATE_FUNCTION()
See qtbase/6c54e10144e7af02f4c35e20e5f375a0cf280b8b.

Fixes: QTCREATORBUG-28970
Change-Id: I7500c1e25a63d2a1cda66259c5ebd84976c27335
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 10:30:03 +00:00
Christian Kandeler
f67f02066c ClangCodeModel: Classify Q_PROPERTY functions as Qt-invokable
Fixes: QTCREATORBUG-28971
Change-Id: Ia60a82aa83ad89fbf6b5d1332d413de029510b34
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 09:19:12 +00:00
David Schulz
8a0b3815df TextEditor: fix leaking TextSuggestion
Change-Id: I6f8b27e339219880cf9ade42a1e70e6dafb625b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-13 08:14:51 +00:00
Eike Ziller
e6414d9941 Examples: Optionally parse categories from meta data
Optionally parses example categories from the examples manifests, when
setting the environment variable QTC_USE_EXAMPLE_CATEGORIES (can be done
in Qt Creator's Environment > System > Environment settings).
It doesn't make sense to unconditionally enable that yet, because only
few examples actually have categories so far, so we will need to wait
until some Qt version is suited for enabling this.

If an example set does not provide categories, the "highlighted"
property is used to provide a "Featured" category, as before.

If an example set does provide categories, these are shown instead,
sorted alphabetically, and examples with the "highlighted" property
are put at the front of the category, overriding the otherwise
alphabetical listing inside the categories. Examples without a
category are put into a separate "Other" category at the end.

Task-number: QTCREATORBUG-28546
Change-Id: I7ca312686eae13e16961def1b4b36ffd7050a447
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit a2de016f64)
2023-04-13 07:14:31 +00:00
Eike Ziller
b542d47907 Examples: Read meta data, which includes categories
Task-number: QTCREATORBUG-28546
Change-Id: I11505d4f8b8eaef3f525185cd45757b6f41012ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit e060f82fa5)
2023-04-13 07:14:18 +00:00