Commit Graph

7732 Commits

Author SHA1 Message Date
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
Tim Jenssen
91a931dd21 QmlDesigner: build it only if Qt is GREATER_EQUAL 6.4.3
Change-Id: Iccd05a7d4f4ace47fd9398bdc78584e3919ec595
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-15 18:57:48 +00:00
Marco Bubke
0f7462ad24 QmlDesigner: Fix dependency
Change-Id: Iccf3f80e9dd5c9a9dc49c363f9099352732bab60
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-15 16:14:33 +00:00
Marco Bubke
dadb9074ed UnitTests: Improve matcher
It should work for pointer and non pointer.

Change-Id: Ib80a58874282191b0cbaa576e8846f43d674ce9d
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-15 15:18:28 +00:00
hjk
123793fbb1 Utils: Add an 'If' LayoutItem
Change-Id: I700e28d03b6dc39e96fa969152f236760989bdb7
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-15 13:03:11 +00:00
Tim Jenssen
8812c1816b Merge remote-tracking branch 'origin/11.0' into qds/dev
Change-Id: I23063e42621b272bd4b04a06746955e6b5768b49
2023-08-15 12:32:47 +00:00
Marcus Tillmanns
5ae116618e Tracing: Remove useless code
runSceneGraphTest() did nothing but create an opengl context and
offscreen surface. It did nothing with the provided QSGNode.
The only thing it does is make the test fail if the opengl context
can't be created for instance on test machines without opengl.

Change-Id: I376c3565f5afcee6e123a7ef8b9832e679e645a0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-08-15 11:04:36 +00:00
Marcus Tillmanns
324e924178 Utils: Fix FilePath::isRootPath()
Change-Id: I287bae74469ba501ecb03d51f04f7aaa5f4a7268
Reviewed-by: hjk <hjk@qt.io>
2023-08-15 10:50:24 +00:00
Jarek Kobus
93c30c4586 UnixDeviceFileAccess test: Add a note about the usage of QProcess
In order to prevent any possible further conversion.

Change-Id: I0f8be7558affb36b3015144fe9c640a7bfcab295
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-15 09:06:37 +00:00
Jarek Kobus
5bce234986 Valgrind: Refactor Parser
Make it implicitly threaded.

Get rid of ThreadedParser.

Don't move QTcpSocket instances, received by
QTcpServer::nextPendingConnection(), into another thread,
as docs says it's not safe.

Use wait condition for waiting for new data.

Don't potentially leak the Parser in loadXmlLogFile():
store a unique pointer to the running parser.

Introduce Parser::setData() method and use it with
QFile device in loadXmlLogFile().

Pass QAbstractSocket into the parser instead of
QIODevice and get rid of downcasting. The QIODevice
couldn't really work with non-socket and non-file devices
(like e.g. QProcess), as it lacks general error and finished
reporting signals (it has only general readyRead() signal).

Change-Id: I9352aec694564d4d2a26898841ed964bed470d82
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 14:42:16 +00:00
Christian Kandeler
74a0313fcf CPlusPlus: Support associating comments with a declaration
This will serve as the basic building block for several comment-related
features.

Task-number: QTCREATORBUG-6934
Task-number: QTCREATORBUG-12051
Task-number: QTCREATORBUG-13877
Change-Id: Ic68587c0d7985dc731da9f539884590fcec764de
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-10 14:26:27 +00:00
Marcus Tillmanns
973f74bad3 Tests: Add NEEDS_GUI flag to add platform argument
Tests that create a QApplication need to be started with
"-platform minimal" so that they won't fail on build servers
without Display.

This also keeps them from distracting you if you run them while working.

Change-Id: I05df258b2204a3abd3cdea446d6a52f3e57a4a62
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-10 12:15:12 +00:00
Marcus Tillmanns
cb50a67521 Utils: Fix FilePath tests
Change-Id: I2751cd9393baa836715f778a9bcbc47a445c264c
Reviewed-by: hjk <hjk@qt.io>
2023-08-10 10:48:40 +00:00
Jarek Kobus
98aacfd688 Debugger tests: Bump min cpp version to 17
Change-Id: I0fa3c153d1533f7f0390134d4b046e00c0368d9d
Reviewed-by: hjk <hjk@qt.io>
2023-08-10 09:24:20 +00:00
Jarek Kobus
3970a834bc Valgrind: Replace global toolTipForFrame() with Frame::toolTip()
Change-Id: I66cc481d588c468b9388e3b3863ed35aab406fa2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-08 15:10:47 +00:00
Jarek Kobus
91f01c17f9 ValgrindRunner: Hide ThreadedParser
Expose its signals instead.

Change-Id: I0daeb2e510c30678f4f13d880bc8108510c4f32e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-08 09:23:08 +00:00