Commit Graph

1426 Commits

Author SHA1 Message Date
Marco Bubke
5c4a5126d6 QmlDesigner: Move synchronization types into extra namespace
Change-Id: I4f0574fcdcd5df4c0122028d1b032e910a9e28b6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-12 19:53:14 +00:00
Marco Bubke
e6617f520c QmlDesigner: Provide local propertries
It returns all local propeties in a sorted order.

Task-number: QDS-7276
Change-Id: I030d63b64e66b0c06b33904e5b157ed8aa060ae5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-12 19:53:08 +00:00
Marco Bubke
e7a013cbfc QmlDesiger: ProjectStorage provides properties for typeId
It returns all properties of the type and the prototype chain in a
sorted order.

Task-nubmer: QDS-7276
Change-Id: I95c16abd16d9d0f1fdf68d3425780a888dc056b7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-12 19:53:01 +00:00
Tim Jenssen
b888c67f0c qmldom: resolve missing dependency if WITH_QMLDOM is enabled
Task-number: QDS-7257
Change-Id: I51045a40108865174491dc55fa1536399b309bd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-07-12 12:58:27 +00:00
Marco Bubke
1e6c8f6e61 UnitTests: Update google test to 12.1
It fixes a warning.

Change-Id: I2a0ab042898d7333b0ce954d0299ea520a933939
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-11 09:28:38 +00:00
Marco Bubke
02d05f76d9 QmlDesigner: Explicit instantiation of ProjectStorage
Change-Id: If56a3b7f8189c998a6335a31ecca8a82cb269604
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-11 09:28:02 +00:00
Marco Bubke
dc32c6028c QmlDesigner: Add getter for type id
The type id getter expects a valid module id, an exported name and
optionally a version.

Tsk-number: QDS-7271
Change-Id: I9af5f926b97606fc312eb1158367aba7105cdefb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-11 09:24:12 +00:00
Marco Bubke
180bcbef8a Sqlite: Fix locking
Change-Id: I32a1435db21f6d891dd9bed4faada704aeaf43af
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-07 17:50:55 +00:00
Marco Bubke
936ae86598 QmlDesigner: Add ImageCacheDispatchCollector
Instead of creating a new cache for every collector we now use a
collector dispatcher which is dispatching the request to different
collectors.

Tsk-number: QDS-7258
Change-Id: I024622d4b757e1ff10f7cab4204d1742ef5926da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-07 17:50:06 +00:00
Marco Bubke
8fbd703974 Utils: Add endsWith to SmallStringView
Change-Id: Iea8286b46c28a68b26904e256b9f084c32c79909
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-07 17:49:34 +00:00
Marco Bubke
fe50af151d QmlDesigner: Simply property type name check
Move some repetitive pattern to PropertyMetaInfo

Change-Id: Iba8722d3d95881c1db85c12cbc2b2b8c4b629f2c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-07 17:48:23 +00:00
Eike Ziller
f950a5d86c Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/libs/utils/terminalprocess.cpp
	tests/auto/qml/qmldesigner/coretests/CMakeLists.txt

Change-Id: Ifc5b37dadd46af752f0771a2685da1ac9a6260bd
2022-07-07 13:47:12 +02:00
Marco Bubke
fd41105191 QmlDesigner: Introduction of PropertyMetaInfo
Because the project storage is integer id based the string based API
isn't fitting well for the new approach. PropertyMetaInfo can be easier
mapped to the project storage.

Task-number: QDS-7197
Change-Id: I49bc650abdaacf4b039d76c2514b5ad05ec84abe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-06 12:40:58 +00:00
Eike Ziller
d059a610b1 COIN: Arm auto tests
Some of our auto tests fail, so add an EXCLUDE_FROM_PRECHECK option for
add_qtc_test, which sets a corresponding label on the ctest, and exclude
these when running ctest on COIN.

Disable the Googletest based unittests for now, they are inconsistently
failing on CI, e.g. sometimes timing out after 60 seconds for tests that
usually take only a fraction of a second.

tst_perfdata from the perfparser submodule also fails. Temporarily
disable it explicitly, until the EXCLUDE_FROM_PRECHECK change can be
merged there.

Change-Id: I7e9d7aded75bbe8800f82f7aa125c181271a2a1f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-05 10:13:18 +00:00
Christian Stenger
6b32f58225 QmlDesigner: Fix qbs build
Change-Id: Ie83a9e67f63aa2424423710140c65b4bec6770bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-28 10:20:19 +00:00
Eike Ziller
c7b724c4ca Merge remote-tracking branch 'origin/8.0'
Change-Id: Ia1c97d5949de607177a5a0632c7e8a37cbfd3475
2022-06-27 10:33:44 +02:00
Christian Kandeler
e2b99e6b31 Unit test: Remove libclang test remains
Change-Id: Ifa2cd2727ecf80d3b29dc2bc2a10af11baa2f1dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 11:01:01 +00:00
Christian Kandeler
224be9add8 ClangTools: Move over a test from unittest
Change-Id: Id61a0bdb8e46ead4de8ad0298e62afb7b9fbcfb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 10:05:54 +00:00
Christian Kandeler
67a08683d1 ClangCodeModel: Move a test over from unittest
Change-Id: Iac295216fff274fbe4a109477b1a4c2bd2c98d5d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-23 13:54:14 +00:00
Christian Kandeler
7dfbe785e9 Unit test: Remove unused files
Change-Id: Ia8d8f2014f8180d5c5fa89538d5aa7fc8821bc28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-23 13:43:58 +00:00
Marco Bubke
d87d493de2 Sqlite: Only declare the defines for the sqlite files
Change-Id: Ic5a7be63c86cf3f369309fc4d21cf6f5ceefb098
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-23 10:33:20 +00:00
Marco Bubke
9d99e900b4 Fix warnings
Change-Id: I49dc38853df77bcc4d72c64132700c6059fbd5d7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-23 10:33:09 +00:00
Marco Bubke
220267638f UnitTests: Use Sqlite library
Because the unit tests are not self contained anymore we can use the
Sqlite library from the creator build.

Change-Id: I89dde09e6fcfb8dda002b6e2bf11528a0933cde7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-23 10:33:05 +00:00
Tim Jenssen
c4e94c2c9c Merge remote-tracking branch 'origin/qmlprojectstorage'
Conflicts:
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlproject.h

Change-Id: I0c0d59c8e3b8455b6ac575d34fdf49f39388db7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-21 10:47:34 +00:00
Marco Bubke
c4e6a6948e UnitTests: Add Qt 6.2 condition
Change-Id: I8b75355390b94a27a98cf8685b7f38217e6a186c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-06-20 16:51:06 +00:00
Christian Kandeler
9a411245d3 qbs build: Require Qt 6.2 for QmlDesigner
As in the cmake build.

Change-Id: Iedd7032093682e7cf6f423909724201f6c5840d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 10:09:09 +00:00
Christian Kandeler
01ceb3a3cb ClangCodeModel: Switch to LSP-based UI header approach
Generating ui headers in a well-known path and then including that one
in the compilation database does not work in the presence of multiple ui
files with the same name.
As it turns out, we don't have to generate any files at all; instead, we
pass the file contents directly to clangd, which then uses them when
parsing includes of the respective header.
User-visible behavior change apart from the abovementioned bug fix:
Tooltips and "follow symbol" on the include directive now always use the
actual location of the header provided by the build system.

Fixes: QTCREATORBUG-27584
Change-Id: I6b13e12cb3a365199567b0bc824d12b373117697
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-02 11:29:14 +00:00
Cristian Adam
ee98c98676 CMake: Remove libclang references
Now that libclang is no longer used, make sure that all references
to libclang are gone.

Change-Id: I4b66eff992b22adb6a9c25d34053f2b36079583c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-24 14:57:22 +00:00
Christian Kandeler
e79c432291 Remove clangsupport library
Change-Id: I18455fc451b6e1b73c7183f6c75820379e26951a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-09 08:22:45 +00:00
Christian Kandeler
5f9cbe7fe8 Remove clangbackend
Change-Id: I5f4f9a2fc5469c4eeb112a46626791ffb9a57a85
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-04 10:04:17 +00:00
Christian Kandeler
4b0b3e9e35 ClangCodeModel: Move fix-it tests into plugin
Change-Id: If53df602a42d8c1ffde5db6c8cb1e7fc269bb272
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-04 10:03:47 +00:00
Christian Kandeler
6da7babc4a ClangCodeModel: Remove libclang-based completion and function hints
Change-Id: I742fb14b1aba3ba1f35a5c80bf553d2a735cac48
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 10:31:05 +00:00
Christian Kandeler
b52fac7148 ClangCodeModel: Remove libclang-based diagnostics and highlighting
Change-Id: Ib7c423884b76c27a6350ddea611919d3352fb80e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 07:51:51 +00:00
Christian Stenger
2e725b4869 Fix qbs build
Amends 88781a003f.

Change-Id: I5b44d89cc1b536d0d533cd29fc3a06005a7c80d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-29 10:15:21 +00:00
Cristian Adam
88781a003f CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.

Fixes some symbol clashes when all plugins are linked into the same
executable.

Support for actually loading static plugins will be added in a separate
commit.

The feature is controlled by QTC_STATIC_BUILD which by default is OFF.

Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-29 07:16:53 +00:00
Christian Stenger
eccbc0fbcc Qbs: Factor out gtest dependency check
..to make it re-usable.

Change-Id: I7653ee7b3ced5fb9d2b7262aecdab12438628928
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-22 05:33:10 +00:00
Eike Ziller
1221552377 Require CMake 3.16 and remove workarounds
CMake 3.16 is available on the major Linux distributions nowadays,
so we can get rid of some workarounds.

Change-Id: I32500375748f33c3e40fbd7a08824d823f817a8f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-02 08:55:31 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
Christian Kandeler
ead181e385 ClangFormat: Move tests into plugin
That's where they belong

Change-Id: I78e33e76a2f42f05961f6fab31da5f3dd583a2e9
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 10:27:13 +00:00
Marco Bubke
704f239b55 Sqlite: Update to 37.2
Change-Id: I43087c35249af1abee5a2172f29dc998c7babd0d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-01-19 12:14:54 +00:00
Marco Bubke
68ac61193c QmlDesigner: Refresh preview image every hour
It is to assumed that the preview image will be changed and we don't need
to collect the time stamps of the files.

Task-number: QDS-5924
Change-Id: Icf5540d7bcc9da17a1497641f6189f35eb47f5d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-12 16:27:08 +00:00
Marco Bubke
7ce13691ff QmlDesigner: Remove generator from AsynchronousImageFactory
The generator was introduced to decouple the generation thread from the
fetch thread. But for the factory you only generate the image so you
can use the factory thread for the collector.

Change-Id: If569defba0c52dd85b19451a78f0daf5043b4d01
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-12 16:26:43 +00:00
Marco Bubke
3d0d9e8e0c QmlDesigner: Don't save null image for preview collector
Change-Id: I01ad1c12c25a734107b359461508c037a2f23bb2
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>
2022-01-12 16:26:31 +00:00
Eike Ziller
80e0cb56ec Fix build with macOS deployment target < 10.14
As is used for the Qt 5 based prebuilt binaries.
std::optional is only fully supported out of the box since
10.14.

Change-Id: Ide8bd9ac8b66b05e1bb6e9b350edf3e7ffdaf97e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-10 10:28:11 +00:00
Marco Bubke
3cf01fbf07 QmlDesigner: AsynchronousImageFactory generates if the image is null
If the image is update but null we still generate a new image. This
is a ugly workaround for the flaky generation process. Hopefully
we can fix it after all hidden dependencies are removed.

Change-Id: I0e344002a1952fb849393d3e245e31612c69d7bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 22:09:39 +00:00
Marco Bubke
b2e1bcc4e5 QmlDesigner: Add fetchHasImage to ImageCacheStorage
Change-Id: Ieb148abb02527bb84eda4f00af85a66d98731f03
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 14:36:19 +00:00
Eike Ziller
1df8dd3c93 Revert "Revert "Use QtcProcess for clangbackend""
This reverts commit d65e47b5c6.
Reverts the quickfix for the performance regression of code completion.
Followed by a minimal fix.

Task-number: QTCREATORBUG-26829
Change-Id: I1afe71c24ee94caadd4fa849c29f6fc030fb1a8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-06 14:34:35 +00:00
Cristian Adam
ec07bf8f7c Revert "UnitTests: Disable some ClientServerOutsideProcess tests"
This reverts commit c22c22c3d6.

Reason for revert: With d65e47b5c6 the tests are passing.

Change-Id: Ide9c12e38c229315364489123f687b50632ffed8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-01-04 18:58:05 +00:00
Cristian Adam
d65e47b5c6 Revert "Use QtcProcess for clangbackend"
This reverts commit 8724a4efbb.

The above commit made code completion 3-4x slower on Windows, and
8x slower on macOS.

Fixes: QTCREATORBUG-26754
Change-Id: I02424a40e10de2baf3fd01f19f9094c8e82f684a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-04 18:01:57 +00:00
Marco Bubke
3e585483c9 QmlDesigner: Check if callback is not null
The AsynchronousImageFactory is not interested in any callback. So it
is providing null callbacks. If they are called there will be a crash.

Change-Id: I252301e4289185e50720849a7cb148d8f1da3e7d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-04 17:38:17 +00:00