Commit Graph

3221 Commits

Author SHA1 Message Date
Eike Ziller
3363d71888 Build: Fix handling of (s)ccache support
So it also works when building individual projects like cdbext

Change-Id: Ibb9cac77146a9f19cbbe22f2c7257b951f38f3fc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-17 07:30:51 +00:00
Tim Jenssen
85ea2758ac Merge remote-tracking branch 'origin/qds/dev' into 12.0
Conflicts:
	share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml
	share/qtcreator/themes/dark.creatortheme
	share/qtcreator/themes/default.creatortheme
	share/qtcreator/themes/flat-dark.creatortheme
	share/qtcreator/themes/flat-light.creatortheme
	share/qtcreator/themes/flat.creatortheme
	src/libs/utils/CMakeLists.txt
	src/plugins/CMakeLists.txt
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: Idd87c281e1aa7b7fd2702473ad55e18563cbfb21
2023-10-05 15:53:42 +02:00
Marco Bubke
a4a8fd5b81 Utils: Extend transform for container insertion
You can now return a container and it will be appended to the result
container. That has the drawback of generating temporary container but
if we get them already it makes the code much more readable than a raw
loop.

Change-Id: Ibcd38e85ef759c18cd8da0fac0185f0f6fc123e2
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 11:47:26 +00:00
hjk
0eacd0190d All: Remove some unneeded #includes
Change-Id: If9a8fb5e0b32424e3b37ecf3adefc060f86b3630
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:50:38 +00:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
Olivier De Cannière
eb5cdb4293 Revert: qmljs: add check for comparisons not depending on values
The warnings produced by these checks have always been somewhat broken.
Ever since they were added people users complained about the M325
warnings because they were confusing or because of false positives.

Fixes: QTCREATORBUG-29601
Change-Id: Ifac1ed0819a05251b3c4b583627cc45553e3d680
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-27 12:07:35 +00:00
Christian Kandeler
a217fa0c22 qbs build: Clean up testing infrastructure
- Rename ambiguously named "testsEnabled" property to "withPluginTests"
  and fix the wrong uses.
- Move AutotestRunner out of main project file and into tests.qbs.
- Move "withAutotests" property into qtc module. We cannot remove it
  from the main project file just yet, because some manual tests do not
  make use of QtcManualTest at the moment.
- Do not remove the autotests from the project tree if autotests are
  disabled. Instead, just disable the products.

Change-Id: I74a4cc717d9adbe53d37536b2565111e1617115b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-19 13:16:28 +00:00
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
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
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02: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
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
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
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
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
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
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
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
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
Jarek Kobus
8819034e04 tst_dumpers: Verify that debugger has started OK
Change-Id: Icb2c9ff2f56ac959ce3b87ff333a9f58fd146464
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-04 09:51:27 +00:00
Jarek Kobus
9680b8434e Tests: Simplify return statements
Change-Id: I9609609f0f880654b73e8930cd05818ddf9b7152
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-08-02 11:30:20 +00:00
Jarek Kobus
0bdf6f2a50 WaitForBarrierTask: Don't derive from BarrierTask
The CustomTask<Adapter> isn't really meant to be derived from.
Provide a global function instead.

Change-Id: I8cfde260e638a34fa675126f3f412faab902e94a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-08-02 10:27:41 +00:00
Jarek Kobus
47fce17aa3 Tests: Add context object into connections
Change-Id: I4bb05e5890b9b415085f17d6358d9066e3112d6d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-02 08:40:08 +00:00