Commit Graph

84220 Commits

Author SHA1 Message Date
Jarek Kobus
4c38f68d0f TaskTree: Rename StopWithDone -> StopWithSuccess
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

This addresses the 26th point in the task below.

Task-number: QTCREATORBUG-28741
Change-Id: I53ed6905b1c385c398f49e122e8ca60aa3ad0806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:23 +00:00
Jarek Kobus
2c0a59384c TaskTree: Rename workflow policies
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

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

Task-number: QTCREATORBUG-28741
Change-Id: Icc882710dc4896626dc9332440aa13a692af54c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:09:15 +00:00
Jarek Kobus
273518c82f TaskTree tests: Introduce GroupCanceled check
Task-number: QTCREATORBUG-29834
Change-Id: I1bf716e662b279c1a85b7f95f81a61be39ee3110
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:06 +00:00
Jarek Kobus
1da7f18fb7 TaskTree: Introduce List element
The List element of GroupItem type is a helper for
constructing Group content with an initializer lists.
Since there is no easy way of mixing items and lists of items
inside the initializer list, the List element encloses
the list of children in a single GroupItem element making it
possible to mix the lists of GroupItems with individual
GroupItem elements on a single initializer list.

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

Task-number: QTCREATORBUG-28741
Change-Id: I5fa4b76677f5aa7dcf875b9e9a16d86a26d380a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:08:36 +00:00
Jarek Kobus
af63dcaf96 TaskTree demo: Visualize Canceled state
The running task tree may cancel automatically some tasks / groups.
Visualize the canceled task / group with cyan color.
Add footer with state legend.

Task-number: QTCREATORBUG-29834
Change-Id: Ie799fa7b803ca3cc5ac21c580c2f86cd41b3242b
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:08:28 +00:00
Jarek Kobus
37b6cb7f90 TaskTree: Get rid of onGroupError element
Make it possible to setup onGroupDone element with additional
OnDone argument.
The onGroupDone handler may accept extra DoneResult argument.
The onGroupDone handler may also tweak the success bit of a group.

All above features conform to the behavior of the task done handler.

Task-number: QTCREATORBUG-29834
Change-Id: I125bdfe155e585678fb33410632246401cbc9390
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:08:04 +00:00
Jarek Kobus
fbe359308d TaskTree: Unify done / errorOccurred signals
Get rid of TaskTree::errorOccurred signal. Provide additional
DoneResult arg for done signal.

Task-number: QTCREATORBUG-29834
Change-Id: I31a3a0701a14246b01f65303a1295f014c855ecf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:07:52 +00:00
Eike Ziller
d2500dc77b FancyMainWindow: Remove auto-hide title bars functionality
This added complexity with the hovering to get the title bars shown, and
discoverability issues with the action in the views menu to show all
title bars, and the issue that some docks then had double titles,
because we wanted some title to be shown even if the title bar is
hidden.

Instead only show the dock control buttons only on hover, which already
removes a lot visual clutter that was the main reason for the
whole exercise.

One issue is that the title is now uselessly repeated for tabbed docks.
Another is that the title bar style is ugly and not very compatible to
what we otherwise have.

Change-Id: Ib093e0a3f2f07ece74b9055015c5523994032c5a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 13:50:05 +00:00
Jarek Kobus
f84e3074cd TaskTree: Make it possible to invoke done handler only with DoneResult
Remove unused "const Task &" argument from done handlers.

Task-number: QTCREATORBUG-29834
Change-Id: I0e69c1eba88d9fdb78de7ba1705ff3916999dc89
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 12:05:21 +00:00
Jarek Kobus
35e03499f0 TaskTree tests: Detect canceled state
Task-number: QTCREATORBUG-28741
Task-number: QTCREATORBUG-29834
Change-Id: I057d23efe754b2f6c3f7b6b28b357d0e1ec24eb6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 11:52:33 +00:00
Jarek Kobus
dda75153fe TaskTree: Introduce DoneWith enum
This makes it possible to recognize the cancel state
when the task was automatically stopped because of task's
parent group workflow policy or when the user called TaskTree::stop().

This addresses the 2nd point in the master task below.

Task-number: QTCREATORBUG-28741
Task-number: QTCREATORBUG-29834
Change-Id: I2798b9ec1d2f1d667aff51ee0271a5a15a525dc1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:52:18 +00:00
Jarek Kobus
84edd54699 TaskTree tests: Add more valid constructs
Change-Id: I7adea93ea7bddaffe157f1c32b538a2c99cae9d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 11:52:06 +00:00
Jarek Kobus
b5f77f6d55 TaskTree: Get rid of unneeded done handlers' arguments
Task-number: QTCREATORBUG-29834
Change-Id: I236dec27a292a1b006b7001d01ce620960380de9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 11:51:50 +00:00
Jarek Kobus
34cef824b5 TaskTree: Make it possible to tweak the success bit in done handler
Make the arguments of done handler optional.

Task-number: QTCREATORBUG-29834
Change-Id: I9c2af431feca87351c8c9129e61ce3889d137de5
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 11:51:35 +00:00
Jarek Kobus
6e6aa7102c TaskTree: Introduce CallDoneIf enum
Get rid of CustomTask c'tor taking 3 handlers.
If the done handler needs to be called only on
success or an error, add explicit 3rd arg of CallDoneIf type.

Task-number: QTCREATORBUG-29834
Change-Id: I10e55415587e6cac46620dd5177ad8269584583c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:51:25 +00:00
Jarek Kobus
63bfeba87f TaskTree: Add a test for QProcessTask
Change-Id: If49ec3dded8ce92a2a78b55ce95b56e8683de1f5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 11:51:08 +00:00
Jarek Kobus
65341d7e5f TaskTree: Introduce QProcessTask with internal reaper
In order to make it possible to use QProcess in TaskTree
outside of QtCreator.

Change-Id: Icff4113a7799297c5941ee68ee1cc874806c3816
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:50:58 +00:00
Alessandro Portale
6d50724937 Core: Rename "asciify" macro to "Asciify"
By convention, macro names start with a capital letter.

Amends: b2e96147cb

Change-Id: I2aa93deee7aec798128371d7f81a9c6fc9dd85c2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-07 09:54:02 +00:00
Alessandro Portale
b2e96147cb Utils: Turn "Util.asciify" into a plain macro
This monves the asciify function to stringutils and makes it directly
available as "asciify:" prefix macro, so that the generation of a
default build path does not go through JavaScript.

"Util.asciify" remains available as core JavaScript extension for the
case that it is used by third party code/wizards.

This change also adds a test to tst_stringutils

Change-Id: Iba2f20c0415ee8fe757c2f0058a90629b3fbeff0
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 08:50:50 +00:00
hjk
0dbd951654 CppEditor: FilePath-ify SymbolSearcher
Change-Id: Iff29c4c6287d12a361174264332e8734e914050a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-07 08:50:32 +00:00
Christian Kandeler
24d4cb6576 ProjectExplorer: Make the MAKEFLAGS warning self-explanatory
Fixes: QTCREATORBUG-29816
Change-Id: If35fe74c52ec1c890f390eb0a645299ce9e926b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 08:34:51 +00:00
hjk
bbbc9d3fa9 AutoTools: Remove dependency from CppEditor
Not needed anymore.

Change-Id: Ie1b6faffc1cde6348d37c0f7c32f9621f6442b69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:53:12 +00:00
hjk
2a5a2ca9f0 Meson: Remove dependency from CppEditor
Not needed anymore.

Change-Id: I597821a56d374a8d800f2fde43b78805ee1e0278
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 14:53:03 +00:00
hjk
b89baec2c1 ProjectExplorer: Promote CppProjectUpdaterInterface
... to ProjectExplorer::ProjectUpdaterInterface and generalize it
regarding language, but create a convience function for the C++
case, as that's the only user right now.

Also add the self-registering factory boilerplate and adapt all
buildsystems.

Change-Id: If928512609d41c25fad2aa58633c8bffabc4c48f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 14:50:10 +00:00
Jarek Kobus
0fa16f8489 TaskTree: Use common done handler
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Ie4f92236a38b03dac3dd33b2c80a317b62772a12
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:27 +00:00
Jarek Kobus
0e7ecee489 VcsBase: Use common done handler
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Ib92ef2dcd960372d9db6c8f50d4017a33c49ccd3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:33:20 +00:00
Jarek Kobus
6059164299 TaskTree: Make setup handler optional
Change-Id: Idfcaaf5cc5f69895d8cf9bf6e4ee673e524b61fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:14 +00:00
Jarek Kobus
d35d0b5100 TaskTree: Add Task c'tor taking one handler for done and error
The overloaded c'tor takes one done handler with an additional
"bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Id579d055721a2a07a5a9f0900aa4a73655f21610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:33:06 +00:00
Jarek Kobus
09c4aad0eb TaskTree: Keep just one done handler
Instead of having separate handlers for done and errorOccurred.
This will enable setting just one common done handler with an
additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: I52d826dd89461ff93772a6fe7a85e432d1e84665
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:29:46 +00:00
Jarek Kobus
aef960a68c TaskTree: Get rid of the fluent interface
It wasn't really used and it interferes when refactoring.

Change-Id: I8b8ba1740fef24502855e896e9b33ba816e1229f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:29:35 +00:00
Jarek Kobus
790f7deb08 TaskTree: Allow custom deleter for custom task
This will enable employing ProcessReaper automatically
for QProcess tasks.

Change-Id: I54b1d4604a9dfb11698e23bd66cf94d34675f722
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:22:48 +00:00
hjk
f8bbdf6f07 Core: Inline ICore::init() into ICore constructor
More natural setup.

Change-Id: I5a51cdec3f955e4b887613bd3dea4b25d485e844
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-06 13:38:40 +00:00
Eike Ziller
4bd29f741c Merge remote-tracking branch 'origin/12.0'
Change-Id: I517dc84e975a570edd363253ad444a01799dbc4b
2023-11-06 10:51:11 +01:00
Eike Ziller
34150b0344 German translation: CompilerExplorer, ScreenRecorder
Change-Id: I4a7a2af047c3c7b6a0fbe759ec658f0ac39c85eb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-11-06 09:09:16 +00:00
Marcus Tillmanns
201857fa68 Terminal: Fix Url handling
FilePath::toUrl does not pass queries correctly to QUrl.
So we use QUrl::fromUserInput directly.

Fixes: QTCREATORBUG-29850
Change-Id: If0706b3b37d03eeea87247b44f07f8a0f8915a95
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-06 08:22:02 +00:00
Cristian Adam
42cc29902b CMakePM: Detect C/C++ object extension for single source build
When using CMake package manager auto-setup the CMAKE_C|
XX_OUTPUT_EXTENSION is stored in the CMake cache.

This way CMake project manager can know about the correct extension when
building a single source file.

If CMAKE_C|XX_OUTPUT_EXTENSION is not found in cache it will only use
".obj" for Clang-Cl/MSVC/MinGW toolchains.

Task-number: QTCREATORBUG-27471
Change-Id: Ib9b75608d5a6834014150c57f3098f79284d8276
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-11-05 11:56:22 +00:00
Alessandro Portale
e006d4e86d Android: Avoid "Empty filename passed to function" warning
When launching Qt Creator with clean settings on Windows, the Android
plugin might cause an "Empty filename passed to function" warning that
comes from deep inside Qt.

This hack works around that.

Change-Id: Id668b981a1467a54d852082e95963e34554006e9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-04 18:11:04 +00:00
Volodymyr Zibarov
d0203a39fa ClangCodeModel: Add menu action to re-index files
... that depend on changed headers.
When changing a header file the clangd code model is not updated for
files that including it if they are not opened in editor.
This is not to be done automatically, as it would be a performance
hazard to rescan many files, for example when changing a widely used
header.
Add a menu action to trigger such re-indexing manually to solve the
issue.

Task-number: QTCREATORBUG-27387
Change-Id: Ia8033401f847627cee041b102f9ac6f3af3dd709
Reviewed-by: Volodymyr Zibarov <gogan419@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-03 15:36:16 +00:00
Alessandro Portale
18817c4088 Designer: Remove extra contents margins in the settings dialog
Task-number: QTCREATORBUG-29108
Change-Id: If3c6b0bcf9e1f05705c7e85fd814740235dbc7a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 15:19:02 +00:00
Jarek Kobus
f915a18a9e Process test: Adjust timeouts to minimize a chance for flakiness
The flakiness happened on mac inside recursiveBlockingProcess test.

Change-Id: I4d461fcdae1ecbf29f89bfdb4ad7ba017724f14b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-03 14:12:52 +00:00
Eike Ziller
f9d4697371 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ice9c78147917fc13b6cf81ba781a37bdcd870e17
2023-11-03 14:58:00 +01:00
Leena Miettinen
0b322ef178 Doc: Describe the Preferred comment position option
...in Preferences > Text Editor > Behavior.

Updated screenshots.

Task-number: QTCREATORBUG-29392
Change-Id: If368d6e2e05c81b3b83007bad7636e275a0f3950
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-03 13:47:52 +00:00
Alessandro Portale
68222e6fd3 ExtensionSystem: Open PluginDialog without horizontal scroll bar
This makes the dialog slightly bigger to avoid that horizontal
scrollbar (when using normal font sizes).

Also, the header sizing code is a bit cleaned up. The "Loaded" column
takes less unnecessary space.

Change-Id: Ic7db7595a88a6dcedd52dce608aa1c9c79c8a464
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-03 12:55:08 +00:00
Christian Kandeler
a1b78d4234 ClangCodeModel: Fix shadow document handling
Our approach was not fully thought through: When we got informed of a
file getting created by an ExtraCompiler, we would make it known to the
first client that came along and then forget about it. This means that
e.g. a source file including a UI header would parse fine with the first
client that opened it, but after switching the build configuration or
possibly even just touching the project file, the UI header would not be
found anymore.
Fix this by keeping the information about generated files around and
attaching them to every newly initialized client.
Note that this state should probably be kept somewhere more central.

Change-Id: Ib1d8cca9258d1962513d8d463f5d16f9ff91a048
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-03 12:22:23 +00:00
Marcus Tillmanns
5f7be10349 Locator: Handle file create error
Coverity-Id: 1561120
Change-Id: Iefa1f6e7bc7a28d9f0d7427051896c49a413f027
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-03 12:20:31 +00:00
Eike Ziller
92ea715c0f German translation: TextEditor
Change-Id: I6f8150e16661cd2398bacd07dee73ac3720a5a64
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 12:17:42 +00:00
Eike Ziller
fbf3ba1081 German translation: Vcpkg
Change-Id: I3b8cffa00ecdc862ab974726df84e93a49701d04
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 12:17:30 +00:00
Eike Ziller
e427a10788 German translation: Debugger
Change-Id: I92601c1893a4fd988daba36a97eaa1d7ae3b1f7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 10:55:36 +00:00
Marcus Tillmanns
32f69227f1 IOS: Unify error handling
Instead of using some flags in some struct, we convert the error handling
to use expected_str<ResponseData> to clean up the error handling with
the outside.

Change-Id: I0f8d10c99715989e0069568ebc1d799d412a0600
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 10:01:45 +00:00
Eike Ziller
e562caaff2 German translation: Terminal
Change-Id: Ic5162171ae7d1d183438a306bf2bf6012a2e316f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 09:59:06 +00:00