Commit Graph

16 Commits

Author SHA1 Message Date
Marco Bubke
a30775a19e QmlDesigner: Prevent prototype chains cycles
A cycle would lead to an endless loop. So we throw an exception for
synchronization. Maybe we can add later more information to user so
he can easily resolve the error.

Task-number: QDS-4457
Change-Id: I83092ccdff030a610942c155571a0bfa899e808c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-15 07:05:00 +00:00
Marco Bubke
e9407c23fa QmlDesigner: Relink prototypes
Task-number: QDS-4552
Change-Id: Ibb0d0048c114e100c215493bc9d633d4dbe3c4e0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-14 10:44:57 +00:00
Marco Bubke
32fd70ce3c QmlDesigner: Handle more corner cases for alias relinking
Synchronization should always throw an exception if it gets in an
inconsitent state.

Task-number: QDS-4551
Change-Id: I8c55198115aa79b676a13fe0cd7ab225fb6723d5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-14 10:44:52 +00:00
Marco Bubke
b1fcc4b7a0 QmlDesigner: Relink alias properties
There are still some corner cases but this will be done in follow-up
patches. The link information moved to the typenames table so only
indirections are saved in the propertyDeclarations table. Otherwise
the duplication would increase the database size too much.

Task-number: QDS-4551
Change-Id: I4aca85dd2d803b43aa9860183e500ced2d91141f
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-05 12:40:49 +00:00
Eike Ziller
d23cf2cced unittest: Fix build on macOS
We are still using our own Utils::variant and corresponding functions
on macOS.

Amends 90cc7fed3b

Change-Id: I829bdd3a4cc03f994a825ee3a962d4eb523a3bf1
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-15 10:50:13 +00:00
Marco Bubke
3112d063e8 QmlDesigner: Update alias property declarations
Alias property declaration removal is now done before the normal
property declarations are synchronized.

Task-number: QDS-4525
Change-Id: Icddf5e041b672e4abfab89540906bbfdcc1a10ba
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-14 12:08:38 +00:00
Marco Bubke
66ba9c4843 QmlDesigner: Synchronize alias properties
Alias property declarations are handled like normal property declarations
except that the have an value for the target property declaration id.
So they are distinguishable by the alias id. If it is not set it is a
normal property declaration. If it is set it is alias property
declaration. Alias property declaration are always synchronized after
all normal property declaration are synchronized. This synchronization
is not checking if the target property declaration changed. This update
has to be executed by the target property declaration.

Task-number: QDS-4524
Change-Id: I483840c821e12c93f1be67bf5ed6da396f8b45a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-14 12:08:24 +00:00
Marco Bubke
90cc7fed3b QmlDesigner: Handle implicit and explicit type names
Types are now handled by their import. Impicitly by an import list or
explicit for exported type.

Task-number: QDS-4496
Change-Id: I63f40df32760389e25b73597b4363f95ee304592
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-14 12:02:44 +00:00
Marco Bubke
d3a91cd3a7 QmlDesigner: Use import in exported types
We can remove the version from exported types because the are
implicit by the import.

Task-number: QDS-4458
Change-Id: I4a259dff5e59537b72a57d7df95256a38d036e7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:28 +00:00
Marco Bubke
f32207c930 QmlDesigner: Add importId to types
If we now try to synchrize to an inconsistent type model we get an
exception.

Task-number: QDS-4458
Change-Id: I86f7ce90d14b18227a66314fb341f5b528bdfb95
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:23 +00:00
Marco Bubke
fc0668882d QmlDesigner: Add Import Synchronization
Task-number: QDS-4460
Change-Id: Icd419baa7881fe882539f10d335ab6b3d36bc7b5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:19 +00:00
Marco Bubke
029aecef1e QmlDesigner: Synchronize type
A type should not removed but all it's fields should be reseted. This
has the advantage that if you remove a file and add it again later the
id is stable.

Change-Id: I3a1f51e14195cff2fc39681acdf7072d1a2e4616
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 14:25:09 +00:00
Marco Bubke
da267946d9 QmlDesigner: Sync project storage
Task-number: QDS-4423
Change-Id: Ia99df711effff2909b0a57ecebfb386ca51165f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:43:19 +00:00
Marco Bubke
494469641a QmlDesigner: Move source cache types to their own header
The namespace is now Cache for that types.

Task-number: QDS-4306
Change-Id: I479f1ca534455a41de9dc1d6a1fd891e1d8973eb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:37:59 +00:00
Marco Bubke
019d948552 QmlDesigner: Move project storage to projectstorage subdirectory
We save their not meta info related data. So it is better we move it
their own subdirectory.

Task-number: QDS-4304
Change-Id: Ib99419e992fced93fb245a8c48e02ee256823def
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:32:12 +00:00
Marco Bubke
e4fea9f159 QmlDesigner: Add project storage
Task-number: QDS-4252
Change-Id: Ic74e027b20bc41f3712e3ae155cddc64f8972cb0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:16:48 +00:00