Commit Graph

86026 Commits

Author SHA1 Message Date
hjk
d0d0d3b83a Rename a few more ToolChain items to Toolchain
Change-Id: I78e12e6923242fcb72cdde6284185574b8792fc6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-23 11:09:32 +00:00
hjk
d7c1fe129f McuSupport: Rename remaining ToolChain things to Toolchain
Change-Id: Icd90402501b3ca2197e124731e26d2f9b0704e0a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-23 11:09:23 +00:00
Christian Kandeler
8ef85e481a ProjectExplorer: Re-do the EnvironmentWidget
Editing in the item view was cumbersome and did not generally allow one
variable to refer to another, as there was no defined order on the
assignments.
Therefore, we make the item view read-only and promote the batch editing
widget to be the standard input method. User changes are not sorted
anymore, except in the summary text of the details widget.

Fixes: QTCREATORBUG-28480
Change-Id: I225cf86fff7b001a57d663e1fd267a4645e695c4
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>
2024-01-23 09:54:13 +00:00
Jarek Kobus
10ff747a0f Use more std::chrono and std::chrono_literals namespaces
Change-Id: Ib8c83988d7afe35d81b87ff8c5c87eef2082f12d
Reviewed-by: hjk <hjk@qt.io>
2024-01-23 09:32:43 +00:00
David Schulz
9e73dc1f09 ProjectExplorer: add async toolchain autodetection
Change-Id: I82c6d0b22a9d36674c58561ef654d7ffde8574da
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-23 08:28:55 +00:00
Leena Miettinen
1a29f87440 Doc: Fix the location of the "Request Copilot Suggestion" action
It is in the locator, not in the context menu.

Fixes: QTCREATORBUG-30227
Change-Id: I35bea968a936e8872cdadcec3b8f53559e654c94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-01-23 08:01:37 +00:00
Jarek Kobus
00ba645fe1 ProcessBlockingInterface: Change signature of waitForSignal()
Change the arg to QDeadlineTimer type.

Change-Id: I7087648fd4f248b0b5024dc0d51d65171037934d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-23 07:09:33 +00:00
Jarek Kobus
63fc22e274 Process: Change signature of waitForXxx() functions
Change the arg to QDeadlineTimer type.

Change-Id: Id3dee0717e44130c16baf7925e5b06346a1a1ad1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-23 07:09:22 +00:00
Jarek Kobus
f86ada790a QtSingleApplication: Simplify chrono duration initialization
Change-Id: Id75505b67e7e37ca4be9566a70ccda89b7168971
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:47:54 +00:00
Jarek Kobus
665beaead9 Process: Change signature of setReaperTimeout()
Change the arg to std::chrono::milliseconds type.

Change-Id: I7b79fc318e2fd06971148038a31fecd4c1805a79
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:42:36 +00:00
Jarek Kobus
e98f6e31e7 Process: Change signature of exitMessage()
Change the last arg to std::chrono::milliseconds type.

Change-Id: Ifb818f76ee33e03997cb5b1dd17336248f401238
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:28:41 +00:00
Jarek Kobus
afc67468e6 Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.

Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:51 +00:00
Jarek Kobus
f6be85b1d2 Process: Refactor timeout handling
Rename ProcessResult::Hang into Canceled.

Change the behavior of the Process:
Whenever the terminate() or kill() is called, including
indirect calls through stop() or runBlocking()'s timeout,
mark the process result as Canceled.
In this way the Process running by a call to start()
may also finish with Canceled state. Before it was only
happening for processes started via runBlocking().

Adapt the runBlockingStdOut_data() test accordingly.

Get rid of ProcessInterface::m_canceledByUser field.
Use ProcessResult::Canceled state instead.

Fix existing 3 usages of m_canceledByUser field.
Use standarized exitMessage() method for them.

Add automatic measurement of process execution.
Introduce processDuration() getter.
Use it for reporting exitMessage() instead of timeoutS().

Change-Id: I1a68559ce844caef863a97a6b0577b0238011f70
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:38 +00:00
Jarek Kobus
886ac041e5 Process: Simplify the implementation of runBlocking(Off)
Extract the common part of handling the timeout into the
handleTimeout lambda.

Change-Id: I3c55c76cbc3d1217322c1b2a7002285bf2e649d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 16:29:54 +00:00
hjk
4d7a86dc5c CppEditor: Move CppFileSettingsForProjectWidget to .cpp
... and de-pimpl/re-order there.

Change-Id: I01b8e3d56ae28b0206dcd56a6cc04acf8c7b1942
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-22 15:57:50 +00:00
hjk
74cf4efb8a ClangCodeModel: Use ActionBuilder for Generating Compilation DB action
Change-Id: I89d8345351cb6da26b7ae899066a7ddfdb17fe9c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-22 15:57:35 +00:00
hjk
610a110341 TextEditor: Move test creation closer to tested code
Change-Id: I0f132dddd405bf17161e0e032f9496a90cdc5ab9
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-22 15:57:17 +00:00
hjk
2c78f260d4 Fix some compler warnings
1x warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
2x warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]

Change-Id: I762fbe935156de9600064512bc405c6f4b2b1477
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-22 15:38:02 +00:00
Xavier BESSON
df9b802842 Show color previews for QML functions
Task-number: QTCREATORBUG-29966
Change-Id: I41aa37bdc446d2b238a6a9ec0f3bd73b3fae550a
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-22 14:13:46 +00:00
Eike Ziller
ed1b6b958a ExtensionSystem/Core: Use more std::chrono
It is more descriptive than an int.

Change-Id: Ibcb8c3c6210bfa414bb33e36ee401c97ca5fab75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-22 13:51:00 +00:00
Eike Ziller
52fb6f925b Use std::chrono for TaskProgress::setHalfLifeTimePerTask
It is more descriptive than an int.

Change-Id: I6add6a74850a9976c92509c404edb0c9fc403d21
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-22 13:50:54 +00:00
Eike Ziller
d53c5344ec ProgressManager: Use std::chrono for timed tasks
It is more descriptive than an int.

Change-Id: I129dc931b7dd137846eb97747a5277911b94e06f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-22 13:50:46 +00:00
Eike Ziller
1a84ae038d Build nanotrace profiling by default
And enable its availability for startup performance measurement.
Makes it possible to run with `-trace <filepath>`, creating a CTF for
startup performance, without requiring a special QtC build.

Usage in QmlDesigner/DesignStudio is guarded by an additional
DESIGNSTUDIO_USE_NANOTRACE CMake option (default off), since that adds a
menu item that should usually not be shown.

Change-Id: I87200745cc32f256bcaaba21f139b4104459e49a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2024-01-22 13:50:39 +00:00
hjk
7d7f97a747 CppEditor: Simplify setup of global file settings
Change-Id: Icef29d5ac7417bf59a21318a1fa13750f2136221
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-22 11:39:52 +00:00
hjk
a6f57dc25e CppEditor: Simplify CppCodeModelSettings setup
Change-Id: Ie6849caf8ded2c0901a9d2daeda6a1f81b68ed72
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-22 09:56:52 +00:00
David Schulz
628560a60e LanguageClient: deactivate a document if it was opened by the client
Do not always call deactivateDocument for all
Core::EditorManager::documentClosed emits containing textDocuments.

Change-Id: I5d9bf4c0d634837167fced4202f7edf34952c46d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-22 09:47:55 +00:00
David Schulz
b7abde11a0 LanguageClient: Make sure to untrack deleted documents
This is a safety net for manually opened documents (not opened via the
EditorManager) so that all pending pointers to those documents are
removed.

Change-Id: I2527db1a5bab387b9f49255ebcde9232afd5a93c
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-22 09:47:50 +00:00
David Schulz
a8b5b1d606 LanguageClient: fix reassigning documents to restarted server
Make sure a client is still responsible for all assigned documents after
it gets restarted because of setting changes.

Change-Id: I3c7d8635e6699c137427864c1bf4eb183bfcf2f8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-22 09:47:41 +00:00
Christian Kandeler
6015344669 Update qbs submodule to HEAD of 2.2 branch
Change-Id: I07074033bbed864d9986d1615f9d0352c47a85da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-22 09:40:28 +00:00
Xavier BESSON
6515f935d6 Display length of QByteArray's in debugger pane
Task-number: QTCREATORBUG-30065
Change-Id: I155fe83d6d2956552aa0127caae3971c70a49551
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-01-22 09:19:29 +00:00
Jarek Kobus
2fe5b61aab Process: Read QTC_USE_QPROCESS just once
And store it in static variable.

Change-Id: I983ba4d23563ab412ba8db5e4ea4cc1b7a75dba7
Reviewed-by: hjk <hjk@qt.io>
2024-01-22 09:16:42 +00:00
Jarek Kobus
60eaa2c826 Process: Read QTC_MEASURE_PROCESS just once
And store it in static variable.

Change-Id: Ia630f63125088bff32a4d6df9de4c8279c8d8b34
Reviewed-by: hjk <hjk@qt.io>
2024-01-22 09:16:37 +00:00
Jarek Kobus
77e395f926 MsvcToolChain: Use standarized Process::exitMessage()
Instead of the own exit message construction.

Change-Id: Id1760f7341c59cff807a48757e0f82d22fb43dd3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-22 07:40:44 +00:00
Jarek Kobus
b02e708b6d PythonUtils: Remove code repetition
Introduce isUsableHelper() and use it from venvIsUsable()
and pipIsUsable().

Change-Id: I29c869f544e28d0962bc0e357399db66f48ba3d1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-22 07:40:28 +00:00
Andre Hartmann
c3d7b4de3e Git: InstantBlame: Lower logging category for non-error
`TextEditorWidget::fromEditor(editor)` fails in the
DiffEditor, so this message is no warning but rather
an info.

Change-Id: I1635b77910e609bda470d2f657916bbc98860af4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 07:00:51 +00:00
Jarek Kobus
1c79724519 Perforce: Get rid of the message field from PerforceResponse struct
It's not used anymore.

Change-Id: Icfdefd38942fba1a64052339aa373c0a9254f826
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 21:08:25 +00:00
Jarek Kobus
b92b0d4100 Perforce: Move logging the error directly into the synchronousProcess()
Change-Id: I9d090f2da36d3868e9b4ca2a7f297be62e36e65a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 21:08:20 +00:00
Jarek Kobus
a4177fb238 Perforce: Merge fullySynchronousProcess() with synchronousProcess()
Change-Id: I3b37fca5f66da521540a5dcd4e4a19ff592fa7ef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 20:56:13 +00:00
Jarek Kobus
ee13281a27 Perforce: Use exitMessage() in synchronousProcess()
This is a standarized equivalent.

Change-Id: I609db7072e9eb645ca391c1eaca9a83dad40e460
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 20:45:20 +00:00
Jarek Kobus
c1e8688eea Perforce: Inline msgWhereFailed() helper
Change-Id: I41da19c488e3a4a72abfb5c7912fdcbc190cc603
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 20:45:13 +00:00
Jarek Kobus
3769c40cbb Perforce: Simplify fileNameFromPerforceName()
Drop errorMessage arg. There are 2 callers of this method
1. PerforcePluginPrivate::printOpenedFileList() was ignoring this arg.
2. PerforceEditorWidget::findDiffFile() was just printing qWarning().
   In this case, instead of printing a warning, append a relevant
   error message to the VcsOutputWindow. Note, that this is done
   in case the passed quiet is false. Once, it's done implicitly
   by the call to runP4Cmd() and passing ErrorToWindow flag.
   The second possible message is explicitly sent to VcsOutputWindow
   in case of !quiet.

Change-Id: I257d474b958b09965ffabdd09ff2e0fb253a0bf8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 20:45:07 +00:00
Jarek Kobus
f200fe99a1 Process: Get rid of timeoutS()
The setter setTimeoutS() is going to be removed soon.
It's going to be replaced by the extra arg to runBlocking().

Change-Id: I60b8c952ba5e27e36183f8652aaa92059e08746e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 18:37:04 +00:00
Jarek Kobus
290121bc21 Process: Use more rawStd{Out,Err} const methods instead of mutable ones
Avoid using readAllStandard{Output,Error} mutable methods if possible.
Use non-mutable methods when we are not connected to
readyReadStandard{Output,Error} signals.

Change-Id: I2e830e571b9eab2177fd856bbe06dfc5137d9c01
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 17:21:25 +00:00
Jarek Kobus
6ed9552be2 Process: Introduce rawStdErr()
Complementary to rawStdOut().

Change-Id: I621b5b9858f775139a2c900f06812d9dd249d034
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 17:20:15 +00:00
Jarek Kobus
7fc991ac8e Process: Remove no-op calls to setTimeoutS()
The timeout is only used with runBlocking(), otherwise it's no-op.

Change-Id: I7d81e4a73c7182bd19c435c112a2d64c3f40ba2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 10:14:07 +00:00
Jarek Kobus
ce6087a591 VcsCommand: Don't use Process::timeoutS()
Use Job's timeoutS field instead.
The Process::timeoutS() is going to be removed, soon.

Change-Id: I2f2fc7ed99e51242d364a423234321e00ae52b75
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 10:14:00 +00:00
Jarek Kobus
cccfa9b55c VcsCommand: Get rid of unused private timeoutS()
Change-Id: I9a105e7454a2407ed855d10a715195ed6638aaf3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 10:13:53 +00:00
Jarek Kobus
04b80f092a ProcessProgress: Add setExpectedDuration() method
This is not the same as process timeout, so make these two
settings orthogonal.

Change-Id: I3fc774c183282fe770feb49258d77d0ce3637b38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 10:13:46 +00:00
Orgad Shaneh
04d7858250 Debugger: Fix compilation without tests
Amends 3f224291e6.

Change-Id: I0cacfa8be8fa507d8db98dbed506331d007cfb8d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-21 09:01:02 +00:00
Jarek Kobus
6fa2e00425 Process: Get rid of internal event loop field
It was only needed for runBlocking() in event loop mode.
Handle it locally from the runBlocking() function.

Change-Id: I6eb0830b223977bbf0fc73f0cdf4f3b4cab962b5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 20:10:18 +00:00