Commit Graph

68765 Commits

Author SHA1 Message Date
Alessandro Portale
0e26d0676f Spinner: Remove superfluous ;
Change-Id: Ic1c16c1fad233bf32ec07ea3bfb9a65bf85cdd20
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-11 06:35:46 +00:00
David Schulz
2b72ba66ce LanguageClient: add workspace configuration project settings
Change-Id: I9876773550f3dc566dec05b78f818ca49c930da1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-11 06:29:06 +00:00
Thomas Hartmann
5f0556536e QmlDesigner: Cleanup PropertyTreeModel
* Some cleanup
* Add cache
* Strip full qualified name from PropertyNameRole
* Hide nodes without children if filtering

Change-Id: Ibd368174f5a56d6be33b6e55dc7a8099bbe2d119
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-08 14:20:27 +00:00
Thomas Hartmann
618797a80a QmlDesigner: Fix expression in empty property case
Change-Id: Ib0aa08891862218b6ec9d84ca6170d2bc644aded
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-08 14:20:04 +00:00
Henning Gruendl
5e8b5ec1f0 QmlDesigner: Integrate Expression Builder
Task-number: QDS-10587
Change-Id: Ifc13a8364fccb74cb60d683f0e6c322d80baab50
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-08 14:15:40 +00:00
Eike Ziller
2adebd0eb4 Core: Never call QMainWindow::menuBar()
It replaces the global menu bar on macOS (that is a QMenuBar(nullptr))
with a window specific menu bar, resulting in an empty menu bar for Qt
Creator.

Amends a6e779606d

Change-Id: Id6e2c0b9b2dfe4ade88af0f9a6d3b008fed790be
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-08 12:39:05 +00:00
Amr Essam
cbf4273bab QmlDesigner: Add custom uniforms handlers
Also minor updates and additions.

Task-number: QDS-10499
Change-Id: I0a1009e943cc0908f19872eb79ce5da80e736249
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-08 12:28:58 +00:00
Miikka Heikkinen
d6179c7cec QmlDesigner: Refactor 3D view toolbar popup positioning
The same positioning code had several copies. Consolidated those into
single function and adjusted the Y-coordinate a bit to make it visually
more pleasing (i.e. no more highlighted buttons peeking from under the
popup).

Change-Id: I7fb251f46ee3395b18577d782693e3873d07af6a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-08 11:51:54 +00:00
Eike Ziller
6998bf6591 FileIconProvider: Avoid access to mime database when registering icons
We register icon overlays at startup, but we do not need to actually do
anything at that point in time. Accessing the MIME database triggers its
initialization, which takes unnecessary time.

Change-Id: I9b9698b43569a93cf775d3b4fc8310d7cc2a0550
Reviewed-by: hjk <hjk@qt.io>
2023-09-08 11:15:53 +00:00
Christian Kandeler
91b67da6da Update qbs submodule to HEAD of 2.1 branch
Change-Id: Ia27a1690a12a447871d639a739057557860b8b03
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-08 11:12:11 +00:00
Mahmoud Badri
af2738ec33 QmlDesigner: Add effect maker uniform's tooltip
Change-Id: I4787e1bcadb24d8ff34d26964bdc4f2e97704124
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-09-08 11:04:15 +00:00
Mahmoud Badri
7fbcf4a38e QmlDesigner: Add empty placeholder to effect maker's view
Fixes: QDS-10592
Change-Id: Icc6193b358b83fce2a229321e30880e35e074055
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-08 08:26:03 +00:00
Christian Stenger
322336a488 AutoTest: Speed up scanning for tests
Especially Qt and Quick tests scanning takes some time,
so do some additional pre-filtering of files before
parsing them to reduce the number of files to process.
Depending on the structure of the project this can
significantly reduce the scan time.

Task-number: QTCREATORBUG-29301
Change-Id: I629beedcc02502d98d84e29282e1cd7b265cfcf0
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-09-08 08:00:30 +00:00
Cristian Adam
a6e779606d Core: Add action to hide the menu bar
This will only affect the platforms that do not have a native menu bar
e.g. Windows and Linux excepting Unity.

Fixes: QTCREATORBUG-29498
Change-Id: I17a654cfa50342f3e506bf0a2b14225c4d3a6bee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-08 07:59:50 +00:00
Christian Stenger
05b6678d56 Debugger: Fix gdb debugging without terminal
Amends 373886bc21.

Change-Id: I200391d702dc447508b52a9a3f210d08626b1bbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-09-08 07:46:38 +00:00
Christian Kandeler
3c3a9f6786 Improve sorting in Kit-related settings tabs
- Use a proper sort model in the Kits settings widgets, so kits will
  not just initially be sorted.
- Handle the top-level nodes in a special way, as not to rely on
  "Auto-detected" coming before "Manual" in all languages.

Change-Id: I1eb8e1bee6836b47164d76b49435f8ff5120bb14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-08 07:32:55 +00:00
Miikka Heikkinen
8ce8bd4300 QmlDesigner: Disable "Use scene environment color" when not under View3D
For standalone 3D scenes that are not part of View3D, syncing to scene
environment doesn't make sense, so disable that option and force it
unchecked when activating a standalone 3D scene.

Fixes: QDS-10583
Change-Id: I8e5b205c35ec12bbf4340fda943345f5bd5396a6
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-08 07:32:20 +00:00
Eike Ziller
6defd083ef CtfVisualizer: Never crash with uncaught exception when loading JSON
If we retrieve a value of a type that doesn't match the actual type in
the JSON, the JSON library throws an exception.
We should have checks to avoid this, but as a global measure never let
exceptions through to Qt Creator.

Change-Id: Ibfe830d745a94810f874ccca82b83d57ea72f31e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-08 07:01:07 +00:00
Marcus Tillmanns
7986776f58 Terminal: Fix incorrect signal connection
The "process" exiting does not necessarily correspond to the
stub exiting. As an example, on linux, gnome-terminal will immediately
spawn a new process for the new terminal window and exit itself.
The stub will then simply run in the detached terminal window.

Fixes: QTCREATORBUG-29488
Change-Id: Ifac0795495901b80638bd10d720b036c09f0146c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-08 06:58:08 +00:00
Ali Kianian
5b26423257 QmlDesigner: Add ListModel and ListElement node testers
- ListModel and ListElement testers are added to the NodeMetaInfo
- Adding unknown properties to the ListElement node will not create a
warning message

Change-Id: I208ab4f8030ec60a4ef275680adefa9902647ff0
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-09-07 17:25:01 +00:00
Marco Bubke
4bafb087ab QmlDesigner: Optimized isBasedOn a little bit
The very common case that the typeId is equal to the base type id is now
handled outside of a database query.

Change-Id: I0b81bc66ee473302646af79efc11eab607dc30c0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-07 14:57:24 +00:00
Marco Bubke
6d79f308c1 QmlDesigner: Add std::hash to NodeMetaInfo
Change-Id: Ib4c9bb3e275167e846629845d16773c03386b39b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-07 14:57:07 +00:00
Marco Bubke
a4f8cf709e Utils: Add more conversion operators to SmallString
An explicit operator for QLatin1StringView. That is dangerous if the
string is not ASCII and one for QUtf8StringView.

Change-Id: I2d0a0ca3854b47595563a19263aacd7f8825d026
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-07 14:56:53 +00:00
Marco Bubke
1e35f3cf19 QmlDesigner: Modernize string usage
In many cases it is nicer to use a QStringView or QLatin1StringView.
""_L1 is a nice short cut for writing QLatin1StringView("") too.

Actual QStringLiteral is not really a literal but uses a char16_t[]
literal instead of a char[] to create a QString.

Change-Id: Ib86ab93771a950c655a06bdd6f858afd38cfcfae
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-09-07 14:56:21 +00:00
Mahmoud Badri
c5c1612c6b QmlDesigner: Implement disabling effect maker composition nodes
Disabling happens using a new button added to the section.
Also a small tweak to disable drag button when there is only one section
in a category.

Fixes: QDS-10575
Change-Id: I33884a5b333c54b2bae650943940d4858f489f7a
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-07 14:53:06 +00:00
Miikka Heikkinen
1b0f25eee8 QmlDesigner: React to clearColor reset when syncing background color
3D view now changes the background color to black as expected if
clearColor of the associated SceneEnvironment is reset and color
syncing is enabled.

Fixes: QDS-10580
Change-Id: Ie3bfd96012fc76dc28b28d2ac9be65e6e9784ea1
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-07 13:45:42 +00:00
Aleksei German
d97bf7cc3b QmlDesigner: Add percentages to GradientModel
Task-number: QDS-9904
Change-Id: I98c9e67e46f282053755d143af19eb83f62a5c72
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-09-07 12:36:24 +00:00
Christian Kandeler
9b25ab5329 CppEditor: Fix removal of "foreign" clang include directories
The version number does not necessarily contain all version parts
anymore.
See also 628babb5cb.

Fixes: QTCREATORBUG-29571
Change-Id: I71fec628c54b430cf2fe0fe54f4f309a2f811043
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-07 12:27:28 +00:00
Alessandro Portale
82daa08a7e ScreenRecorder: Support recording on macOS
Change-Id: I1f5429939acf82235caf07af85ab3397aee5955d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-07 12:22:47 +00:00
Artem Sokolovskii
f4e50126b1 Core: Add clearAboutInformation function
Change-Id: Ib6dcc3b963917c096756cbff09541f4e13c8184b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-07 12:12:26 +00:00
David Schulz
03e50d4d7a Python: fix unguarded optional access
Change-Id: I4131343aab2f193336e81f2e76cbb95ef3ff2805
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-07 12:06:17 +00:00
David Schulz
445501e29e LanguageServerProtocol: allow RegistrationOptions in definitionProvider
Change-Id: I9868a777fc7ef078ab87fea823d5e9557c87ca78
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-07 11:56:31 +00:00
Marco Bubke
e4a470ed0b CMake: Fix warning
glibc 2.12 is now over 10 years old. I think we do not support it
anymore.

Change-Id: I3df4ebaa73de07c22ff71e50ddbee5938bd0ce55
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-07 11:08:14 +00:00
Miikka Heikkinen
291e3096cd QmlDesigner: Adapt to quick3d private API change
Some quick3d utility functions were moved under QSSGUtils namespace.
We only used one one-liner function from there, so just copied the
implementation into puppet to avoid this dependency.

Change-Id: I0b08157732161c750b3e53873fd10e1b20137b04
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-07 11:04:04 +00:00
Mahmoud Badri
6ad5631638 QmlDesigner: Update the icon font
Updated icons: snapping_conf_medium and visible_small
Added icon: invisible_small

Change-Id: I13771ede164454b89ce6357598db05e451f36afb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-09-07 09:54:50 +00:00
Mahmoud Badri
00aad5e89b QmlDesigner: Effect maker UI tweaks
- Corrected property name font size
- Disabled zoom controls when not needed
- Updated Zoom Fit icon
- Show vec2, 3, and 4 properties in 1 line

Change-Id: I6d5474163b708790b61b6d3462068b138431bd49
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-09-07 09:36:40 +00:00
The Qt Project
1883d57a0c Merge "Merge remote-tracking branch 'origin/11.0'" 2023-09-07 09:30:13 +00:00
Alessandro Portale
efb4b9ad5f ScreenRecorder: Fix multiscreen handling when recording on Linux
The original approach of using Qt's "screen ID" as screen identifier for
ffmpeg does not work with the x11grab filter. x11grab requires the
identifier as defined in the DISPLAY environment variable, which it
receives now with this change.

x11grab grabs all screen contents in one big image image, so we need to
crop accordingly to get the content from the screen which the user
chose. Qt's QScreen API helps us with determining the right geometries.

Change-Id: I84a1686b151b7cb0aced09bc427114e0e9aa08bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-09-07 09:30:03 +00:00
Miikka Heikkinen
6f21cb0b23 QmlDesigner: Cleanup puppet and related versioned code
QDS requires minimum Qt version 6.4.3 to build at all, so removed
all code and files from puppet that were relevant only for prior
versions.

Fixes: QDS-10556
Change-Id: I58a151fc25f733d4815869e749f77fe30072c19b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-07 09:18:10 +00:00
Eike Ziller
2792166574 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ifab8b72af33de4decf20d2a879bea4dfba1e9fbe
2023-09-07 11:15:32 +02:00
Eike Ziller
3331c84016 ProjectExplorer: Do not access mime database during startup
Initializing the database takes time, that we do not need to spend at
that point.

Change-Id: Ieb9105916b3b7cf3a373d6df58ac2ee5668ef40f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-07 09:14:41 +00:00
Christian Kandeler
9f8998881f ProjectExplorer: Do not use the project name in ExpandData
Using the node display name for disambiguation was introduced in
62d36ac9a9 for virtual folders.
As far as I can tell, those always have different priorities in case of
an identical path, so we can use the priority instead of the volatile
display name to distinguish nodes with the same file path.
This also reverts the workaround from
4e1ff9ed8f.

Fixes: QTCREATORBUG-29201
Task-number: QTCREATORBUG-28681
Change-Id: I6cc056789bfb5a7f2666c9163c2687146ccb70f2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-07 08:57:49 +00:00
Marco Bubke
9e60df9f7f CMake: Silence warning in third party code
Adding SYSTEM_INCLUDE for which you get no warnings. Fix
PUBLIC_SYSTEM_INCLUDE to work for all cases where PUBLIC_INLCUDES works.

Change-Id: I7059c2879004743c13c368220596081dd054407a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-07 08:53:43 +00:00
Christian Kandeler
f1365d99fa CppEditor: Add quickfix for moving function documentation
... between declaration and definition.

Fixes: QTCREATORBUG-13877
Change-Id: If2a8977587ef2ac888e9c9dde5f63d222d96d964
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-07 08:47:50 +00:00
Christian Kandeler
400806e16f CppEditor: Fix crash in tst_checkSymbols
Amends 0a058bb657.

Change-Id: I2ccbfbe30d78d536a7657b29da25a216ac504fe5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-07 08:33:44 +00:00
Christian Stenger
6b6d9dc21e AutoTest: Speed up Qt Test parser
The look up of function definitions is quite costly. Limit
it to the test data functions as we need them when looking
for data tags.
This limitation reduces the time of a full scan here by
more than 40% compared to without limitation.

Task-number: QTCREATORBUG-29301
Change-Id: Ia692aab8cfcc1c98ca9a2d53c935d7755314f736
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-07 07:49:13 +00:00
Christian Stenger
792c74b47a AutoTest: Add report helper function
Adds a report() function which generates a simple string
holding the number of items per framework root node and
uses it inside the logging after a full parse.

Change-Id: Ib4be89de778aeab7e9c80b5c0522ee7f3f1bb587
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-07 07:49:03 +00:00
Sami Shalayel
25e1266c26 qmljs: add option to disable builtin codemodel
Add an option in the QML Language Server settings to disable the code
model, for now it allows to use qmlls for renaming and find usages
operations.
Some of the checkboxes in the qmlls settings were not making a lot of
sense, rephrased them to be easier to understand for the user.

TODOs for later commits:
* use qmlls for 'go to definition' aka 'follow symbol under cursor'
* add extra action to the context menu for 'go to type definition' and
  implement it using the language client
  * also, remove builtin codemode stuff from the context menu when the
    builtin model is disabled

Task-number: QTCREATORBUG-29567
Change-Id: I6283d99bd2b5dc8aef7df49994eb313bfbb854c6
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-09-07 07:11:34 +00:00
Knud Dollereder
759b560bab Cleanup ConnectionEditor models
Simplified interface for the BindingModel and DynamicPropertiesModel.

Change-Id: I772f31be704afe2a43c6368aefab1b026b85ec8b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-06 17:14:38 +00:00
Marco Bubke
e0c129d4b1 QmlDesigner: Improve task queue
The abort callbacks does not need any lock. It even can lead to a
deadlock if they call back. And a thread was always newly started.

Change-Id: I0e25b66bb3647aae16113628487acaa4c7377819
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-06 16:38:50 +00:00