Commit Graph

1500 Commits

Author SHA1 Message Date
Marco Bubke
04c8ba5b3f QmlDesigner: Fix linking for Qt6::QmlDomPrivate
Depends on fix in Qt 6.7.3.

Change-Id: I6e88ff660b6bf0ed7629cd58d62cc76d8a3f3cef
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-06 15:26:47 +00:00
Marco Bubke
2ae8ae75af Sqlite: Add compound id
Saving the source context id as part of the source id simplyfies file
path handling. It is now very easy to see if a two source ids have the
same source context id.

Change-Id: I6c86942d9f026fc047c49bbde3fffd6af14d81de
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-06 15:26:33 +00:00
Tim Jenssen
0d571b5e95 QmlDesigner: add IS_SUPPORTED_PROJECTSTORAGE_QT
It also can be overwritten by option:
IS_SUPPORTED_PROJECTSTORAGE_QT
or environment variable:
QTC_IS_SUPPORTED_PROJECTSTORAGE_QT

Change-Id: Iabc7d59ff100017811167a6ec4e7447ccc3e55ee
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-06 15:20:24 +00:00
Marco Bubke
920da89143 QmlDesigner: Remove project type traits
Project type traits are increasing the code complexity in the updater by
quite  lot. The discover can be done in an other way too.

Change-Id: Ied9b7df445e854c76243ece6666690ea10b8d33d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-06 15:00:19 +00:00
Marco Bubke
3fd89a31bc QmlDesigner: Use C++ 20 designated initializer for update
It makes it easier to add new arguments without breaking the tests.

Change-Id: Id03053ac17e4da26a2abf2a23e6cc20848ed9af5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 09:24:33 +00:00
Marco Bubke
e3a062837d QmlDesigner: qml document parser traits
A file component is always of the reference kind. Sets the file
component trait too.

Task-number: QDS-12665
Change-Id: I800b32a4d204fb016c1274d05c08695b01581ae4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 09:24:26 +00:00
Marco Bubke
7ead23ae0e UnitTests: Move setup code to the arrange region
Setup code should not be in the act region. It makes it not only harder
to read what is tested, but debugging too.

Change-Id: Id93300e7b9ab3ee63a1fcf10c0d462b0c4ff7b47
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-08-01 09:24:16 +00:00
Ali Kianian
ace48d4b7f QmlDesigner: Read and apply minimumVersion for material bundles
If `minQtVersion` exists for a material in material_bundle.json file,
and kit version is less than `minQtVersion`, the material should be
skipped.
Version class has improved and moved to QmlDesignerUtils.

Task-number: QDS-13274
Change-Id: I726c1765c69e5b080650099d0b811a90cfc3ccf5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2024-07-31 12:01:56 +00:00
Vikas Pachdha
2b3d0b9dbe Fix generateId accepting non-latin characters as valid characters
Task-number: QDS-13269
Change-Id: I46a3bc193e35f4a93c8a0fa48de26891dc9d098a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2024-07-29 10:04:11 +00:00
Ali Kianian
7c17349296 QmlDesigner: Repolish materials action in 3d context menu
1. Instead of a single action, a menu is shown. This menu contains all
of the materials of the selected node.
2. If multiple nodes are selected, the intersection of the materials is
shown.
3. Having several identical materials in a nodes are supported.
4. For each material, there are two options
* Remove (Removes the material from the selected nodes)
* Edit (Opens the material editor for the selected material)

Task-number: QDS-12375
Change-Id: Icc19a4127dc490490e4464ce840e89e5379c5e8c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-07-25 09:05:33 +00:00
Marco Bubke
3e05959468 QmlDesigner: Use more string views in the model
To decouple the string implementation from the internal string. It
should lead to much less allocations too after the rest of the code is
converted too.

Change-Id: Ifb49f57b9e5ac5af4963e1257c535ddef6044d93
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-24 14:10:51 +00:00
Marco Bubke
fc0cedf347 Utils: rename SmallString::countOccurrence to count
Change-Id: I3ff28aa0ac36191e3352dd0c8ef0942bfa6b9b25
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-24 14:10:44 +00:00
Marco Bubke
8fe6d2dfa8 UnitTests: Add test for model utils
Change-Id: If81a7417894cec29190f030b13e1df9470e758b4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-23 13:53:10 +00:00
Marco Bubke
a29ff454a6 QmlDesigner: Adding missing property error notifier
Alias properties are quite often broken. So we have to handle that
broken aliases.

Task-number: QDS-12761
Change-Id: Id9b53b98080733e5939de6b3761c923fa35e1dcf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-18 14:56:10 +00:00
Marco Bubke
f86c1f5b2f UnitTests: Cleanup project storage tests
Change-Id: I12b92e988b17a185f8b08d5fc692cfdaef803d99
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-18 12:13:03 +00:00
Marco Bubke
67c7beeffe QmlDesigner: Use Qt 6.7 for project storage
Change-Id: Ibf0df9a05dda2c3bbd2a55935e9471ebf40dcf64
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-18 08:03:07 +00:00
The Qt Project
dd44168ad5 Merge "Merge remote-tracking branch 'origin/14.0' into qds/dev" into qds/dev 2024-07-10 16:13:44 +00:00
Tim Jenßen
93588dbee2 Merge remote-tracking branch 'origin/14.0' into qds/dev
Conflicts:
	doc/qtdesignstudio/src/how-to/qtdesignstudio-live-preview-desktop.qdoc
	qt_attributions.json
	src/libs/sqlite/CMakeLists.txt
	src/plugins/qmldesigner/CMakeLists.txt
	src/plugins/qmldesignerbase/QmlDesignerBase.json.in
	src/plugins/qmlprojectmanager/CMakeLists.txt
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.cpp
	src/tools/qml2puppet/qml2puppet/instances/qt5import3dnodeinstanceserver.h

Change-Id: If33e41d8951a49acaba0a74c3e5848eef52bb945
2024-07-10 18:11:28 +02:00
Marco Bubke
4046f47174 QmlDesigner: Use error notifier for property type name resolving
We can polish it later. But so far the architecture works and the
problematics cases of missing types is handled.

Task-number: QDS-12761
Change-Id: Ifb55a5772fddfa7719a4d690b24b0539679f79ec
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-10 12:29:56 +00:00
Marco Bubke
55fed73ee4 Sqlite: Fix instable return values
References into vectors are instable because the vector can be
reallocated. std::list \provides stable references to entries. In  the
future std::inline_vector is maybe a better option.

Change-Id: I76ac3005259ef9d09f3b8c226dbfd48433aa48b9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-10 12:29:35 +00:00
Marco Bubke
ae50f706bf QmlDesigner: Move unrelated files out of model
Move them to their own sub directories.

Change-Id: I643cf18a862cdbea868e25070e3015ed7e739d46
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-09 19:49:16 +00:00
Marco Bubke
155013c889 QmlDesigner: Move utils file in designer core into designercoreutils
Clean it up before more files are added to it.

Change-Id: I58c531a80718d99d05dc444974e1a4236da8c6cb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-08 21:53:33 +00:00
Ali Kianian
7caf81117d QmlDesigner: Unify invalid ids
Fixes: QDS-13056
Change-Id: I8d99e0e9eba148fe4d31c3c9a2d28f46d91b377a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2024-06-24 14:43:47 +00:00
Marco Bubke
dad1232165 UnitTests: Fix typo
Change-Id: I5f5e3f208603733b173798816f2e9ada9ff39140
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-20 13:46:47 +00:00
Marco Bubke
b98a67ee9e QmlDesigner: Fix tests for changing import in model
Change-Id: Ie09f4d77da460362deb068d2358dfb311d6428be
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-20 13:28:32 +00:00
Knud Dollereder
24c79573db QmlDesigner: Improve file filtering of the resourcegenerator
and collect functions to identify images,
assets and resources in one spot.

Fixes: QDS-12839
Change-Id: I510673b0756dc1e580d753f54831b4c23224056b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-06-17 09:34:58 +00:00
Marco Bubke
99e5042732 QmlDesigner: Add persistent auxiliary storage
The persistent storage is saving the data in-between program executions.
A sqlite database is providing the backend. The model nodes need an id
to be identified.

Change-Id: I24e4ea5184c04cb6a9e3828059ca593ee41d271e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-06-13 11:27:06 +00:00
Sivert Krøvel
98c765d6fc Resolve qmlproject dependencies during conversion
Qt for MCUs modules have their own qmlproject files. To make it
easier to know which qmlproject files belong to a project
the qmlproject dependencies are resolved and listed in the
internal project JSON object when converting a qmlproject file
in QDS.

In Qt for MCUs, qmlproject files are found either in ModuleFiles
nodes or in the importPaths (with some extra restrictions).
This implementation mirrors the dependency resolution in
Qt for MCUs also in QDS.

Task-number: QDS-12636
Change-Id: I7ae874d26beeea0deb440fba031b7a4b11eef1e0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2024-06-12 10:26:11 +00:00
Marco Bubke
8d7e62fa5e Utils: Improve tests for small string
It fixes a capacity bug.

Change-Id: I3545eb32d8b23514da286c2df77aebc197df8252
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-06-11 12:16:02 +00:00
Marco Bubke
a7309597fa Utils: Optimize smallstring a little more
For string with a larger area we use spend a little bit memory on less
execution time.

Change-Id: I261ada4120de974ce40daaa7f0922af4dd115996
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-06-10 09:18:34 +00:00
Marco Bubke
b9f28b957c UnitTests: How to write tests
Change-Id: Ic2221a83d139e7d7ad7b4d0f40d602822fb6654c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-06-06 13:16:57 +00:00
Marco Bubke
12a0a02563 UnitTests: Fix warnings in UniqueName tests
Change-Id: If41125a2cdc7f7502705f079403338bd0eb397e0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-06-06 10:05:53 +00:00
Marco Bubke
2ca059e03d UnitTests: Cleanup project item
Change-Id: I28f7f6f7cb1d6bc01876b6ef27565b88b4542d8a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2024-05-29 10:58:49 +00:00
Tim Jenssen
4515fba526 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/plugins/qmldesigner/CMakeLists.txt

Change-Id: I250c8e5284ddb0f335c440999b8920762419c89b
2024-05-28 19:06:18 +02:00
Marco Bubke
b8322aece2 QmlDesigner: Use error notifier for prototype and extension type name resolving
If the prototype or extension has an unresolved id, it needs to be
checked, if an exported name belonging to the prototype or extension was
updated. In that case the id has to be again resolved.

Task-number: QDS-12761
Change-Id: I7a733662cf37e13e8c2db53dec5a4f3e0a9b6ecf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 11:06:28 +00:00
hjk
f30d369b99 Fix QMetaType::type() related deprecation warnings
Not in sdktool, which still builds with Qt 5.15

Change-Id: I6e6f4331127b821e471e2840e7959cd65e6419e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 13:04:22 +00:00
Mahmoud Badri
2eb396b83d QmlDesigner: Allow adding imported 3D components to content library
Fixes: QDS-12784
Change-Id: I87edf8f6c14fabb066c85e8536c91b58e439e5d0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-23 11:20:19 +00:00
Marco Bubke
d345254579 QmlDesigner: Add project storage error mechanism
Task-number: QDS-12761
Change-Id: If782b5d81b53979033e2738292dedac91e1adcbf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-23 10:43:52 +00:00
Marco Bubke
f296f9d77c QmlDesigner: Parse components recursively
Change-Id: I8fa892cce8e34b5e58cbdde04c57e30b9fc74866
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-23 10:42:43 +00:00
Mahmoud Badri
9a6bd997b5 QmlDesigner: Convert UniqueName keywords to array of stringviews
Also change the class to namespace, rename "get" to "generate"
and add unit tests.

Change-Id: Ib52bf7e3e0110e33acb40ca6e3d9bfc61cefdca0
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2024-05-21 13:48:06 +00:00
Mahmoud Badri
fc79bad535 QmlDesigner: Remove Model::generateIdFromName()
- Added UniqueName::getId()
- Cleaned up generateNewId() and made it use UniqueName::getId()
- Moved UniqueName to designercore

Also reversed how the predicate of UniqueName::get() works.

Change-Id: I89c50f7d80610243f56be165b1495ef428da457c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-20 12:58:22 +00:00
Ali Kianian
924019e8c2 QmlDesigner: Use GeneratedComponentsUtils in Model Editor
Change-Id: I567c746eb098c0c64d590ea7fed71f17de5adc76
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-05-13 13:49:22 +00:00
Marco Bubke
fa07abf6d8 QmlDesigner: Rename ProjectData into DirectoryInfo
The design is now directory based. So the name should reflect that.

Task-number: QDS-12665
Change-Id: I7479c37357a4fd33f5f3b4c93d63d2fdd4ca6ef9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-07 11:08:53 +00:00
Thomas Hartmann
0f2d15f16c QmlProject: Also add support for gif
Change-Id: I46400e8bd605142401ab941e45baba1fa4b27fc0
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-05-03 13:04:15 +00:00
Thomas Hartmann
34e4710f7a QmlProject: Fix tests
Change-Id: I988b1e623ee672109172ac8f746406a62b6a895b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2024-05-02 14:32:37 +00:00
Marco Bubke
11f7ece0d8 QmlDesigner: Type annotaion reader set defaults
So far the defaults were false but some of the are true.

Task-number: QDS-12663
Change-Id: I710913ed371d6e094cf68c154bb9353c21ee0c16
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-02 10:34:21 +00:00
Marco Bubke
522805629a QmlDesigner: Propagate annotation type traits recursivly
Task-number: QDS-12661
Change-Id: I593eeaaa3800c450a0c2b9f08ae1993ddc29cd8f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-05-02 09:39:25 +00:00
Marco Bubke
15f05d0bbc QmlDesigner: Drag and drop is now working with project storage
Type annotaions are now saving the type name and dropInFormEditor is by
default true.

Task-number: QDS-12450
Change-Id: I757f59b296de321c4d0190a36ec581379f646735
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-04-30 13:46:24 +00:00
Marco Bubke
05e5aa7f0c QmlDesigner: Add kind to module id
In some cases we need to find out what kind a module is.

Task-number: QTCREATORBUG-30735
Change-Id: Ibd5a70ee6fe0f619009fd645f444d3fbb2fd6e01
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-04-25 14:43:12 +00:00
Marco Bubke
4268c50f30 QmlDesigner: Fix property editor lookup
Task-number: QDS-11951
Change-Id: I22563aca2aacf515d2a2e66d87e39c418ea3b7d4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-04-25 12:46:29 +00:00