Commit Graph

80111 Commits

Author SHA1 Message Date
Jarek Kobus
1cc7342ef1 JsonFieldPage: Use locator matcher for line edit completion
This may be tested in File | New File... | C/C++ | C++ Class,
Base class line edit should provide class completion.

With locator matcher the task is being executed ~20% faster.

This patch also solves the potential issue with interference
between parallel runs of classes filter in locator and
in LineEditField.

Change-Id: Ice3e719d9cbe72ec4cd11bd4362a94e9c3ce8874
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 12:13:54 +00:00
hjk
3351459ead ProjectExplorer: Avoid KitConfigWidget creation in some code paths
They are now only created when the kit is selected for editing or
for getting a tooltip.

Change-Id: I50b4194610f662645eada9f69e4b6f2d20aa6c00
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-19 11:53:36 +00:00
Eike Ziller
a353e9fde1 Markdown: Reuse Markdown highlighter from change log viewer
Change-Id: Ief1b0c135a34bfd5e9b5220e9fbf93f281d8e95a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 11:48:15 +00:00
Jarek Kobus
8175f96e50 CMakeTargetLocatorFilter: Use Acceptor for LocatorFilterEntry
Change-Id: I5f82853bab8fdc38ae0793e9865c6d1da10f8ccd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-19 11:09:09 +00:00
Jarek Kobus
fe067e1d49 HelpIndexFilter: Use Acceptor for LocatorFilterEntry
Change-Id: If5fbe4f4c7d0f3c7cda3d232be596937b73c6fd0
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-19 10:58:24 +00:00
Jarek Kobus
eb98f2f404 ActionsFilter: Use Acceptor for LocatorFilterEntry
Change-Id: I433f9b44173efd0c66130bcf411cf0ec04816edb
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-19 09:40:13 +00:00
Cristian Adam
a37b0f0e6c CMakePM: Add .h header files to .c source files
Utils::mimeTypesForFileName would only return "text/x-c++hdr" for .h
files.  This is perfectly fine for C++ source files.

The ancestor "text/x-chdr" is required for C source files though.

Fixes: QTCREATORBUG-28991
Change-Id: I21f038787e48e88b5e4b9e8ca386b3af80d098ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-19 09:40:04 +00:00
Eike Ziller
b5d7b24733 Add wizard for markdown file
Fixes: QTCREATORBUG-29056
Change-Id: Ia2ba9aef86aab3e156e3c36d8e28c9f37d7da8b3
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-19 09:28:26 +00:00
Christian Kandeler
ba3299f0d2 ProjectExplorer: Do not treat a starting run control as finished
... when assigning tabs in the app output pane.

Task-number: QTCREATORBUG-29044
Change-Id: I49e3d3ac3822692ffacd9821a0dd61377aae02cd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-19 08:57:05 +00:00
Christian Kandeler
1d364880f9 ClangTools: Do not abort a running build when starting to analyze
Task-number: QTCREATORBUG-29044
Change-Id: Iec6259d1734f809aba9da00f3f6a63fea2b93967
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-19 08:56:41 +00:00
Jarek Kobus
ee140a8231 LineNumberFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Id7da6d01a412633600c3ef905a5ddb18e9587bd7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-19 08:52:53 +00:00
Jarek Kobus
39b8bdab17 BookmarkFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Idc3e0541b53277ab8e0cdc8626df7f9095f24ba9
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-19 08:52:27 +00:00
Jarek Kobus
a5ad722184 QtVersionManager: Fix a warning about missing initializer
It fixes the following warning:
warning: missing initializer for member
‘QtSupport::Internal::ExampleSetModel::ExtraExampleSet::qtVersion’

Amends bdfa412b14

Change-Id: Ieb984664953f53d458297970e09678c499a26197
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-19 08:45:44 +00:00
Jarek Kobus
9eb826f393 JavaScriptFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Icceb830a391809cc760adf106e6c9e8b71dcb176
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-19 08:02:51 +00:00
Jussi Witick
f98a03a28d Fix namespace usage in QSR project wizard template
Consistently use namespaces with different feature if/def's in main.cpp

Task-number: QSR-2079
Change-Id: I0609f7eb8cb18d270e59c11025850e6369e5db87
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
2023-04-19 07:52:56 +00:00
Leena Miettinen
e441648259 Doc: Replace libSM-dev with libsm-dev
Which is the correct way to write the name of the package.

Fixes: QTCREATORBUG-29031
Change-Id: I860051b8e5f94a800d6f7b448daf02ae01611f9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-19 07:24:13 +00:00
hjk
dd7020d690 ProjectExplorer: Postpone Kit widget creation
... at least conceptually. This has not visible effect yet, as they
widget-creating code paths are triggered quickly.

Change-Id: Ibef3a4221885fa76cf5c1c327dcb3c2e6bdcbd1b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 16:31:24 +00:00
Jarek Kobus
b30983d3c7 CppLocatorFilterTest: Add locator matchers tests
Change-Id: Ifc9b25bd8503c75724ffec2a0ebd855e61a19bc6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-18 15:50:28 +00:00
Christian Kandeler
778d7a9819 ProjectExplorer: Redo the TaskView
- Make it a tree view.
- Use the default delegate for top-level items.
- If the task has details, show them in a child item.

Fixes: QTCREATORBUG-28850
Change-Id: Iafd65496f916b9e382ef2c6ade0f9b3a323f63ed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-18 15:29:00 +00:00
hjk
e7d6501553 ProjectExplorer: Postpone ToolChainConfigWidget creation
... until they are actually used, i.e. when the respective
tool chain is selected in the Toolchain tab. Some of them
(QNX) can be expensive to set up.

Previously all of were created when the Kits settings page
was opened.

Change-Id: I80e4238269b9f08788c330e2052c525dcf41d1ba
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 14:33:40 +00:00
hjk
0ab7a14731 ProjectExplorer: De-O_OBJECT-ify IPotentialKit
Change-Id: Ic7718b249375ae74bec2092ae7b0be80b6d574ee
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 14:28:11 +00:00
Jarek Kobus
fadbc55cdf OutputDataProvider: Fix workingList initialization
Broken in patchset 57 of the amended change.

Amends 2eba3584a1

Change-Id: I92c54793c8a31dd0f3f9a1e0b2cf8c4efde741ec
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-18 14:11:31 +00:00
David Schulz
aa0c9bc741 Editor: skip painting selection path out of clip rect
Change-Id: Ieec7afbec729708884c24d8de2b4a6c488220a69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-18 12:52:41 +00:00
David Schulz
f316614450 Editor: fix selection path for empty selections
Especially targets the painting of empty snippet replacement placeholder
like in the default "if" snippet.

Change-Id: I42d9fb901c66cddf4eab9dd7275b42a8f4e81282
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-18 12:44:21 +00:00
Jarek Kobus
9f78ca6f11 Reapply "CommandLocator: Use Acceptor for LocatorFilterEntry"
This reverts commit 20a4954cbd.

Change-Id: I52a969ee8a26a9835ef15f906e4e418af5352aab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-04-18 12:16:02 +00:00
Jarek Kobus
9388ab252e LocatorFiltersFilter: Use Acceptor for LocatorFilterEntry
Change-Id: I917ce346bf66cb18890d7d055501218d12a2c3ad
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-18 12:12:19 +00:00
Jarek Kobus
0c3789726d LocatorMatcher: Introduce LocatorMatcherTaskCreator
Register cpp and lsp matchers for all symbols,
classes and functions.

Change-Id: Id85c8164077ec395dac7e6ff45acc89db9e6ae08
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-18 11:40:16 +00:00
Christian Stenger
c3715883ee AutoTest: Improve handling of Qt Quick Tests
Qml files must not get declared inside the project files which
makes it hard to correctly determine the correct project part
they might belong to.
The recommended and correct way of using Quick Tests is to
have QUICK_TEST_SOURCE_DIR defined which is used internally
anyhow to find the respective qml files.
Make use of this fact also when determining the correct
project part.

Fixes: QTCREATORBUG-28716
Change-Id: I45371242ce931ee83b7bfbdd07a0848c7fd86abb
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-18 11:33:28 +00:00
hjk
dde4a7ebf5 Qnx: Re-work item store
This reduces the number of updates from the env* files and
overall simplifies the architecture.

I actually believe that it would be better if the whole configuration
settings page would not exist but be part of the device settings page.

Change-Id: I4184b74fc2c9695356752903c861f3758a6d7c73
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-18 11:33:21 +00:00
Christian Stenger
610c0fee87 QtSupport: Fix handling of tutorials
Amends ac17e0e2ad.

Change-Id: I9c0ffdb01ef446a76bfcbbdb8b5c560dd9f26e8d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-18 11:33:19 +00:00
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
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