Commit Graph

68765 Commits

Author SHA1 Message Date
The Qt Project
8f2221cee8 Merge "Merge remote-tracking branch 'origin/qds/dev'" 2023-09-14 15:41:22 +00:00
Tim Jenssen
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02:00
Alessandro Portale
b5684ee490 Utils: Fix warning regarding incompatible signedness
Change-Id: I0b035ec53d65d636ace121d0d155249eebad2f8d
Reviewed-by: Xavier BESSON <developer@xavi-b.fr>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-09-14 14:37:15 +00:00
Eike Ziller
e76ec76c0f Remove unused variable
Amends 7f908d737b

Change-Id: I5e28f850c6a4d836ba7c48bd117a91aab64f478c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-14 14:35:25 +00:00
The Qt Project
3473d9d388 Merge "Merge remote-tracking branch 'origin/11.0' into qds/dev" into qds/dev 2023-09-14 12:52:09 +00:00
Miikka Heikkinen
2598e788cc QmlDesigner: Block import of 3D types for Qt5 projects
Quick3D is not supported anymore for Qt5 projects, so we shouldn't
allow 3D imports, either.

Fixes: QDS-10662
Change-Id: I40da07a67e57527c7ad85443f2463e3f7783693f
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-14 12:43:23 +00: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
Christian Kandeler
93273af6dc qbs build: Move pluginjson replacements property to the module
... where it clearly belongs.

Change-Id: I22d098b701e4921cde53ab34d11ab0078326ab94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-14 12:21:46 +00:00
Miikka Heikkinen
77a1c0fb15 QmlDesigner: Allow snap back to 0 rotation during drag
Start rotation should be restored when desired angle for rotation is 0.

Fixes: QDS-10652
Change-Id: I8e733b714f6a0f14561c270aefc5049bdfaff39e
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-14 12:19:19 +00:00
hjk
b5b61480bd Core: Code cosmetics in saveitemsdialog.cpp
Including removing one use of QDir::toNativeSeparators()

Change-Id: I5c1fe7733942d6161bd9dda94195a44c0cfded72
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-14 12:06:54 +00:00
Yasser Grimes
7295bc96cc McuSupport: Make QmlProject c++ interfaces accecible to the CodeModel
QtMCUs relies on the QmlProject file to list c++ interfaces that are
available as components in Qml, roughly similar to qmlRegisterType.

Prior to this commit there was no possible methode for QtCreator to
know about thos c++ interfaces so whenever there are used "Uknown
Components" error is shown.

After building the project qmlprojectexporter through
qmlinterfacegenerator generate Qml files for each .h interface in the
"CMakeFiles/<target>.dir/*.qml" or ".../<target.dir>/<module>/*.qml"

To make those documents available we make use of CustomImportProvider
imports: for all importable qmlproject modules
loadBuiltins (new): for documents that should be available implicitly

for both the signatures is changed as all created documents require the
snapshot object (insert functioin) to bound their lifetime to the
snapshot as they are created as shared_ptrs.
duo to passing snapshot as copies between threads, storing those
documents locally will cause QtC to crash

Task-number: UL-6167
Change-Id: I09781f6d4b62b203944bf30ab322502d25263b56
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-14 12:02:10 +00:00
hjk
0b08a9752a CompilationDBPM: Remove some unneeded #includes
Change-Id: Iaccd053b12c440b07b7f07cdba70cf05ace1b03c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-14 11:49:10 +00:00
Marcus Tillmanns
d44afce0f0 Utils: Add AspectList aspect
Change-Id: Id164828f4ba46c973edbcd123c855bb7b70ad8f7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-14 11:37:10 +00:00
hjk
8627dab89d Cplusplus: Remove an unneded #include
Change-Id: Id9dbc15a60397daf651f80f48811fcc05de096d2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-14 11:32:50 +00:00
hjk
efb93d1366 CMakeProjectManager: Remote-ify CMakeFileCompletionAssist implementation
Change-Id: I18aa3d23244dd6475657f43bc18ce83298e278bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-14 11:27:09 +00:00
Ali Kianian
4b1862fdb1 QmlDesigner: Flash transient scrollbars only when they are enabled
Visibility has a more complex definition in transient scrollbars since
they are transient. Also, it's meaningful when it's disabled, it
shouldn't be flashed. So here we use this ability to prevent them from
being flashed when they are disabled.

Also, the enabled property would be changed instead of the visibility
for the cases that transient scrollbars are out of the scroll area.
(TimelineWidget and TransitionEditorWidget)

Task-number: QDS-10644
Change-Id: If74d71571a216153a2d3aa09694760d7a02026ca
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-14 11:04:54 +00:00
Alessandro Portale
726f2730e7 ImageViewer: Fix animation playback replay and loop
This fixes the issue that looped animated images do not automatically
loop and that animations can generally not be replayed from start.

It introduces the "resume" state to the tool bar icon in order to
distinguish between "playing an animation from start" and "resuming the
playback of a paused animation".

The setting cache mode QMovie::CacheAll was removed because it prevents
a looped animation from looping, and also its memory consumption (which
depends on animation dimension and frames) does not seem to be
positively outweighed by anything else.

Fixes: QTCREATORBUG-29606
Change-Id: Iaca8d93766201f5f953784be7ee6d56610e63695
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-14 10:51:35 +00:00
Alessandro Portale
7fc69e1063 Utils: Move CONTINUE_SMALL Icon from ProjectExplorer to Utils
We want a variant of the icon (without the debugger beetle) in Utils, in
order to use it in the ImageViewer plugin to resume paused animations.

Change-Id: I55ff301db60cae626d8e95d2fadf3c76a36cee39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-14 10:51:26 +00:00
Ali Kianian
252a1f3c74 QmlDesigner: Add a view for single collection
Change-Id: Iee103cf9344872e0f2eaa564fa1feeaea4d26d6a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-14 10:44:05 +00:00
Ali Kianian
f12f3790da QmlDesigner: Implement Collection Editor
Data could be loaded from a csv or json file, and would be appended
to the collection node.

Task-number: QDS-10462
Change-Id: I60294582331ba20eb5ecb5d8fd591055c0eb6d1e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-14 10:43:57 +00:00
Cristian Adam
4f26d802ca CMakePM: Remove support for extra generators
They are marked as obsolete in CMake 3.27 and will be removed in a
future version of CMake.

Fixes: QTCREATORBUG-29603
Change-Id: I6e5d36441d05b87ee4467d13781f53d4269636ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-14 10:30:06 +00:00
Tim Jenssen
955534ce45 qml2puppet: we only support Qt6 these days
This amends 59ecf10f06
"fix QT_VERSION_MAJOR is empty in single builds"

Task-number: QDS-10669
Change-Id: I730fe8d36b22fce82ff71b0f9aee5657d6380f1f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-09-14 10:22:41 +00:00
hjk
1f49833ea6 CppEditor: Remove unused class member
Change-Id: I6635f320e7d746702e6e86bd5f4e8cc749c804f5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-14 10:11:43 +00:00
Christian Kandeler
c816a9b523 qbs build: Remove unneeded Project items
Also update type descriptions.

Change-Id: I2b7d8814913cfb72cb8280601338ab763d8fabe6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-14 09:58:01 +00:00
Alessandro Portale
a7bbb986dd ScreenRecorder: Explicitly include <QAction>
... assuming that otherwise a build with Qt 6.2 fails

Amends: 9c036fe393

Change-Id: I6ed7a25ca8d50ef5283cdc16963aa79dfaef6749
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-14 09:34:54 +00:00
Tasuku Suzuki
673bcb644c Markdown: Add some tool button to help writing markdown
This allows users to add operator wrapping selected text easily.

Change-Id: If3c21fa41e0dc338a3ec760076406fe046e5adbe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-14 09:27:51 +00:00
Miikka Heikkinen
fb20ecff57 QmlDesigner: Make 3D view grid fade away at distance
Fixes: QDS-10622
Change-Id: I39179e3927bfef5b0e9d99cbbd2ff16886b6dc38
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-14 08:13:59 +00:00
Xavier BESSON
5cfe69ea1e Add possibility to comment selection after the white spaces
Fixes: QTCREATORBUG-29410
Change-Id: I736378e0b5fb542a6c1032a47adfb251b50ce2ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-14 06:59:00 +00:00
Henning Gruendl
1327a2c7ce QmlDesigner: Add transient scroll bar
Add transient scroll bar to connections editor

Change-Id: Id4afd661da2fcdeacd2a4a0de0e0b9999c14dec2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-13 16:55:12 +00:00
Thomas Hartmann
7e09f7d4ff QmlDesigner: Clean up PropertyTree Model
* Remove call to test
 * Remve qdebugs
 * Fix priorityListSignals

Change-Id: I0828a9eb7b90c6d7a4903f2cbaf4382e1f3a413e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-13 16:05:23 +00:00
Thomas Hartmann
c216dff156 QmlDesigner: Show default condition as empty
Change-Id: I33f217bf02035414b2d69c863c7039c485161579
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-13 16:05:09 +00:00
Aleksei German
9bf4a084b8 QmlDesigner: Remove repeating gradient code
Change-Id: I46ab46fb5a96c9c62933c845936d3ddba3d4bdc8
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-09-13 15:07:26 +00:00
Henning Gruendl
1ae4b05599 QmlDesigner: Fix crash in Expression Builder
Change-Id: I8ef783c1407f06aea630ce111b3d4f02e195eff5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-13 14:49:23 +00:00
Christian Kandeler
fc79d938ef RemoteLinux: Fix deployment to root directory
Skip mkdir in this case.

Fixes: QTCREATORBUG-29597
Change-Id: I716e2703e3599a71306a9126e0a627a519398937
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-09-13 14:37:51 +00:00
Marco Bubke
83bf9df043 Utils: Fix fix for string size
It was not using the whole short string size.

Change-Id: Id6f6d4d0241ef74dbc0fe766bc1e19e8671e0b94
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-13 09:52:25 +00:00
Alessandro Portale
9c036fe393 ScreenRecorder: Offer saving of the current cropped frame
The "crop and trim" dialog gets two new buttons. The first offers to
save the current, cropped frame as png image. The second one copies the
image into the clipboard. Copyuing into clipboard is also triggered by
the QKeySequence::Copy shortcut.

The location where the last image was saved gets remembered in the
settings.

Change-Id: Id4ac93838d59f6a6fa801456fe8d9c17d1e74154
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-13 09:05:11 +00:00
David Schulz
f491d93d2a CppEditor: remove superfluous locker in model manager
This locker potentially results in a freeze since the called projectPart
might require to lock for writing, which is not possible if the read
locker is still there. Additionally there is nothing we would need the
lock for in projectPartFromDependencies.

Change-Id: If957edfb4ebc45e18141cb14a63bf9567242cc48
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-13 08:48:22 +00:00
Eike Ziller
1870501443 Delay modifications to MIME database until first use
Initialization of the MIME database takes time, and it is good to avoid
this during startup.
We nevertheless want to apply some modifications to the MIME database, so
we need to delay these modifications until first use. Allow registration
of additional initialization functions. Since the initialization
functions access the MIME database, which does locking for thread-
safety, we need to separate the initialization to outside these locking
functions.

Change-Id: I2b1706347768bcf081644e078ccfa45302d61641
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-13 08:05:21 +00:00
Marcus Tillmanns
7200644f75 Utils: Syntax cleaning
Change-Id: If296e0240840f66c371106508f3f0046bc7a9a71
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-13 07:11:52 +00:00
Marco Bubke
22009b6967 QmlDesigner: Add PropertyNameLiteral
That hopefully makes it really hard to create a literal from dynamic or
automatic memory. Only global string literals should be used.

In header you should use:
MakeHeaderPropertyViewLiteral(foo, "Foo");
Makes foo constexpr and provides internal linkage.

In cpp files you should use:
MakeHeaderPropertyViewLiteral(foo, "Foo");
Makes foo constexpr and provides external linkage.

In a function scope you should use:
MakeCppPropertyViewLiteral(foo, "Foo");
Makes foo constexpr but does not add it to the stack.
All three provide a const QString& on demand. So no code is executed as
the program is started.

Change-Id: I924efbb1f5c2b2c811f3eeae042ff2eec8de3faf
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-13 06:35:04 +00:00
Thomas Hartmann
72a45dc2fb QmlDesigner: Fix update issues and reflection
* Whenever there are changes on the model we have to update the
delegate.

* Avoid reflection on source changes
* If the target changes the order of the model changes and we have to
sync selection

Change-Id: I34a87cd5ac329745bf48bb739fcf7555ee46b1c4
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-12 18:44:08 +00:00
Thomas Hartmann
034f107851 QmlDesigner: Fix update issue
The cache has to be cleared fist

Change-Id: Iba2a6035becf0dc60f2bc95b94dd1b6ef59ad4d3
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-12 18:43:50 +00:00
Alessandro Portale
9a81e1270a ScreenRecorder: Make extra sure that "last opened directory" is written
Change-Id: Iae45c91d6934e50cec48849a455cd79e493c28e4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-12 16:11:57 +00:00
Andreas Loth
b8564b48c0 Axivion: Propagate cancellation form future to network reply (abort it)
Change-Id: Ibcad2410276dbf752f73fbc8c9091156892670ff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 15:59:12 +00:00
Eike Ziller
fcfe73d8f1 Nanotrace: Shutdown should do nothing if not initialized
Change-Id: I717296da4c9aea1e9dd28db3421a927f6bb8d332
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2023-09-12 14:52:58 +00:00
Ali Kianian
92363e1a49 QmlDesigner: Set the correct color for tooltips
A static palette is set for the QToolTip to apply the theme color.

Change-Id: I9d7dd2290c1ac4feb5cdebc8388a611bc2b38add
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-12 14:46:28 +00:00
Eike Ziller
5d02b4df71 Tracing: Fix assert when wheel zooming
The wheel handling code was triggering an assert in qBound when
calculating the newStart, when using a touch pad.

Rewrite the wheel handling to get rid of the assert and make it more
similar to the text editor wheel handling.

Change-Id: I0c1306d00be6b3054fb8dba9628b7758880675b0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 14:28:26 +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
hjk
bd6348fc20 ExtensionSystem: Reformat -profile messages
We have ReallyLongPluginNames nowadays.

Change-Id: I722095fea0e9214e1d4e0774399c5d16123e867d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-12 14:25:55 +00:00
Eike Ziller
3b6ad4517f CtfVisualizer: Do not crash/assert
Use QTC_ASSERT.

Change-Id: I621c607915f71246be1bdb02f2588ed08e37a1cd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-12 14:21:52 +00:00