Commit Graph

8097 Commits

Author SHA1 Message Date
hjk
f97fd83fc9 Plugins: Add skeleton for new ExtensionManager plugin
This initial commit is merely a mockup of a ExtensionManager concept.

Change-Id: I19b2285667678a86097c043cc27a554545559eff
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-12-11 12:10:36 +00:00
Artem Sokolovskii
62ea85ee6a SyntaxHighlighter: Move SyntaxHighlighter to separate thread
This change involves the relocation of SyntaxHighlighter processing
to another thread. The core idea is to create a duplicate of the
original TextDocument using SyntaxHighlighterRunnerPrivate::cloneDocument.
A new SyntaxHighlighter is then instantiated by SyntaxHighLighterCreator
for the cloned document. The entire SyntaxHighLighterCreator class is
moved to a new thread, where it performs highlighting on the cloned
document. Upon completion of the highlighting process, the resultsReady
signal is emitted, and the updated highlighting data is applied to the
original document.

This shift of SyntaxHighlighter to another thread enhances the user
experience by preventing UI slowdowns during the highlighting process.

- Introduction of BaseSyntaxHighlighterRunner as an interface class for
future *SyntaxHighlighterRunner.
- Inclusion of DirectSyntaxHighlighterRunner class for performing
highlighting in the main thread, suitable for syntax highlighters
that cannot be moved to another thread.
- Introduction of ThreadedSyntaxHighlighterRunner class for highlighting
in a separate thread, preventing UI blocking during the process.
- Addition of Result data to the SyntaxHighlighter class to facilitate
data exchange between threads.

Task-number: QTCREATORBUG-28727
Change-Id: I4b6a38d15f5ec9b8828055d38d2a0c6f21a657b4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-12-11 09:55:02 +00:00
Eike Ziller
57d4ea4dcc Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/designer/formeditor.cpp
	src/plugins/git/gitplugin.cpp

Change-Id: I554a844fab4c55249a00f394f9ba174c7548dbbe
2023-12-11 09:28:21 +01:00
Alessandro Portale
608bb8cf3d Utils: Add StyleHelper::fontToCssProperties
This function takes a QFont and returns the relevant CSS properties as a
string. Using that CSS string in Qt's HTML supporting widgets ensures
the true to detail HTML rendering of text elements with those CSS
properties.

This change also adds an HTML sample to tst_manual_widgets_uifonts.

Change-Id: I7caf3214854f6ee62ae1211015572c640fc08dc8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-12-08 09:10:50 +00:00
Alessandro Portale
723ba0fc48 Utils: Add a manual test for StyleHelper::uiFont
Visualizes the predefined ui fonts.

Change-Id: Ic0af15ab149b213a59bf8e22cf7e17ab9042c54e
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-07 15:22:54 +00:00
Cristian Adam
6caf0f0d59 Testsleep: Fix CMake configuration error when test is disabled
If the user has a minimal configuration and the test is not enabled the
call to set_target_properties will fail because the target does not
exist.

Change-Id: I084c53e8d78d92547c1592edc0a19f48d4e76327
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-12-07 11:22:05 +00:00
Jarek Kobus
a737ddd931 Process: Use GeneralProcessBlockingImpl for QProcess implementation
This should fix the Process::waitForReadyRead() when the data
appeared on stdErr channel and not on stdOut channel.

Amends ec722b9132

Change-Id: Ib9f361f4d1602487bdbbb735e55d0ad24fb5e4c3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-07 10:47:59 +00:00
Jarek Kobus
db4486e915 Process: Add a test for waitForReadyRead on error channel
Currently it works only in case of ProcessLaucher implementation.
The issue with QProcess implementation is that we need to
select the active channel in advance with QProcess::setReadChannel(),
what really doesn't make sense, since we can't predict on which
channel we will receive the data.

Currently we don't have setReadChannel() method inside Process API.

Change-Id: I23592e37f2ed5e3326bead445a9c6c6500d0e615
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-12-07 10:47:50 +00:00
Jarek Kobus
2304dbb395 Process: Make multiRead test platform independent
Change-Id: Ife58e7b2a41ac35f8137acfc66ff827672f75de9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-07 10:47:45 +00:00
Jarek Kobus
1ea1ea7747 Process: Add a test for reading the errorChannel
Change-Id: I3b1d35c8ef2be91ddd1591a0fa2dafedc268f916
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-12-07 10:47:39 +00:00
Robert Löhning
f52c92bfe5 SquishTests: Update tst_openqt_creator
Task-number: QTCREATORBUG-29923
Change-Id: I59ccfca431ab4a0d7d5bb8be78c078e2e5d58825
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-07 07:52:58 +00:00
Eike Ziller
2e280e1c50 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/clangcodemodel/clangdfollowsymbol.cpp
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: I45b7fee1a1d784c44f2139fb1ede69190d23d6fd
2023-12-06 16:50:15 +01:00
Robert Löhning
5c1b8dee32 SquishTests: Simplify and stabilize special handling of Mac menus
- Check condition only once
- Make sure correct length is being used

Change-Id: I8c9627d91b4f022d60bae039c0478248cc30d183
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-06 07:35:12 +00:00
Robert Löhning
c0d1975ff9 SquishTests: Fix fetching Jira status
Change-Id: If01b08673f88588eee9370488a429a6f633d93db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-04 17:49:18 +00:00
Marcus Tillmanns
0e59c9e4e1 Utils: Add "findOr(..., nullopt, ...)" function
findOr(nullopt) returns either a value or a std::nullopt for the first entry
in a container where the predicate returned true.

This makes it easy to write constructs like:

if (auto found = Utils::findOr(container, std::nullopt, [](auto){ ... condition ...}) {
...
}

Change-Id: I6f8f0f9c0d8486c32395123d8c2dcba427887189
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-04 10:24:17 +00:00
Robert Löhning
b757ca9f7a SquishTests: Update expected tree for tst_cmake_speedcrunch
Change-Id: I13df997c6b265ba8795c7f1f3024c5deef5e2cad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-30 09:25:52 +00:00
Christian Stenger
a149c52e99 SquishTests: Start expecting Python kits
Python kits will be new in QC13. Do not let the squish tests
fail in case it stumbles over one.

Change-Id: Ic0af56f49321f6d5800d11398d2e73b21c25e51a
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-11-29 08:23:40 +00:00
David Schulz
48a77b5b09 Revert "Aggregation: Fix crash when components are in parent-child relationship"
This reverts commit 12428bf1d6 because it triggers a qassert
in QObject::setParent when the object is a widget.

Change-Id: Ib9b76192f548cd3201fcb78a19ea88ccb5782ba2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-29 05:20:19 +00:00
Eike Ziller
12428bf1d6 Aggregation: Fix crash when components are in parent-child relationship
and the child is deleted first.

Change-Id: Idea3b4a3410bda99a8727551e2cbeab3a7b95d85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-28 12:00:08 +00:00
Jarek Kobus
9c5831dc80 TaskTree demo: Tweak the done result instead of nesting a Group
Tweak the return value of the TimeoutTask instead of nesting
a Group with conditional workflow policy.

Rename TaskWidget::isSuccess() into desiredResult().

Change-Id: I3d6f703427f13e8feb6d6db97c07b8b9f8b261a6
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 08:27:17 +00:00
Jarek Kobus
ce80a6dad5 TaskTree: Rename TreeStorage<> -> Storage<>
This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I696beda87430fbe637abba8054012fb77516e220
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 08:25:50 +00:00
Jarek Kobus
767bb30b11 TaskTree: Hide more internals inside StorageBase class
Rename storage internals.

This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I1ed42472060de6180d4665d6504598adb57828fe
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 07:48:04 +00:00
Jarek Kobus
ced3052e7f TaskTree: Get rid of Storage subclass of GroupItem
Make the c'tor of the GroupItem taking the TreeStorageBase
public instead.

This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I78320ec24b4e4b915ab549135fb93b45c658b9f2
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 07:47:54 +00:00
Jarek Kobus
73bff6d497 TaskTree: Fix TimeoutTask ordering
Make ordering separate for each thread.
Add stress test for it.

Change-Id: Idb42ce2511b18c0e9dd4dcb216ca39b35b5c980e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-17 17:09:19 +00:00
Jarek Kobus
659f0f000c TaskTree: Unify TaskInterface::done(DoneResult) signal
Change the argument of TaskInterface::done() signal
from bool into DoneResult. Make it consistent with
other TaskTree API.

Introduce toDoneResult(bool success) helper.

Change-Id: I7b3041d7c1ed0317c76adbc1fd37448231e85f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-17 09:44:20 +00:00
Tim Jenssen
9f1d23df00 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Ic852bc9977d0292fb6cd93a319f4bfdebb22a1b0
2023-11-16 17:17:46 +01:00
Tim Jenssen
39d1dae0d3 Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: Ic6e557806a3209e2c6d983d3c3fcfad66f6e3066
2023-11-16 15:56:06 +01:00
Christian Stenger
e38c84d5db Tests: Fix warning and test execution on Windows
Avoids

 warning C4566: character represented by universal-character-name
 '\u23F0' cannot be represented in the current code page (1252)
and the resulting test fail on Windows.

Change-Id: I2bdd43b0648a954faa9e444df79a91027e6e891f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-11-15 16:32:24 +00:00
Jarek Kobus
37ed2ce42f TaskTree: Add tests for ConcurrentCall
Change-Id: I493ab170656a61a841614dff87495fa324336c45
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 16:21:43 +00:00
Jarek Kobus
62ad0014f1 TaskTree test: Simplify subprocess name
Fix the qbs build.

Amends 63bfeba87f

Change-Id: I271e5059ba8becf4aade8ce21ff9f40201f3734b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-15 15:00:26 +00:00
Marcus Tillmanns
1049f8d329 Utils: Remove unnecessary flag
Change-Id: Iae99b5fd6d3740015deb0e30d45d480ffb54c4a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-15 14:18:46 +00:00
Marcus Tillmanns
35a2d598ab Utils: Add SynchronizedValue<T>
Change-Id: I0af6998f540ba688fa54d9e43e33cb3cb0fc54e8
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 14:00:03 +00:00
Jarek Kobus
5a2df08ae0 TaskTree: Add a new example showing input / output data exchange
This example shows how to separate the business logic of the recipe
from the GUI and how to write a reusable recipe.

It shows how to feed the recipe with the initial data and how to
retrieve the final result from the recipe using onStorageSetup()
and onStorageDone() handlers.

Change-Id: I04c0c0c9bd6cf25ac4e91317e527ad12832e9143
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 10:54:05 +00:00
Jarek Kobus
a53dfaf623 Process: Switch the default implementation into QProcess
Task-number: QTCREATORBUG-28811
Change-Id: I5647b760998a80f59583b478a65de6d615e1ca55
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 10:26:09 +00:00
Alessandro Portale
f96feadad0 Fix missing overrides and redundant virtual
Change-Id: Id2a247b6032602c2295d928067c2462d3f9b5221
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-14 14:27:45 +00:00
Sivert Krøvel
b080a3772c Handle nodes and properties required by MCUs in JSON conversion
Qt for MCUs uses several features in the qmlproject files which
are unknown to QDS. It is important that this information does
not get lost when converting to and from the internal JSON
project format, to avoid breaking MCU projects.

The following changes were made:
- Files nodes keep the type (ImageFiles, QmlFiles...)
- Added support for more Files node types used by MCU projects
  (ModuleFiles, InterfaceFiles, FontFiles...)
- Files nodes can have child properties
- Added a JSON object to store properties unknown to QDS.
  They may be used by Qt for MCUs, and new properties may
  be added between versions
- Added support for the MCU.Config and MCU.Module nodes
- Added a test project for MCU. This project is also tested
  with Qt for MCUs. Both the original and the converted
  project build correctly
- Added instructions for notifying the MCU team before
  modifying the MCU test cases to avoid breaking changes.

Fixes: QDS-10774
Task-number: QDS-10969
Change-Id: I0dfd7f3b150a8661fc0398a8a3d575c7e8777ef3
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-14 12:22:36 +00:00
Karim Abdelrahman
2dae80de93 McuSupport: detect if a project is QtForMcu
Update the way we used to check for mcus
project in McuSupport plugin. The old way
relied on the deployment step which is only
available when the user has already added a
valid QtForMcus package to "Devices->MCU".

The addition of "isQtForMcusProject" in
externaldependenciesinterface.h will be
used in a follow-up patch in
qt-creator/tqtc-plugin-qtquickdesigner
which adds a warning when using .qtbridge
for Mcu project.

Task-number: QDS-10599
Change-Id: Ibf46477a4f0cb4a82a10ac848acec75458bf6c03
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
2023-11-14 10:27:59 +00:00
Jarek Kobus
845337436c Async tests: Add tests taking static function
Change-Id: Id10b40c7d50c36b8e9406f1ae7ab8915c908212c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-13 09:02:17 +00:00
Eike Ziller
e6a39128f5 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ib9f8b81d60162a8b01e7c627ba54901af68afa98
2023-11-10 11:23:21 +01:00
Semih Yavuz
5b1aa26e47 Do not use QDir::separator() in QML reformatter test
That created a mix of / and \\ while building the path. Qt promises to
build paths that conforms to underlying OS if we always use /.

Amends  ffcbbecf27

Change-Id: Iebcb739cc02f0a2d6dd8953943ecfa9cf8fc9aea
Reviewed-by: hjk <hjk@qt.io>
2023-11-10 08:29:03 +00:00
Tim Jenßen
058fd820e5 Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: I1e38a9dc4402a4cf836c32a6b0e5f49a836574b7
2023-11-09 08:46:51 +00:00
Eike Ziller
7bd99104e0 Merge remote-tracking branch 'origin/12.0'
Change-Id: I2594f193260a103e1c4484fcab974213c881353d
2023-11-09 08:22:27 +01:00
Jarek Kobus
79421fd597 TaskTree: Rename StopOnFinished into StopOnSuccessOrError
In order to conform to CallDoneIf::SuccessOrError.

Amends 2c0a59384c

Change-Id: I2704667ca8d005c63c13b62786010ce430f0b550
Reviewed-by: hjk <hjk@qt.io>
2023-11-08 13:04:36 +00:00
Semih Yavuz
ffcbbecf27 reformatter: Do not remove type annotations
Type annotations were being removed by the reformat action. Write out
the relavant annotations in ast to fix it.

Add exclusion mechanism in tst_qml_reformatter test since it performs
line by line comparison which doesn't fit all reformatting cases.
Introduce char-by-char data tests.

Fixes: QTCREATORBUG-29061
Change-Id: Ia52b51e6d7d938bdec325c4f426b11c722f85f8e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-11-08 11:09:02 +00:00
The Qt Project
04eea22c5f Merge "Merge remote-tracking branch 'origin/12.0'" 2023-11-08 09:08:31 +00:00
Eike Ziller
363d2d161c Merge remote-tracking branch 'origin/12.0'
Change-Id: I35cb28b759fb200c45a1496299584132336fcd1c
2023-11-08 10:07:29 +01:00
Jarek Kobus
1cc4e32a4b TaskTree tests: Fix testInThread test on mac
Amends a88f807e86

Change-Id: I852a8b75a634d1266c442f775ae7b8f066923ce5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-08 08:55:48 +00:00
Marcus Tillmanns
503fd8121d Terminal: Make test actually manual
Change-Id: Ib44111401c4b4e1f16c8c53b6bd1f323f725cdd1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-08 08:42:47 +00:00
Jarek Kobus
c25a7a0381 TaskTree: Address some code style issues
Amends af63dcaf96

Change-Id: I9c727751afe306be5da36e772201eff1f36ac18a
Reviewed-by: hjk <hjk@qt.io>
2023-11-08 08:30:31 +00:00
Jarek Kobus
30ac04bffd Process tests: Use QSignalSpy and QTRY_xxx instead of timeouts
Avoid arbitrary timeouts causing flakiness of tests.

Change-Id: I2b7634ab08ee29be06002eb22f01a5efdf78d407
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 15:28:38 +00:00