Commit Graph

88532 Commits

Author SHA1 Message Date
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
Mahmoud Badri
7d36e0be4c QmlDesigner: Add currentProjectName() to DocumentManager
Also refactor one place that needs it

Change-Id: I9b88a5b8d9a540601897d19628a2d857bc16808d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-01-22 15:29:54 +00:00
Mahmoud Badri
860e87993d QmlDesigner: Limit clearing effect maker to starting a new project
Fixes: QDS-11713
Change-Id: I8d1c33ed7ad731e710646b330af8251b61f425db
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-01-22 15:00:00 +00:00
Miikka Heikkinen
44f0e0819a QmlDesigner: Delete related resources if .qep file is deleted
Effect maker effects consist of .qep file under project content and
an imported module under asset_imports containing effect resources.
Now the resources module is also deleted when .qep file is deleted.

Fixes: QDS-11365
Change-Id: If3a91419970f6b26c4fc4df6d6d891b591ebedd3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-22 14:21:48 +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
Henning Gruendl
0707cca359 QmlDesigner: Fix ColorPalette Connections trigger
Fix ColorPalette Connections being triggered on all previously opened
ColorEditorPopups.

Task-number: QDS-11569
Change-Id: I2a6e44b631f4ff1187f9fbcd0afb8295b708f626
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-22 11:14:33 +00:00
Ali Kianian
1aee25bbc2 QmlDesigner: Create DataStore on demand
Task-number: QDS-11708
Change-Id: Ie08ab6260a1b720640c2c85f4b49b8093ec622d8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-22 10:58:37 +00:00
Miikka Heikkinen
1b4a79ad92 EffectMaker: Fix loading empty value for sampler uniform
E.g. MultiEffect doesn't provide default sampler image for mask, so
we need to properly support empty values for samplers.

Change-Id: I3e000127305b79bfa04e0a661ab45137f4dec237
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-22 10:56:34 +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
Aleksei German
ef2f76b2d8 QmlDesigner: Equate type var to type variant
Task-number: QDS-11395
Change-Id: Id81ad38f0fa07ce783c93ece70a856ab65cfcbbf
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-01-22 09:19:28 +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
Ali Kianian
8238764dcd QmlDesigner: Remove the collection name from CollectionDetailsView
* The collection name is removed
* Icon sizes follow the style
* The new toolbar has a background color
* Margins are modified
* An alignment bug is fixed
* HelperWidgets.AbstractButton is used instead of
HelperWidgets.IconButton

Task-number: QDS-11647
Change-Id: I9f8c9ddb3da07a90fcf9523533f9e71f4fcc881b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-01-22 07:52:24 +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
Ali Kianian
875053cbaa QmlDesigner: Support color, url, and image types for CollectionEditor
Fixes: QDS-11644
Change-Id: I13f70a45ae380c710888869f9cb9d3b65137fe30
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-01-22 07:38:49 +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
Jarek Kobus
c86a19a56e Process: Fix stopping the process while message box is visible
When process finished while the message box querying for
a process to be stopped after a timeout was visible,
don't try to stop it and don't report a hang.

Change-Id: I74a819244a96d9e0209cabc6d58c0a1c4fe1ac31
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 20:10:12 +00:00
Jarek Kobus
767e11aa5d Process: Simplify timeout related internals
Get rid of two internal fields: m_hangTimerCount and m_waitingForUser.
Rename m_maxHangTimerCount into more meaningful m_timeoutInSeconds.
Fire single shot timers instead of a timer with interval.

Change-Id: I10890101273719f55a591eaecf818067aa5c503c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 20:10:06 +00:00
Jarek Kobus
9aa37ee9d9 CMake: Omit a call to setTimeOutMessageBoxEnabled(false)
The false is a default value.

Change-Id: I94eb7c58ed591171de677f1dfc0d80a0c751d36d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-20 19:04:48 +00:00
Andre Hartmann
95aa370b69 Git: Remove now outdated function comment
Amends 98c0e9764a

Change-Id: I9f7bf520bb5ead83d883a554c97400d183f6fcee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 17:41:50 +00:00
Andre Hartmann
6f665c26a5 Git: InstantBlame: Init m_cursorPositionChangedTimer in ctor
Needs to be done only once, and fixes a dangling
pointer if setup() was called twice.

Change-Id: I02722daf5dffdfb2d4bb70de77436eb8d930806d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 17:32:38 +00:00
Andre Hartmann
7493b3a630 Git: InstantBlame: Fix multiple blame after file save
* Move document changed to slot and make sure it is a
  unique connection to prevent multiple slot calls
* Still we get two changed signals after save, which
  caused two blame calls, avoid this with a marker

Change-Id: I8f09ebc8c3cf9f9832fe2725c69acbea9a6b8c28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 17:32:28 +00:00
Andre Hartmann
e071a2d0ed Git: InstantBlame: Add categorized logging
Change-Id: Ic0e6e30a969fa4908d280e3dbb5c2395972d962d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 17:32:21 +00:00
Jarek Kobus
a475d89b5a Process: Get rid of debug enums
They are either not used or not usable.

Change-Id: Ib0e75624a3bd0d1fa98e45ffe1f5e15ef4db1217
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-20 17:31:36 +00:00