Commit Graph

8097 Commits

Author SHA1 Message Date
Marcus Tillmanns
768f12e033 Expected: Add upstream changes
Change-Id: I4fcf728200f50775c631c8a1399cd17643e3d519
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-19 12:47:50 +00:00
Christian Stenger
383cfb77cc SquishTests: Fix writing test files on Windows
Writing the text test files without encoding can end up in
ANSI encoding of the files and in turn a fail when opening
as the file is treated read only until correct encoding is
used.

Change-Id: I9e21e240b3b02011a2266dfda1f1b453c3dad457
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-19 08:59:23 +00:00
Marcus Tillmanns
f1907836fa Expected: Fix operator==(void, void)
Change-Id: I883f05155f0710fc3a9f92a2e33d4f8722159016
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-19 08:57:17 +00:00
Henning Gruendl
6d5ceadccf QmlDesigner: Improve type selection
* Disable custom item in Connection Editor type selection
* Rename Unknown to Custom

Change-Id: I9fa8c9ab6284503d5ccc61813454b9d10f291a06
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-15 11:33: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
Christian Stenger
1701172c30 SquishTests: Fix opening cascaded menus
Change-Id: Ieae5d24f60b9e67c602dbf43737ee3a712a7908c
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-14 13:27:30 +00:00
Tim Jenssen
a603b65f18 Merge remote-tracking branch 'origin/11.0' into qds/dev
Change-Id: I2bf1a2a72d9765d9b4088840414b4933644db47a
2023-09-14 12:23:01 +00:00
Eike Ziller
305a1a6ed1 CtfVisualizer: Fix computation of nesting level
The computed nesting level (which row an event to show in) was solely
based on begin+end events and "complete" events were ignored.

Compute the rows afterwards, similar to the "parent" computation that
the timeline model already does. Find the first row that is free,
and use that for the row of the item.

Change-Id: I890138c10f5038508da9b286b35d7bcfdf0ab64d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-09-12 14:28:15 +00:00
Thomas Hartmann
54b0c2d435 QmlDesigner: Add another test to ConnectionEditor
This covers field expressions with more then two members.

Change-Id: Idccfac607f72ff9aa78ed3b8da560f7d7a8e694d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2023-09-11 11:04:28 +00:00
Eike Ziller
2792166574 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ifab8b72af33de4decf20d2a879bea4dfba1e9fbe
2023-09-07 11:15:32 +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
Eike Ziller
7082d2a89b QmlJS: Delay loading of default QML type descriptions
We definitely do not need to do this during startup of Qt Creator, delay
to first use.

Change-Id: I5942b5346aedc3d6b677918ad28a6c2924d09493
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-09-06 10:52:36 +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
Jarek Kobus
6f50addc1c TaskTree: Add a test for Storage input/output
StorageIO struct serves for an input/output interface to the recipe.
This makes the recipe even more universal and reusable.

Change-Id: Ifbd27452d2838e890eadb5e72e7e7c934c4ba840
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-01 12:12:52 +00:00
Jarek Kobus
b8bd57adb7 TaskTree test: Remove unused static variable
Change-Id: Idaf2e4bc07d439f2de5a353929f7df8bd08da67f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-01 12:12:46 +00:00
Jarek Kobus
10430d36ff TaskTree: Add static asserts to onStorage{Setup,Done} handlers
Require const reference for onStorageDone() handler.

Change-Id: Iad333c04a78962a3361635900027bd4d41abc319
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-01 12:12:26 +00:00
Christian Kandeler
0a058bb657 CppEditor: Consider symbol occurrences in comments
... when renaming.
For local renaming, we consider only function parameters.

Task-number: QTCREATORBUG-12051
Change-Id: I7948d69f11b97663c9bd747ae6241a82dd9bdd82
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-01 11:42:17 +00:00
hjk
9679412a23 Replace QFile::exists by QFileInfo::exists
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.

Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-01 10:24:31 +00:00
Jarek Kobus
197a45b9b9 TaskTree: Change the signature of storage handlers
The handlers for TaskTree::onStorage{Setup,Done}(...)
took a pointer to the storage struct. Take a reference instead.
This is in line with tasks setup/done/error handlers.

Change-Id: I8ff18c250f0fbbcd8210ec304e34232e842831fc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-01 07:33:54 +00:00
Jarek Kobus
7730a329a3 TaskTree demo: Simplify task creation
Fix workflow policy.
Fix const correctness.
Rename treeRoot into recipe.

Change-Id: Ib0457691001dbb88135027f8c7a34ba671b0b082
Reviewed-by: hjk <hjk@qt.io>
2023-09-01 07:33:44 +00:00
Semih Yavuz
fd2d1ceeae Fix M16 warning restrictions
In case id is not ancestor, we cannot find that ID in m_idStack by
design. The ID of an uncle type could be either popped out or not pushed
in yet. The previous implementation, therefore, doesn't restrict M16
messages if non-ancestor ID is referred.

As a workaround, disable M16 warnings completely if the enclosing type
uses ImmediateProperties.

Amends 012f984c27

Task-number: QTCREATORBUG-28468
Change-Id: I47326e005753ff7b94057732602cfeb6dc525bbb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-30 15:54:24 +00:00
hjk
41184bc9fc Utils: Use numberedKey(Key, int) more wildly
Will ease transition to a key class that doen's have ::number()

Change-Id: Ib2f2957c916f41b0731a2033422bfbf7e429bcc8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-30 09:57:23 +00:00
Thomas Hartmann
03cb651627 QmlDesigner: Update tests for connection editor
Change-Id: I4b5e0e3cee269454089a3951e2d2d68eb162fa4b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-08-30 08:30:54 +00:00
Jarek Kobus
922da1fbb3 Process test: Prevent empty loop from being optimized out
This should fix the macOS "Run tests" on GitHub Build Bot.

Change-Id: Iae185d47fa33c97c63480b10d5a25a1d4c13f532
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>
2023-08-30 07:35:25 +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
Jarek Kobus
541719d443 TaskTree demo: Simplify task creation
Change-Id: Ia47c6599e872a7400b521ca77b109ff369bdd836
Reviewed-by: hjk <hjk@qt.io>
2023-08-28 11:38:46 +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
hjk
621a2850d0 Utils etc: More use of Key and Store
Change-Id: Idd2d70617f775d783aee93a2fe82544ad335a739
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-24 08:51:00 +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
Tim Jenßen
0f05d7adb3 cleanup QMessageBox includes
Change-Id: I358a216c48b8fbf549af38360a93a073f03e3a98
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-22 16:56:50 +00:00
Ali Kianian
f018ea6d8b QmlDesigner: Implement Connection Editor Evaluator and Parser
An AST Visitor checks the correct structure for the connection editor
Statements are parsed as the result
Javascript statements could be resurrected
Some tests are added

Task-number: QDS-10257
Task-number: QDS-10288
Change-Id: Ia6e4f9c0f48678b6610941c977b7d7bed296ced0
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-08-22 10:48:58 +00:00
David Schulz
5122d8addc Merge remote-tracking branch 'origin/11.0'
Change-Id: Idbf5f641aa9db7574cf2a4bd09adb8bcd03da894
2023-08-22 08:10:48 +02:00
Christian Kandeler
e9b3cd548c CPlusPlus: Fix crash on weird-looking construct
This was misparsed as a function with an initializer (e.g. "= default"),
and then the empty id caused trouble later on.

Fixes: QTCREATORBUG-29386
Change-Id: I85a35db544e11ad85f50e3a15b1a071b36e79cd0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-18 09:20:23 +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
Jarek Kobus
98026b29c6 TaskTree: Get rid of registration macros
Alias task types manually.
Don't require the alias to be inside the Tasking namespace.
Addresses the 22th point of the jira ticket below.

Task-number: QTCREATORBUG-28741
Change-Id: I1bdda7fe5a01e4bcb5052ec328f4e0eace878651
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 10:23:52 +00:00
Jarek Kobus
6c5f39c5d2 Valgrind: Rename valgrindrunner.{cpp,h} -> valgrindprocess.{cpp.h}
Change-Id: I17f8e55ee97567b98f2260d1a79413bd26d02314
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 08:26:36 +00:00
Jarek Kobus
1d5102781d Valgrind: Rename ValgrindRunner -> ValgrindProcess
Change-Id: I5e7d704c749e53672915c5f7aab64abb68353f24
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 08:11:28 +00:00
Jarek Kobus
2119a6c254 ValgrindRunner: Get rid of errorString()
Change-Id: I5ef4d911f0986a721855525f6b2b7645253606fe
Reviewed-by: hjk <hjk@qt.io>
2023-08-16 16:10:59 +00:00
Jarek Kobus
45246834cc ValgrindRunner: Rename finished() into done()
Add bool success arg into done signal.

Change-Id: Id39a727860e0e705513917f69ecd38e455078b5a
Reviewed-by: hjk <hjk@qt.io>
2023-08-16 15:57:37 +00:00