Commit Graph

8097 Commits

Author SHA1 Message Date
The Qt Project
7c7c6123d6 Merge "Merge remote-tracking branch 'origin/qds/dev'" 2024-08-07 12:55:01 +00:00
Christian Kandeler
9926de01c1 CPlusPlus: Add parser support for declarations of user-defined literals
... without a space before the identifier.

Change-Id: I977ffae82eb86f5ae6ea594cba17cc486e63bf6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-08-07 10:55:43 +00:00
Tim Jenssen
b4061e223e Merge remote-tracking branch 'origin/qds/dev'
Change-Id: I907e067abba640d27313ce03bc41326d3ed750f0
2024-08-06 19:04:41 +02:00
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
hjk
f49523029a Remove #include <utils/fileutils.h> from most header files
It has some platform specific warts, filepath.h is somewhat
cheaper and less ugly overall.

Partially clean up surroundings

Change-Id: Ida1fd470ec020f69c446109427f92a08e879789f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-26 10:41:16 +00:00
Cristian Adam
a8cbd17733 CMakePM: Implement "FOLDER" property for targets
See the CMake documentation https://cmake.org/cmake/help/latest/
prop_tgt/FOLDER.html

This allows placement of targets in the project view in specific folders
like e.g. "tests"

Qt Creator (ab)uses the FOLDER property for the "qtc_runnable" feature,
see https://doc.qt.io/qtcreator/creator-run-settings.html
which would not allow to have both.

The "qtc_runnable" should be fixed by having a property "QTC_RUNNABLE"
for a target and have Qt Creator parse the code.

Fixes: QTCREATORBUG-28873
Change-Id: I73433de78b9a86f631ee9d7903db535b69b734f6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-25 11:37:14 +00:00
Eike Ziller
3bbfd66bad Merge remote-tracking branch 'origin/14.0'
Conflicts:
	src/plugins/android/androidmanager.cpp
	src/plugins/android/androidrunner.cpp
	src/plugins/android/androidrunner.h
	src/plugins/qmldesigner/components/texteditor/texteditorview.cpp
	src/plugins/qmldesigner/components/texteditor/texteditorview.h
	src/plugins/qmldesigner/designmodecontext.cpp
	src/plugins/qmldesigner/designmodecontext.h
	src/plugins/qmljseditor/qmljseditingsettingspage.cpp

Change-Id: Idada49bb7441e8c5b748bd75b2e6bb2351bd323e
2024-07-25 12:56:53 +02: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
The Qt Project
74d7c84c8d Merge "Merge remote-tracking branch 'origin/14.0' into qds/dev" into qds/dev 2024-07-23 14:08:09 +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
Tim Jenssen
e5d8d1cef0 Merge remote-tracking branch 'origin/14.0' into qds/dev
Change-Id: I1c354102209ba0c3505e3e2745e64ce77cc22bb3
2024-07-23 15:28:59 +02:00
Robert Löhning
e2d0ec02fe SquishTests: Don't expect Creator to detect 32 bit cdbs
It stopped using them in Version 14.

Change-Id: I81c481d48474ae6024187b876720026ed668575c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-22 11:20:53 +00:00
Robert Löhning
ec735c3a2a SquishTests: Fix tst_rename_file for case ignoring file systems
On Linux, Creator only considers files with the exact extension ".qml"
QML files and places them under a "QML" node in the project tree. On
Mac and Windows, Creator also places files with extension ".QML" there.

Change-Id: Id81989e867fa946081ea7a350b208ddfe09e5460
Reviewed-by: Jukka Nokso <jukka.nokso@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-22 07:28:34 +00:00
Robert Löhning
0de1a6cdf7 SquishTests: Don't expect qmake in tst_default_settings
When qmake is not present in PATH or not usable, Creator does not add
a Qt version and does not write qtversion.xml. Expect this behavior
in the test.

Change-Id: I0890b9a22bdec47c0ac7206ba0a83d1e3ded2bb3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-22 07:10:15 +00:00
Robert Löhning
945f0462f8 SquishTests: Wait until exactly one proposal is being shown
...so we don't accidentally use a wrong one.

Change-Id: I4c08e11aab34b8649f40ba14385492b17e656385
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-19 15:23:58 +00:00
Christian Stenger
410b275eca SquishTests: Attempt to stabilize designer test
The switch to cmake broke this test completely as qmake handles
changes to ui files differently.
Changing a ui file needs re-execution of moc which is not done
automatically for cmake except when building.
Beside this the cmake project manager seems to inform the code
model about respective changes significantly later, if at all.
So, we explicitly trigger a build now after changing the ui file
and explicitly ensure the code model treats the file correctly
by closing and re-opening it.

Change-Id: Icb9cfb572c1442eff1bebc9c29fdee55155ca287
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2024-07-19 11:10:08 +00:00
Robert Löhning
a5b2c648bc SquishTests: Update expected page title in WELP04
Change-Id: Ib0a78b9b7aacbf5cf76d3a402e62239239592248
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-19 09:03:58 +00:00
Robert Löhning
2970b6c85e SquishTests: Use newest Kit in tst_designer_edit
The old MinGW can't compile the used project anymore.
Even configuring already fails. Testing compatibility
with old Qt versions and compilers isn't the purpose
of this test, so it can simply move to newer ones.

Change-Id: Ie21a5a726c33b4073f2aa4d955e2e5ea943bf9bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-19 08:59:22 +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
hjk
41046c0d44 LayoutBuilder: Initialize BuilderItem::apply more directly
Also, add some timing information.

Change-Id: I5d38cac9e7ad0afb24504ff521f31d5202268462
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-18 09:59:01 +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
Jarek Kobus
c343e9b8f7 TaskTree: Fix For loop with empty body
Ensure the For loop iterates even when the loop's body is empty.
Simplify internals a bit.

Change-Id: I4a269d61fa324a9c36109e95e74a992e915a72b0
Reviewed-by: hjk <hjk@qt.io>
2024-07-17 14:48:03 +00:00
hjk
a0c8d8c0b4 LayoutBuilder: Update manual test to latest syntax changes
Change-Id: I9bf07e4ae896df0640a81847d33514b1f488a024
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-17 14:43:38 +00:00
hjk
94a562fd8c Aggregation: Add a convenience function to create simple aggregates
Change-Id: I03300f1fcc20314d392012fd288ef0fc2501d403
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-15 14:29:18 +00:00
Eike Ziller
42a8b5b432 Merge remote-tracking branch 'origin/14.0'
Change-Id: Id00d72a8707d122b72d89ed0ecf03ad5ed8230d2
2024-07-11 12:10:59 +02: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
Jarek Kobus
9e3e3241ca tst_SubDirFileContainer: Simpify init / cleanup test case
Use For elements instead of constructing big recipes.

Change-Id: I44a01987ed02a0ccb44c31568d12c2aaeeb95f69
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 13:40:21 +00:00
Jarek Kobus
779390829c TaskTree: Introduce For element
Improve code readability by requiring iteratable Group
to be named For.

The For's c'tor requires an iterator element as a first arg.

The For's c'tor allows for passing exactly one iterator element.

It's not possible to place iterators inside Group element anymore.

Change-Id: I9dfe2c0da058abac161f66c4e336da2417c383f1
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 13:39:40 +00:00
Jarek Kobus
c9aec06723 TaskTree: Simplify Group construction in DataExchange example
Change-Id: I911f41da0f719471a324e190f4a77c0c8f58fd67
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 12:39:10 +00: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
Christian Stenger
533f03f248 SquishTests: Adapt to doc changes
Change-Id: If67606f85b45a9c787cf8cef7fc42721f0be8eaa
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2024-07-08 13:08:19 +00:00
Eike Ziller
8d99cd800b Merge remote-tracking branch 'origin/14.0'
Change-Id: Ic3c53630e16712b6493873d21485b726f0d06574
2024-07-08 10:31:06 +02:00
Christian Stenger
46f245c222 Tests: Fix building manual tests
Change-Id: Idd4f0bf1577d3ffa3b4b162c2f1ed0ae7047e35a
Reviewed-by: hjk <hjk@qt.io>
2024-07-04 09:15:36 +00:00
Jarek Kobus
ff1125319a TaskTree: Introduce successItem and errorItem
They are useful in conditional statements to influence
the workflow of a group.

Add tests for nullItem, successItem and errorItem.

Fix some comments in tests.

Change-Id: If0faa579e256d5a943d22cf66fe5208d60a63e0d
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:48 +00:00
Jarek Kobus
e5ccfeaae0 TaskTree: Add more tests for conditional API
Change-Id: I9e381d48d1ccfc86cb041e61100da6c0533c15e3
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:41 +00:00