Commit Graph

6972 Commits

Author SHA1 Message Date
Marcus Tillmanns
3462bc67be filesystem: Add QFSEngine for filepaths
Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c
Reviewed-by: hjk <hjk@qt.io>
2022-07-21 13:14:01 +00:00
Marco Bubke
a5d44fb32b Sqlite: Generalize invalid id handling
An id is now always saved as a null value and a null value is always
converted to an invalid id if you are requesting an id. It prevents
accidental conversion of null values into a id with the value of zero.
It prevent too writing of the value -1 for an id. This has two
advantages. Sqlite can optimize null values if there are only null
values following in a row. And with strict tables it is forbidden to use
a null value as a key. So there can be no accidential invalid ids
anymore in the database.

Change-Id: I5ec813f2fe8e686324eab6dd632c03d5007e093d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-21 12:41:16 +00:00
Marco Bubke
09b60ffec3 QmlDesigner: Add more tests for getting type
Task-number: QDS-7327
Change-Id: Ic99e007ef1b38582505b087c982c4d775aed5075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-21 12:41:06 +00:00
Marco Bubke
93d0b5a1d3 Sqlite: Make the statement conversion operator id aware
Before you had to use an constructor which is has an integer as
parameter. Like

struct Foo
{
  Foo{long long id} : id{id} {}
  Foo{TypeId id} : id{id} {}

  TypeId id;
}

Now you can write:

struct Foo
{
  TypeId id;
}

With C++ 20 we can even remove more contructors.

Change-Id: I374505a037a71339b672f5f3a57b06dcf443b4bf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 12:40:50 +00:00
Marco Bubke
fdcb02d5e2 Sqlite: Make bind id aware
The BasicId is moved to Sqlite so the bind can be aware of id.

Change-Id: Ia71a9c31645dab40b41958dcba0d918087b8879f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-21 12:40:34 +00:00
Marco Bubke
40d8829dd4 QmlDesigner: Add type getter to project storage
Task-number: QDS-7327
Change-Id: Ifcd15fb7a9f3c457b9bd0ed1dce428bc7033f312
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 12:40:11 +00:00
Marco Bubke
f4e8d91d09 QmlDesigner: Add default property to project storage
If there is no property with the default property name an exception is
thrown.

Tast-number: QDS-5127
Change-Id: Iea1f604d226ebc5c69e5ff6ccceab02d5677ccfc
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-07-21 12:38:28 +00:00
Thomas Hartmann
56b14c9d18 QmlDesigner: Implement support for SignalDeclarationProperty
This allows implementing a signal with a signature.
e.g. signal mySignal(int i)

Task-number: QDS-7319
Change-Id: I23cb000a218d709218322e7f31c86076d3ad949b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-20 11:01:32 +00:00
Eike Ziller
3ec87e37ee Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/todo/optionsdialog.cpp
	src/plugins/todo/todoprojectsettingswidget.cpp

Change-Id: I24ca90c2fc2cd707df901d42694df6d0e27d696d
2022-07-20 12:03:40 +02:00
Alessandro Portale
8cb1775ba8 Tracing/Qml|PerfProfiler/CtfVisualizer: Move QML modules to :/qt/qml
We don't want to dedicate the whole resource file system to QML.

Change-Id: I4c7e4af7aeeab00f44c5244e99949a90abb032cf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-20 06:53:14 +00:00
Alessandro Portale
b783d1bd2a qmljs: Fix linker issue with Qbs build
This adds Utils as dependency of the QML reformatter autotest.

Amends: fd89043de2

Change-Id: I713289b1221ea70b37ddda8073c61f4ec18850bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-07-18 10:27:59 +00:00
Marcus Tillmanns
07cb8876db deviceshell: Fix racecondition and long running tests
When writing to stdout and stderr from two processes, their output could become
interleaved. To work around that, we write stdout and stderr to different files
and later combine them together in the shell script.

Since tst_deviceshell tests could run for a long time if /usr folder
is too big, added a check that first tests the runtime once.

Since we currently only support linux containers, limit the tests to
only run if the container platform is linux as well.

Change-Id: I4b313596cdf9acc839d54d7cc77c66fd53ac23bf
Reviewed-by: hjk <hjk@qt.io>
2022-07-18 08:06:06 +00:00
Alessandro Portale
34213f5717 Tracing/QmlProfiler/PerfProfiler/CtfVisualizer: Remove pre Qt 6.2 code
- Remove code for Qt below 6.2 from c++ sources and CMakeLists.txt
- Remove Qml code from .qrc files
- Qbs: Add qt.core.resource_data Groups for Qml code
- Remove OpenGL shader .frag and .vert files
- Remove Qml import version numbers

Change-Id: I3bd1cd95381e66c98ee3af4259e89b0b1eff0709
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-18 07:11:06 +00:00
Marco Bubke
4ca769afb1 QmlDesigner: Add ProjectStorage::functionDeclarationNames
As we changed the MetaInfo interface we can return ids too but as an
intermediate step we return the sorted function names. Beware that the
sort is not matching the normal SmallString "<" operator because it is
not using size.

Task-number: QDS-7284
Change-Id: I96c6494d7c36f37d451d439be8aee35e0221f20b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-14 12:16:42 +00:00
Marco Bubke
2860e033ad QmlDesigner: Add ProjectStorage::signalDeclarationNames
As we changed the MetaInfo interface we can return ids too but as an
intermediate step we return the sorted signal names. Beware that the
sort is not matching the normal SmallString "<" operator because it is
not using size.

Task-number: QDS-7283
Change-Id: I767a4d9f589d2bb2d2e29788be90d29dbd5ac1e3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-14 12:07:08 +00:00
Marco Bubke
f6ba4bc603 QmlDesigner: Add ProjectStorage::propertyDeclaration
Returns for a property declaration id the property declaration infos. If
there are no infos a null optional is returned.

Task-number: QDS-7278
Change-Id: I4faa158008130f00f31062bab94baa7f88d70edf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-14 12:06:43 +00:00
Marco Bubke
d6d752e6ca QmlDesigner: Move PropertyDeclarationTraits
Because it is shared between different namespaces it is moved to the
parent namespace.

Change-Id: I43186bfa3b1b1d6bf95158aaf13b06e0c6bd64b5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-14 12:06:26 +00:00
Marco Bubke
f31d0f3a0a QmlDesigner: Provide ProjectStorage::localPropertyDeclarationId
Even if there is a property with that name in the prototype chain an
invalid id should be returned.

Task-nubmer: QDS-7281
Change-Id: I08611390c8e9a75036ed5d5b54d2e5637adcfd84
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-14 12:06:17 +00:00
Marco Bubke
dac7cca02b QmlDesigner: Add ProjectStorage::propertyDeclarationId
The properties has to respect overloading. So it should chose the
nearest property declaration with the requested name.

Task-number: QDS-7280
Change-Id: I13ff9cf1f9389ec6b48c6e692368ef33795b61fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-14 12:05:53 +00:00
hjk
d842862944 Utils: More porting.h related changes
Change-Id: I528a6950dfa6e09eb7f7ada265c8c41dba816bfd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-14 12:04:25 +00:00
Fawzi Mohamed
fd89043de2 qmljs: (QString -> Utils::FilePath)++
convert more QString containing paths to Utils::FilePath

Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 17:13:23 +00:00
Thomas Hartmann
aeea22257c QmlDesigner: Add support for Behaviours
A Behavior will be added as a normal ModelNode to the default
property, but we store the property name in behaviorPropertyName.

The value of behaviorPropertyName cannot be changed after the
ModelNode was created, since I do not see any use case and it keeps
things simple.

Change-Id: I69ba1d4d706432cfbbd35b001238f623e6e0b4fd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 15:33:07 +00:00
hjk
802de0eb5e Utils: Collapse most of porting,h
Taking the Qt 6 branches, leaving some dummies until downstream
adapted.

Change-Id: Ib9b86568d73c341c8f740ba497c3cbfab830d8a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-13 09:44:09 +00:00
Thomas Hartmann
7354d8a462 QmlDesigner: Fix tests
We do not allow rect as id, since it is also a QML type.

Change-Id: I348071b9b1f6c3e72d3934770196421ce72d36b5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-13 06:50:07 +00:00
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
Eike Ziller
90a03391d7 Merge remote-tracking branch 'origin/8.0'
Change-Id: I37a1f78caf9ae258c6b052efa3be15b3dbcbe164
2022-07-12 13:56:23 +02:00
Jarek Kobus
872494fc4b tst_QtcProcess: Increase the timeout
Fix recursiveCrashingProcess() flakiness.

Change-Id: I0d62368ccb5b67be691a787b6fa69717a4f024d1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-12 09:42:14 +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
c37e69ee2c Valgrind: Disable warnings
Change-Id: I76c2833828b52b24886e148ff37a07ef87a38336
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-11 09:11:29 +00:00
Jarek Kobus
d578b3a7c0 Remove manual test for QtcProcess
It's not clear what this test is going to do and
how to run it. Besides, it's not working at least
for one year already. There is not a big loss, since
it was utilizing QtcProcess::readDataFromProcess() only.

Change-Id: I821cd2755d5889ddc3f772352148d595ca1816c2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-07-11 08:35:32 +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
hjk
d3786a895b Debugger: Use some Tr::tr in WatchModel related classes
Change-Id: I1fcd0c5f342da4fd5ff52c19eb9f3f20a9bdcc5b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-07 08:52:11 +00: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
Jarek Kobus
5d3b8c4d88 tst_QtcProcess::crashAfterOneSecond(): Increase the timeout
Increase the timeout to default 30 seconds when
waiting for finished. Apparently 2 seconds were
sometimes too short. We still ensure that waitForFinished
didn't timeout but finished eariler.

Change-Id: I12ca647b45537174c7c66d271e7c8a477184f2ff
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-07-05 07:24:34 +00:00
Eike Ziller
91fb0cf123 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp

Change-Id: I5106bb632c2a3a144287097137be45b0894b9ee4
2022-07-04 08:53:22 +02:00
The Qt Project
d69cf8096d Merge "Merge remote-tracking branch 'origin/7.0' into 8.0" into 8.0 2022-07-01 13:27:55 +00:00
Eike Ziller
caed14b22d Fix pluginspec test for Windows release builds
Used a wrong name for the plugin library

Change-Id: Ic1cff07387b660a641c2f43bfb913bd8b8668c5c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-07-01 11:34:56 +00:00
Tim Jenssen
56bcad81ad Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: I7cd5d3808007ef739212f4347ba9b16e7b298943
2022-07-01 09:22:10 +00:00
Tim Jenssen
a920bbf59f qmldesigner tests: remove unnecessary defines
Change-Id: I1363e7e2ac174b51236644dd37fe184e711e96d3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-01 09:17:39 +00:00
Tim Jenssen
88080612bc tst_qml_testcore: fix spelling
Change-Id: I76345be2a8837c4371abf2f4a4695d1edebf2770
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-01 09:17:32 +00:00