Commit Graph

80529 Commits

Author SHA1 Message Date
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
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
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
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
Jarek Kobus
837967a77a tst_RunExtensions: Move onResultReady test into tst_AsyncTask
Change-Id: I73e2cc62be207adbfb2a4e4ce1367140986cc8b3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:18:47 +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
Robert Löhning
26bcec1641 SquishTests: Don't require Qt Quick Controls
It's not available for any version we use anymore.

Change-Id: I11556c42b4ed7924d3ede04749b0b26251d8f0da
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-17 09:09:44 +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
Christian Stenger
9beec99452 SquishTests: Expect another build fail on Win
Change-Id: Id4051f4f82c1219209fd59e72f1add76ec338a87
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-14 05:06:37 +00:00
Christian Stenger
cf8f23e8e0 SquishTests: Fix wrong usage
Amends 476f67cce5.

Change-Id: I584a059b52515bf625a973fff43485f5b52e6061
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-14 05:06:28 +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
Marcus Tillmanns
ee4fc5b801 macOS: Allow debugging Qt Creator
Fixes: QTCREATORBUG-29010
Change-Id: I349d2dcd383613661c1faad3104f211d6c6ce028
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-13 10:57:54 +00:00
Robert Löhning
2ffe169a8d SquishTests: Try stabilizing tst_generic_highlighter
Change-Id: I12e29f2886d22ce03a1a2eb62d5c776cd894d359
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 10:48:21 +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
Eike Ziller
c842b96f77 COIN/GitHub: Use Qt 6.4.3 and LLVM 16.0.0
Change-Id: I95ddc7a95b5761d29b111f3eff3fdfc014efaa51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-13 09:37:49 +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
Eike Ziller
9144ab75f4 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit 87b5176fd2)
2023-04-13 07:14:05 +00:00
Eike Ziller
ac17e0e2ad Convert Examples model to FilePath
Change-Id: I56219d2f9516662b32d45fd9b2108a0ad34113cc
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 255afd45bf)
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 07:13:50 +00:00