Commit Graph

134 Commits

Author SHA1 Message Date
Marco Bubke
24087bd8b6 QmlDesigner: Add AsynchronousImageFactory
Task-number: QDS-5861
Change-Id: I3d938b3ddaa965da2105a326ea68f498dbb60fa0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-04 12:00:11 +00:00
Marco Bubke
d479047275 QmlDesigner: Use optional for ImageCache*
There are now matcher in google test for optional.

Change-Id: Ib3389fb0f537fd19a2930e7108483736bbba1628
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 12:00:04 +00:00
Marco Bubke
0827556621 QmlDesigner: Synchronize ProjectData to the Storage
Task-number: QDS-5644
Change-Id: Icede506974e88dd64fc866b65f4fa9d64a05aea0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 15:01:05 +00:00
Marco Bubke
56af8b905e QmlDesigner: Improve project storage update
Task-number: QDS-4920
Change-Id: If5a839a6862bab50fe3a3e049cb1214f04eeca1a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 15:00:44 +00:00
Marco Bubke
cb946ec307 QmlDesigner: Support multiple module ids per type
The type will be use source id and name instead of module id and name as
key.

Task-number: QDS-5236
Task-number: QDS-5238
Change-Id: Ibc9c298dc0a6363b630173ec4981d574cecd02ff
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:41:34 +00:00
Marco Bubke
1b16eb209c QmlDesigner: Add QmlDocumentParser and QmlTypesParser
Task-number: QDS-5174
Task-number: QDS-5228
Change-Id: I0889e8d63b0260aeb0efae1b3c8a373c18ea1f03
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 07:40:49 +00:00
Marco Bubke
9e29b602d4 QmlDesigner: Use ModuleId for Type instead of Module
We already know the module id because it's the source id of the module.

Change-Id: Ice241d38c12c7ca79a525464c53b7d552095a0fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:25 +00:00
Marco Bubke
091f157192 QmlDesigner: Adapt project storage changes in updater
Task-number: QDS-5123
Task-number: QDS-4923
Task-number: QDS-4925
Change-Id: I79acbbdb11bf7a0529c1ef005e6b5e1fd0d12aa7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-22 11:22:11 +00:00
Marco Bubke
728be60986 QmlDesigner: Change import export architecture
The new architecture should be a better abstractions for qml.
ImportedTypeNames are introduced. ModuleDependencies are now taken
over by document imports. Modules lost their version and
ExportedTypeNames gained it.

Task-number: QDS-4938
Task-number: QDS-4933
Task-number: QDS-5009
Task-number: QDS-5032
Change-Id: Ia86921c5be9107fe7d5bfd28f12bf8453769dc10
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-20 07:29:22 +00:00
Marco Bubke
13aaea197b QmlDesigner: Rename Import into Module
Task-number: QDS-4933
Change-Id: Ibc28ae731ffb27734f61eb438230fa58fe800bdc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-20 07:29:15 +00:00
Eike Ziller
0777b65db3 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	src/plugins/android/androidconfigurations.cpp

Change-Id: If8dc2cdf131811e08ca147c6f58dbb3ed3bf7227
2021-08-26 11:09:08 +02:00
Cristian Adam
54c5322322 CppTools: Code model fix for C++20, MSVC, and newer CMake versions
Starting with version 3.20 CMake adds -std:c++20, which breaks the
code model when using MSVC.

Clang-cl 12 doesn't know about -std:c++20, but clang driver knows
about -std=c++20.

Fixes: QTCREATORBUG-26146
Change-Id: I696842e11b0a9ba8849455d2f81f8dde6dd95a27
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-20 15:28:57 +00:00
Marco Bubke
4ebc0f5078 QmlDesigner: Add file status support to the project storage
Task-number: QDS-4785
Change-Id: Idaadf6992fad938e3620169a415f9d3cf7b9927f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 15:23:04 +00:00
Marco Bubke
51452d0858 QmlDesigner: Add source path watcher
The watcher is only watching directories and then searches for file
stat changes. It is compressing signals too. So if files are changes
in a very short time frame they are compressed to one change.

Task-number: QDS-4776
Change-Id: I90052a0d5dba01467b505070fb58b04ea5576294
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 12:25:19 +00:00
Marco Bubke
19a30631af QmlDesigner: Improve support for explicit type names
Explicit type name ids are now saved as negative ids into the database
so they can be distingished by that 'flag'. For types we now use imports
and not anymore import ids. The resolving of the imports are done
internally to enable atomic synchronization.

Task-number: QDS-4662
Task-number: QDS-4725
Change-Id: Ia59763ec5578baec84f3c81fa1fd35ba075b8d84
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 12:25:00 +00:00
Marco Bubke
a98d2a6770 QmlDesigner: Imports updates are source id aware
Imports are now only updated for their source id. The source id is now
used as import id too.

Task-number: QDS-4724
Change-Id: I12988e9c19746291bbc26d5c80fc7dfdd33528e9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 09:46:55 +00:00
Marco Bubke
1ba8899749 QmlDesigner: Atomic synchronize
Merging the synchronization function into one function. This is needed
to exclude inconsistent states of the database.

Task-number: QDS-4715
Change-Id: I9915726d78d81a471c0494c584f141f011714c39
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 09:46:37 +00:00
Marco Bubke
15f44db84c QmlDesigner: Support recursive aliases
So far we push changes up to aliases. But because we have recursive
aliases we have to separate different phases off the declaration and
linking. First we simply declare. Later we set the alias ids and then we
can find out the alias property types. To minimize the changes we stick
to the push model.

AliasPropertyDeclaration was merged into PropertyDeclaration so that
Sqlite::insertUpdateDelete can be called on one sequence. This prevents
inconsistent states as aliases would be changed into properties and vice
versa.

Task-number: QDS-4654
Task-number: QDS-4711
Change-Id: I8459ab07fd6b30efa19cfd4bc335286a039a511f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 09:45:50 +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
Eike Ziller
baa83725f6 Remove ClangRefactoring and ClangPchManager
This removes the plugins and tools, and removes all the tests that would
fail to build because of that.

Fixes: QTCREATORBUG-25659
Change-Id: I8adb5d503fc8eea313bcaada421f309dbbfa8c26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-15 10:07:57 +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
4a04e75a4d UnitTests: Remove indexer printer
Remove the print functions for the indexer, clangrefactoring and
all dependencies.

Task-number: QTCREATORBUG-25668
Change-Id: I15c21322cf6f6c235d4757e32180e3d8812828a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-14 11:19:19 +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
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
b2cd0c32a5 Sqlite: Open Sqlite by default in exclusive locking mode
There are no extra files for the WAL in the excusive locking mode and
it can be even faster because the logging is happening on the heap.

Change-Id: I59d75dd2aa95d802ba67c8534a5cd8ab32a343df
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:42:20 +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
David Schulz
356bfcc9fd Utils: filepathify Link
Change-Id: Ie62500bde139158e776f9698ee0ea00c2a113f93
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 17:32:18 +00:00
Eike Ziller
bf5b1d714c Revert "Revert "Merge remote-tracking branch 'origin/4.15'""
This reverts commit f0a86d4510.

Reverting a merge doesn't "undo" it - the changes would be lost
forever even with subsequent merges.
So we need to revert the revert to get the changes.

Change-Id: I65928f876f4dc886561bed17c4b2aa42b388c1e3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-05-07 09:07:40 +00:00
Marco Bubke
f0a86d4510 Revert "Merge remote-tracking branch 'origin/4.15'"
This reverts commit 888ca0dd20.

Reason for revert: wrong patchset

Change-Id: I1291789938601aaf606c59917ff938e3c24c78dd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-06 15:30:02 +00:00
Tim Jenssen
888ca0dd20 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	src/libs/sqlite/sqlitebasestatement.h
	src/plugins/qmldesigner/qmldesignerplugin.cpp

Change-Id: I0fa0a8a7feffed24c0d2bc26eca86590f1156755
2021-05-06 13:07:48 +02:00
Marco Bubke
1618937637 Sqlite: Use config.h instead of setting everything in the build files
Change-Id: Ia70a5e78475a8b8078276df03330060c8785bf90
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:49 +00:00
Eike Ziller
3d1ad9db60 Merge remote-tracking branch 'origin/4.15'
Change-Id: I1d13f3543ab4bb17f0cbfe26bbea3f154f856ca6
2021-04-20 10:42:55 +02:00
Christian Kandeler
c80c724b52 ClangCodeModel: Fix template highlighting bug
We need to take into account that the ">>" in constructs such as
std::vector<std::pair<int, int>> is only one token on the clang side.

Change-Id: I90f002ca56f236032f6d39c338593a2ff7590061
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-04-16 07:02:19 +00:00
Christian Stenger
b746a3e562 Unittest: Fix expectations
Amends 5fcd52fe83.

Change-Id: I68ce291176ab8e095b09ae6f0d64d2564e52cf0f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-18 10:49:48 +00:00
Christian Kandeler
5f5f38e028 ClangCodeModel: Support "parentheses" matching for ternary operator
That is, show which ":" belongs to which "?" when the cursor is on one
of them.

Fixes: QTCREATORBUG-1410
Change-Id: Ie19360b3dfc82d92c264d99a5aa1864eda66e5c8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-11 08:52:17 +00:00
Christian Kandeler
11d1b8bb4c Unit test: Add missing switch cases
Amends d8c1e51bfe.

Change-Id: Ida799fdf3ac8da78c892f4f6823009a33b65340b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-26 09:52:53 +00:00
Marco Bubke
7dc72c533e QmlDesigner: Improve imagecache
Instead of coding some arguments to extraId(state) we provide now a
std::variant there extra arguments can be saved. Because it's a
std::variant it can be easlily extended by new structs. There is a new
synchronous interface too. It has an extra method for QIcon which saves
icons in an extra table. It would be even nicer if we would have a
mipmap image too. So we could do it asynchonously too but so far it works
only in the main thread.

Task-number: QDS-3579
Fixes: QDS-3584
Change-Id: If368d84d82308a91a5f4f037021e749c9ef868ed
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-01-21 13:14:28 +00:00
Marco Bubke
f90bc7fa37 QmlDesigner: Improving SessionChangeSets
Task-number: QDS-2998
Change-Id: I9b559bf593dd968172649d1f6c45fb9fb454f1a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:32:39 +00:00
Marco Bubke
c3873fcf40 Sqlite: Add change set iterator
Task-number: QDS-2998
Change-Id: I7bfa8af51d9d7e6122902ee132ad51019e20afb5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-03 09:19:54 +00:00
Marco Bubke
d1b0c12d6b QmlDesigner: Add image cache
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.

Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-10-16 10:01:21 +00:00
Christian Kandeler
56de884159 unittest: Fix build
Amends 2915ee0832.

Change-Id: Iea6c76d33046e9c671a9bfb71ad752b1f2501ec4
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-13 11:23:50 +00:00
Tim Jenssen
0c6231d7ec Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Conflicts:
	src/tools/clangpchmanagerbackend/source/pchtaskqueue.h

Change-Id: Ibe8ac2fa0eafcbcc86ac445f0be035839e06ff40
2020-07-01 09:40:01 +02:00
Marco Bubke
1e6807c680 QmlDesigner: Add listmodeleditor
Task-number: QDS-2294
Change-Id: I66cae3a0d4265ab112eaf6b04e3a5972d185ff43
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 10:28:07 +00:00
Tim Jenssen
3acdb7891b Merge remote-tracking branch 'origin/qds-1.59'
Change-Id: I8891e7490a7fd51997a3b57561961f6134be3252
2020-06-11 12:54:10 +02:00
Marco Bubke
50d3067bcd UnitTests: Refactor printing
Move standard printing functions to extra header.

Change-Id: Ib032047235297dfe3ac0bcdbd39c353493f3ae0d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-10 13:34:37 +00:00