Commit Graph

68765 Commits

Author SHA1 Message Date
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
Marco Bubke
2694d6a1f5 Add feature to disable QmlDesigner and related files
QTC_WITH_QMLDESIGNER or WITH_QMLDESIGNER has to be set to OFF to disable
QmlDesigner related code.

Change-Id: I7e25200fe856fcc7de3493cfa394cdd4f923e0bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 17:19:33 +00:00
Marco Bubke
4393df48be QmlDesigner: Reduce version demands
We now expect Qt 6.4.3 and MacOS 10.15 or higher.

Change-Id: I339e3ca7f668d9451859c51472712c831a6caf8c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 17:19:07 +00:00
Marco Bubke
ccf64cf642 QmlDesigner: Disbable maybe-uninitialized warning
Change-Id: I683bacc47b6f98a7adb64c3391c3df65c42fe945
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 16:22:48 +00:00
Marco Bubke
111e71238c QmlDesigner: Fix warning
Change-Id: I91cc82b907c3ddfaf194094217a66379c3c41eb8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-19 16:12:10 +00:00
Marco Bubke
df56f95128 QmlDesigner: Fix build for Qt < 6.5
Change-Id: I943b42e3536a2705dfcee5620e84ea5ddf4fc828
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 16:10:02 +00:00
Marco Bubke
66288ef113 QmlDesigner: Cleanup QmlDesignerBasePlugin
Please don't put unrelated code into a plugin source file. It gets
really cluttered. Use UniqueObjectPtr if the QObject has a parent.

Change-Id: I6535163be1f67528a0cf66bf050f48601e3fa09c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-19 16:00:36 +00:00
Marco Bubke
34c69766dd QmlDesigner: Add version scanning for Qt5
Add some hardwired code for lagacy Qt5 support.

Task-number: QDS-9542
Change-Id: I505685042f53b7e653e76c8d883c8d7bb30605d7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 15:58:21 +00:00
Henning Gruendl
062c774541 QmlDesigner: Update workspace management
- Add QML attribute displayName to the workspace presets
- Add workspace order
- Replace QStringList workspaces with proper model in order to use text
  and value role
- Clean up workspace management, remove redundant functions, move
  warning messages out of backend
- Utilizing expected_str to forward error message
- Change output format of generated XML workspace files
- Remove workspace combo box from C++ based toolbar

Task-number: QDS-9184
Change-Id: I19455db75e6b07aea9342eb5276c6191a1456a2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 14:15:27 +00:00
Ali Kianian
ca300e9eb8 QmlDesigner: Fix text selection bug for code editor
The event is returned to the parent hierarchy when the position is not
in the scrollbars area.

Task-number: QDS-9726
Change-Id: Id781650e15035a26f282990d7ee387b4417bc6eb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 14:11:23 +00:00
Marco Bubke
6035ff939d QmlDesigner: Add module scanner
For performance reason we want to get the qml modules directly from the
file system. When the project storage is finished we can get the modules
from there.

Task-number: QDS-9542
Change-Id: I26d4b028fbf5ebc541fcd8e34d285ded1fb14935
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 13:58:22 +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
Marco Bubke
79b5a9f03e TextEditor: Return BaseTextEditor for duplicate
Because the type is always a BaseTextEditor we can return a
BaseTextEditor type. C++ is allowing to change the overload return type
so long it is compatible.

Change-Id: Ib4c88faaa6fdfb97fd03c51a120de0fa0c2d00cd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 10:17:56 +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
Henning Gruendl
cf61025af6 QmlDesigner: Remove experimental key insight
Remove the experimental key from the insight plugin meta data template.

Change-Id: I88ea837a1ff296a940e12b5935433947b2e2b7f2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-19 09:15:09 +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
Ali Kianian
795aae8e7c QmlDesigner: Enable transient ScrollBars for StudioStyle
- Transient scroll bar is available for StudioStyle.
- Some changes are applied to slider style, because scrollBar and
sliders have some common usages within the style.

Task-number: QDS-9283
Change-Id: I7a8b7997cf4d20142a0524c4a071b93dfd06321d
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-04-19 06:48:25 +00:00
Henning Gruendl
17feb6c352 QmlDesigner: Add insight plugin
Move insight plugin from qtquickdesigner repository to this in order
for it to be available in all QtDS editions.

Task-number: QDS-9626
Change-Id: I42ac804636d59930c4534df951455f864282986b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 06:44:13 +00:00
Ali Kianian
f5da6d2eac QmlDesigner: Fix shortcut text clip for the context menus
Task-number: QDS-9662
Change-Id: I7f9385e99c65b2201e36625b2094f04e6f6b701f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-04-19 06:40:45 +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
Marco Bubke
87e7829eaa QmlDesigner: Fix code view is empty
Fixes: QDS-9702
Change-Id: I23591db266e779a83e2b6df4156fae8c79e0d06d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-04-18 13:51:27 +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
Ali Kianian
886cbcde1d QmlDesigner: Fix the height of the menubar items
Task-number: QDS-9684
Change-Id: Ic9cc89b209440b46bcfa66c0449250e4fef4a267
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-04-18 12:10:16 +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