Commit Graph

80529 Commits

Author SHA1 Message Date
Christian Stenger
e0219fad4d Debugger: Make debugger aspect more explicit
There are basically 3 states for the decision whether to start
a debugger or not. But these had been under-represented by just
displaying 2 states.
Enabled (checked) and disabled (unchecked) are obvious, but the
default of Auto (represented as checked) is there for convenience
of the user, but it has some drawbacks of failing its guess
whether to enable the debugger or not.
Turn the former check boxes into a tri-state combo boxes and
explicitly display the consequences inside the summary.

Task-number: QTCREATORBUG-28627
Change-Id: Ieffed5b227ae978555258097385d6e80dfad3ac6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 11:35:54 +00:00
Christian Stenger
35df3812f7 Debugger: Improve detection for the need of Qml Debugger
By default QC performs an educated guess whether to enable
QML debugging or not.
Improve this as the detection may fail and leave the user without
a special hint depending on the project structure.

Fixes: QTCREATORBUG-28627
Change-Id: Ibd461aff2bf9be7058bdf33c8740ef07a457c365
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 11:35:36 +00:00
Cristian Adam
d41365610f CMakePM: Integrate CMake's lexer
Kept only the needed bits to parse the CMake files.

Change-Id: I7c4aa0779846fcee91469a38f84d801513e3aa63
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 11:34:38 +00:00
Cristian Adam
71eb0ab9f8 CMakePM: Add CMake source file parser
Files taken from the CMake repository https://gitlab.kitware.com/cmake/cmake.git

624461526f4707a2406ebbd40245a605b6bd41fa (tag: v3.26.3)

Change-Id: I9ef388908cd22eb2748b5c17d039848ee23585b9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 11:34:29 +00:00
Jarek Kobus
c118f8cae4 UrlLocatorFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Id4b97a10bc01ab4392d7e7fc6e5890dcd3d42be9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 10:28:44 +00:00
Jarek Kobus
3726bfc779 MacroLocatorFilter: Use Acceptor for LocatorFilterEntry
Change-Id: Ie7aa7d81e1b81190b2966de09dc04b3ffb2691ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 10:27:49 +00:00
Eike Ziller
7879d84033 deployqt: Support elfutils from Linux distribution
Which can be in a more complicated directory than just /usr/lib, like
/usr/lib/aarch64-linux-gnu .
So, recursively look for the elf library to determine the right
directory.

Change-Id: I58ed8a045fbde50dea8851f63409a5a0863c3b16
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-20 09:55:23 +00:00
Jussi Witick
b57971a9cd 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>
(cherry picked from commit f98a03a28d)
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 09:21:13 +00:00
Jarek Kobus
99b5d93cfb LocatorMatcher: Introduce MatcherType enum
Use it for registering/getting different kinds of matchers.

Change-Id: I6f944e0332bf8c512892a00b8ba88f9939f34682
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 09:18:11 +00:00
Orgad Shaneh
f5cccab95b MacroExpander: Fix Path and FilePath on Windows
They should have / separator.

Amends commit 4fbc56d453.

Change-Id: I7218c345b271360f24c03aea5ee62be05342afe0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 08:31:29 +00:00
Eike Ziller
71f9e536c5 Markdown: Fix that text editing actions were not available
Add the TextEditorActionHandler and point it to the text editor.

Change-Id: I2c84d6b0160c7402ea32d56ed4dbc72d512072a1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-20 08:31:06 +00:00
Ulf Hermann
1c60f57340 C++ editor: Make generated Q_PROPERTYs FINAL by default
It's bad style to omit the FINAL because such properties can be
shadowed, causing problems in QML.

Change-Id: I9083c69128f6335f584f0a1d28f1fe1e54a02eaf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-20 07:44:42 +00:00
Leena Miettinen
e73aaa044e Doc: Remove details about locator filters and refer to tooltips
- Reorganize the topic contents, so that all examples are in one place
- Add subtitles
- Update screenshots

Task-number: QTCREATORBUG-28996
Change-Id: Id139b19c5ff18c08b7a27494d6ac5051b298c014
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-20 07:38:15 +00:00
Jarek Kobus
b6d1cbc5f6 StringUtils: Fix missing include
Amends a353e9fde1

Change-Id: Iee878da1f907ec0131dd3fd16fe4f84752355b38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-19 19:39:33 +00:00
Jarek Kobus
129fc0583f ILocatorFilter: Move allLocatorFilters() into private section
This shouldn't be used outside of locator scope.
For other usages that could reuse some filter's
implementation use LocatorMatcher with shared
list of LocatorMatcherTask.

Change-Id: I63a62c79b38985e24835fecd38d016dfb164a16e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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 13:47:33 +00:00
Alessandro Portale
dd5eed0b35 Utils: Fix painting artifacts of FancyLineEdit on StyledBar
Don't enforce a premature polishing by the style.

Fixes: QTCREATORBUG-27510
Change-Id: I1598a75741c5990567a33ad8376144432894597a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-19 12:59:53 +00:00
Jarek Kobus
6e8988c926 CppModelManager: Use locator matcher for unused functions
With this patch, when both cpp and lsp function filters
are available, they now run in parallel. The execution time
for getting the filter results (~110 K hits) for the
Creator codebase went goes from ~1100 ms into ~650 ms.

This patch also solves the potential issue with interference
between parallel runs of functions filter in locator and
in find unused functions.

Change-Id: I8f7f0b85d325848c04760ab76a7b9f02bcb5991e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-19 12:54:25 +00:00
Jarek Kobus
8f44964059 CppCurrentDocumentFilter: Get rid of the arg from c'tor
It's always CppModelManager::instance().

Change-Id: Ia049ad3bd452f8773d679549c33981460c2705d4
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>
2023-04-19 12:14:41 +00:00
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