Commit Graph

1467 Commits

Author SHA1 Message Date
Eike Ziller
8ca6890814 QmlDesigner: Quiet messages from find_package
The information is available via the CONDITION and FEATURE_INFO

Change-Id: I0da6338736316e5976c1addad6c25d083e7d772d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-10 08:22:42 +00:00
Marco Bubke
740e1edb98 Sqlite: Remove default constructor
Because it holds a reference it is not possible to have a default
constructor.

Change-Id: I442bedf5fb2abfd79ad64520c74636340dabf741
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-09 14:05:18 +00:00
Marco Bubke
f25413a151 QmlDesigner: Fix duplicate in .clang-format
Change-Id: I88b1a126e30894167de0e3023a957eb22b5368fb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-09 09:46:48 +00:00
Tim Jenssen
85ea2758ac Merge remote-tracking branch 'origin/qds/dev' into 12.0
Conflicts:
	share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml
	share/qtcreator/themes/dark.creatortheme
	share/qtcreator/themes/default.creatortheme
	share/qtcreator/themes/flat-dark.creatortheme
	share/qtcreator/themes/flat-light.creatortheme
	share/qtcreator/themes/flat.creatortheme
	src/libs/utils/CMakeLists.txt
	src/plugins/CMakeLists.txt
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: Idd87c281e1aa7b7fd2702473ad55e18563cbfb21
2023-10-05 15:53:42 +02:00
Marco Bubke
f12e484056 QmlDesigner: Remove typeName() usage from TextToModelMerger
Task-number: QDS-10266
Change-Id: I81a8ff71f1e3b118bf472b266d4038ab85d6d617
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-04 10:29:13 +00:00
Marco Bubke
975a282130 QmlDesigner: Ensure that indirect imports are deleted too
If we import an indirect import can be added too. So if we remove that
import we have to remove the related indirect imports too.

Change-Id: I4cb09fdc8986c473db2a8194766778956bc7069a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-04 10:28:56 +00:00
Marco Bubke
ebe1c889b7 QmlDesigner: Integrate component generation
It is only activated if the project storage is activated

Task-number: QDS-10578
Change-Id: Id93673eba470aa37a249072b3ef9e0231499095a
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-04 10:28:35 +00:00
Marco Bubke
1177bb4b1f QmlDesigner: Add PropertyComponentGenerator
Task-number: QDS-10578
Change-Id: I2c20f5aaa6ebfe7736012a02d4c4596589007866
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-02 20:22:10 +00:00
Marco Bubke
3a0eff9e79 QmlDesigner: Add mechanism to refresh meta infos
Change-Id: I894d26387afb32ccf1b8623976f7e6d9b19c0d80
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>
2023-10-02 20:19:22 +00:00
Marco Bubke
8c4f3d4970 QmlDesigner: Fix missing updatedProjectSourceIds
Otherwise we get constraint errors in the project storage later because
we try to insert a entry instead of updating it.

Change-Id: I25941a30c6d35e189153e49d5092e85ae0c7e683
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-02 17:11:32 +00:00
Ali Kianian
db2682a5d2 QmlDesigner: Add google tests for the Lowest Common Ancestor Function
Change-Id: I7a0b0c2cfe8861d1d5387ebd7d79ba31ac2f1ed6
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-27 06:50:20 +00:00
Burak Hancerli
794cb89c2a QmlProject: Fix skipping some nodes with QDS prefix
This patch also contains the test data and updated test code for the
converters to test QDS prefixed version of .qmlproject file.

Task-number: QDS-10503
Change-Id: I496ba6f3d4d3cf90e75c2959c4196f4607677ea1
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-09-25 12:35:49 +00:00
Tim Jenssen
da63a14481 Revert "Tests: Fix cmake build"
This reverts commit a263d3de89.

Reason for revert: QmlDesigner dependency was wrong

Change-Id: I2b67861ab81720649394045b68e2476bb51dd333
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-15 09:25:12 +00:00
Tim Jenssen
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02:00
Marco Bubke
37c0737844 UnitTest: Fix or disable some flacky tests
If we get better tools we can come back and look again into it.

Change-Id: I8ded8f9831b0c46c09e15d283a6298ad09aaaeb6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-06 16:38:26 +00:00
Marco Bubke
250b2cd7bd Sqlite: Introduce implicit transaction
Sqlite adds an implicit transaction if no transaction is used. That can
be problematic if you use multiple statements but it is okay for one
read statement.

Write and read write statements should use immediate transactions
because the acquire the write lock. Otherwise the write lock is only
acquired as you try to write. From there it is much harder to recover.

Change-Id: I04b0be7447f2b82b6921738d789c33cbbaa8de6e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-06 10:28:43 +00:00
Miikka Heikkinen
6251730f8f QmlDesigner: Refactor 3D view background and grid color implementation
The new implementation doesn't require these colors to be stored in
external dependencies anymore, as auxiliary properties are used for
them instead.

Fixes: QDS-10496
Change-Id: Ie71408617259d1af73a45f327d4bdfa4f2fa3a2b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-05 08:49:34 +00:00
Marco Bubke
a55efac890 Sqlite: Extent Statement::values for other container
You can now use QList and QVarLenghtArray for values. The later is quite
interesting because it is not allocating for a provided capacity.

So you can now write:

statement.valuesWithTransaction<QVarLenghtArray<int, 1024>>();

And in almost all case no expensive memory is allocated. With the help
of NRVO there should be no copy too.

That is very useful for temporary values which are transformed into a
different type.

The capacity changed to an template parameter too:

statement.valuesWithTransaction<int, 1024>();

That is more clear than before:

statement.valuesWithTransaction<int>(1024);

Change-Id: I6d8d10ed9db0cc37f0579353a416e36e23c30415
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-28 16:17:40 +00:00
Marco Bubke
9462c7a3e9 QmlDesigner: Add task queue
To share the code TaskQueue is introduced. The Thread and the
synchronization code is moved into TaskQueue. Only a dispatch and cean
must be implemented in the callback.

Change-Id: I19c85c891ef700aae85b54630714555e862200a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-08-28 16:17:18 +00:00
Marco Bubke
b2fff59b8c QmlDesigner: Timeout thread
The thread will be stopped after 10min. And then started if needed.

Change-Id: I66f64081353fa4f24c7927139d1676ee8de85679
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-28 16:16:25 +00:00
Burak Hancerli
c71ebda677 QmlProject: Fix incorrect conversion of MCU property
Task-number: QDS-10376
Change-Id: Ic16d03355419281a0bf5c8bd04ba5fea317a70d4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-08-24 15:43:23 +00:00
Marco Bubke
76a798992a UnitTests: Merge MockListModelEditorView into AbstractViewMock
It was an AbstractView mock too.

Change-Id: Ida971a3468df1b14b1f8bd900817ff9fe74e0767
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-08-24 08:55:34 +00:00
Marco Bubke
1be5475f62 QmlDesgner: Add inflate property functions
Sometimes we want to have the dot properties instead of the
value(readonly) properties.

CompoundPropertyMetaInfos inflateValueProperties(PropertyMetaInfos
properties);
CompoundPropertyMetaInfos
inflateValueAndReadOnlyProperties(PropertyMetaInfos properties);

are removing the value proeprties and adding the dot properties if the
property type has properties.

Task-number: QDS-10472
Change-Id: Ia2291f77f1b38bbe62d71319bfa28cf545cbef18
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>
2023-08-24 08:54:08 +00:00
Marco Bubke
1bdbe55c28 QmlDesigner: Add NodeMetaInfo::property dot getter support
Dot and dotdot properties can be gotten but three dots or more are not
supported.

Task-number: QDS-10472
Change-Id: I5e05405cd8ce80bc321dd78b2f74158832fed0bb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-24 08:53:26 +00:00
Marco Bubke
7d948b26d7 QmlDesigner: Support dot properties in NodeMetaInfo::hasProperty
Dot and dotdot properties are supported but not three or more dot
properties.

Task-number: QDS-10472
Change-Id: Ib5e40bfca470fe7520c9caacf0f469892bb73f7c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-08-24 08:50:18 +00:00
Marco Bubke
681468051f QmlDesigner: Add type to NodeMetaInfo
If the project storage works we can access if a type is a value,
reference, sequence or non of the above.

We can even test of values has properties like QFont etc.. That is
removing quite some heuristic code.

Change-Id: Ie3447d99931c6784db178e4b48f7d2f9a4f646fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-08-24 08:49:58 +00:00
Marco Bubke
7f9d3b302f QmlDesigner: Add path for property editor in project storage
A simple store for editor path in the project storage. So we can inquire
the path for every type. The storage is synchronized per directory. So
only entries with the updated directory id are affected.

Task-number: QDS-10391
Change-Id: Ic4d0ce17eedd374ade56abd7cab08f2b7a9830c6
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-24 08:49:31 +00:00
Marco Bubke
90fea3ebd6 QmlDesigner: Collect panes and specifics in updater
The update is walking a path which is provided by the
QmlDesignerProjectManager paths which ends to Pane.qml or Specifics.qml.
From that paths the module and type name is extracted. That data is
synchronized with the ProjectStorage. If no directory was changed it
will skip that directory. It will to collect the directory id to update
the storage per directory.

Task-number: QDS-10390
Change-Id: I3aaf5528133cf5e5c15f38a9720fbbf540d24eca
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>
2023-08-24 08:49:03 +00:00
Marco Bubke
ddde6b1ea5 UnitTests: Silence padding warning in tests
It is not very useful here and adds a warning for every test.

Change-Id: Iaf75385f90ebbe3d0ac9a306328ba56c489ea6cf
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-08-23 21:53:08 +00:00
Marco Bubke
9074fb28e2 QmlDesigner: Cpp module id can be invalid for qml documents
Qml documents have no cpp module id.

Change-Id: Ib0f9f23473e3f0f680784416e30365f7be51866b
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>
2023-08-17 11:56:50 +00:00
Tim Jenssen
91a931dd21 QmlDesigner: build it only if Qt is GREATER_EQUAL 6.4.3
Change-Id: Iccd05a7d4f4ace47fd9398bdc78584e3919ec595
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-15 18:57:48 +00:00
Marco Bubke
0f7462ad24 QmlDesigner: Fix dependency
Change-Id: Iccf3f80e9dd5c9a9dc49c363f9099352732bab60
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-15 16:14:33 +00:00
Marco Bubke
dadb9074ed UnitTests: Improve matcher
It should work for pointer and non pointer.

Change-Id: Ib80a58874282191b0cbaa576e8846f43d674ce9d
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>
2023-08-15 15:18:28 +00:00
Jonas Karlsson
404bf9547f Update QtQuick3D.Physics.Helpers qmldir
Task-number: QTBUG-115539
Change-Id: I6d44ebe64dd32d1f2c1575ce4cbc84c01d3588f7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-02 00:45:57 +00:00
Marco Bubke
d59d27e16b QmlDesigner: Add property meta info tests
The cast function is now returning an invalid variant if the meta info
is invalid. It is too not anymore converting the value magically.

Task-number: QDS-10290
Change-Id: I125aab9ac46c9ac0605364ede32fb1a10d20cd89
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-07-26 08:57:35 +00:00
Christian Stenger
a263d3de89 Tests: Fix cmake build
Change-Id: I1e42c0361aa92b54e52ba2c29f26f3f3f600e898
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-07-24 06:26:25 +00:00
Tim Jenssen
7df557c0ba Merge remote-tracking branch 'origin/qds/dev'
Conflicts: tests/unit/tests/printers/gtest-creator-printing.cpp

Change-Id: I5f791161ca1a2966e98a3ca55bc60e5bcbb8f58f
2023-07-21 10:20:45 +00:00
Marco Bubke
3d7f1a0f7f UnitTests: Optimize example string generation
Change-Id: I9cc17269812dd9a61b192598f947e2754673c96e
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-07-21 10:07:19 +00:00
Marco Bubke
21983a8377 Utils: Fix SmallString::append(QStringView string)
It used the size of the destination string but it had to use the size of
the appended string to inquire the maximum required size.

Change-Id: I1c910abab0ac60ed5fec1b3dc3a358e438532281
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-07-20 10:30:25 +00:00
Marco Bubke
e46eb57543 UnitTests: Add more matcher
The IsEmpty and IsNull matcher have been extended to be more generic.
QVaraint matcher have been added.

Task-number: QDS-10290
Change-Id: I34fcb0571190dd37e7706587ee617e1301f9f841
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-07-19 13:17:44 +00:00
Marco Bubke
90b0fd2869 UnitTests: Fix warning
Change-Id: I834095e1e8f40cb063b6014e98bf79ae8d8e439b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-07-18 15:12:22 +00:00
Marco Bubke
2322313baf QmlDesigner: Remove typeName usage in binding editor
Task-number: QDS-10266
Change-Id: I91232c1296c4ed3b3148af9053d3db0f43a08e24
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-07-18 09:00:14 +00:00
Marco Bubke
3d5ceb795d QmlDesigner: NodeMetaInfo can now get exported type names
You can get all exported names. That can the C++ names too for C++
types. If you only want the types name which are imported in a document
you can provide the source id for the document and get only that. If
there are different version exports you get them too.

Task-number: QDS-10274
Change-Id: Iefc0b68ebfd65998cf0481961f8c7643cdf9e5b9
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-07-17 09:36:58 +00:00
Marco Bubke
f7f65b9ea4 QmlDesigner: Get exported type names for type id and source id
It is matching the document imports with the exported type names.

Task-number: DS-10265
Change-Id: I0623cd0b3d04fa1a8c05354a194f10f3d8948b21
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-07-17 09:36:49 +00:00
Marco Bubke
e7bc9846d1 QmlDesigner: Add exportedTypeNames(TypeId) to project storage
Task-number: QDS-10265
Change-Id: If440f87b6719b865216e3890c8492c3682cf42dd
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-07-17 09:36:39 +00:00
hjk
9f72b0519f Unittest: Work around warning for unused parameter
Amends 7fada70e8f.

Change-Id: Ic47526a497c67dab48903b6500a37bab742034fd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-07-17 09:23:38 +00:00
Marco Bubke
e7a7914aa8 QmlDesigner: Fix skip auto moc
Actually the syntax was wrong.

You can use

SKIP_AUTOMOC foo.cpp

or

PROPERTIES SKIP_AUTOMOC ON

SKIP_AUTOGEN is skipping AUTOUIC and AUTORCC too.

Change-Id: Id4afdc2572fc287ae66368ba0fd70b3ce7fc04ba
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2023-07-12 07:15:50 +00:00
Marco Bubke
98cff9e097 QmlDesigner: More test for NodeMetaInfo
Task-number: QDS-10055
Change-Id: I23a9d7ea87dff9f3e07f5beeb734cea7d01d2e94
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-07-12 07:13:39 +00:00
Marco Bubke
8ab4968278 QmlDesigner: Introduce origin flags
metaInfo.isProjectComponent() is signaling if a file component is
directly part of the project. metaInfo.isInProjectModule() otherwise
shows if a type is inside of the project as a qmldir module. Both cannot
be true. If a type is not part of either it is a system type.

Task-number: QDS-10251
Change-Id: Iae2270827a500ad6393e3751b3af276f9b030679
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-07-11 15:42:48 +00:00
Marco Bubke
a3f990d713 QmlDesigner: Add type lookup
Task-number: QDS-10246
Change-Id: I607f72e29734a3c59b7b5b33d96735d708cd18ec
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-07-11 15:42:06 +00:00