Commit Graph

60 Commits

Author SHA1 Message Date
Mahmoud Badri
16d9535c8d QmlDesigner: Hide content lib user when a warning message is shown
Fixes: QDS-12679
Change-Id: I5cc673eb24f6479a3cb8e876e0f31a4d2d5cb658
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-16 08:44:29 +00:00
Mahmoud Badri
f462be8e80 QmlDesigner: Prevent adding component materials to the content lib
Also remove the experimental restriction on the content lib user section

Fixes: QDS-12637
Change-Id: Ice2ac3f32a934d7c65ea7f406a2b5f8c4b5fed0c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 14:02:28 +00:00
Mahmoud Badri
7ffd4805ca QmlDesigner: Handle content library user items empty state
- Make sure search is working
- Hide sections with no items
- Other tweaks

Fixes: QDS-12682
Fixes: QDS-12625
Change-Id: Ia304743323c0459dd314752dba0cf1dc5e4c4889
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-14 10:22:15 +00:00
Mahmoud Badri
4f23a553d1 QmlDesigner: Enable content lib user 3D context menu
Also some relevant tweaks.

Change-Id: I7bace9ce6bd7b45951cc18f7175b4646251196f0
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-13 09:25:18 +00:00
Mahmoud Badri
09e012cbb7 QmlDesigner: Rename "Effect" to "Item" in the content library
Item includes any item except materials and textures

Change-Id: Icf981661dcd611638fe33fae18f65ad62a5e617c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-07 14:44:10 +00:00
Mahmoud Badri
688e697fc0 QmlDesigner: Add user 3D bundle to content library
Fixes: QDS-12391
Change-Id: Ia078e62274277774949b0fc6a679c17ddbf91968
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-06 12:45:23 +00:00
Mahmoud Badri
7525ef79de QmlDesigner: Use only 1 content library importer for all bundles
Change-Id: I59e8efda2e5704caf72297b8dee5178eb8ecfc71
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-02 10:17:53 +00:00
Mahmoud Badri
c9c3303ad8 QmlDesigner: Refactor bundle importer
so that it can be shared by more than 1 bundle. Also some relevant
tweaks.

Change-Id: I421648c26ac4a0d51612f21a5475f0938dfff331
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-04-29 12:10:40 +00:00
Mahmoud Badri
17a28ea850 QmlDesigner: Allow removing a content library material
Fixes: QDS-12541
Change-Id: I8efdd5c5f6185961bd8440e06d0adb60ad9d79f2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-26 09:41:17 +00:00
Mahmoud Badri
cc187e1ce6 QmlDesigner: remove a texture from content library user tab
Fixes: QDS-12542
Change-Id: Iee3ea0bd8a3ce6cb41c27a645801eef608cd8da8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-25 09:19:34 +00:00
Mahmoud Badri
63107ff2f7 QmlDesigner: Add content library user textures context menu
Fixes: QDS-12574
Change-Id: I3213d0601167e6963db7fbb1091ade4cb09bdc55
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-23 13:53:55 +00:00
Mahmoud Badri
ad408553af QmlDesigner: Enable expanding content library user categories
Change-Id: Id3b49773b02e4922a06b71e6ed7a7098ed4d4062
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-04-18 13:20:15 +00:00
Mahmoud Badri
4591293fd9 QmlDesigner: Add user texture bundle
Fixes: QDS-12390
Change-Id: I512a8748bbb6a282589f05293507c110162e7f1d
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-16 14:01:58 +00:00
Mahmoud Badri
247d2dbf6d QmlDesigner: Cleanups in the content library
Change-Id: I4bbb6f6d89c3e35a265624365eb61664280e9151
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-04-12 08:57:24 +00:00
Mahmoud Badri
bc5628afca QmlDesigner: Add content library user materials bundle
Fixes: QDS-12389
Change-Id: Icec1b06c57e0eaa4ff444e3143d3cba0803c8dd1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-08 12:13:16 +00:00
Henning Gruendl
316e48fc50 QmlDesigner: Remove version number from imports
Task-number: QDS-11177
Change-Id: I94a537af1d55d503aa04dd79c6194ef1a0647e83
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-01-17 08:01:32 +00:00
Henning Gruendl
3ad3a5f197 QmlDesigner: Remove unnecessary imports
Remove QtQuickDesignerTheme import if not needed.

Task-number: QDS-11177
Change-Id: Ia72001855bb636bfc2ddf11cbb00359fbe123c90
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-01-17 08:01:09 +00:00
Henning Gruendl
c54c62e5bd QmlDesigner: Make content library responsive
Task-number: QDS-10769
Change-Id: I5f2b74b11535583c0e7d4ee8408b75d490e88fc2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-10 15:14:01 +00:00
Henning Gruendl
f47e7d9d6c QmlDesigner: Fix transient scroll bar disappearing
Task-number: QDS-10689
Task-number: QDS-10690
Change-Id: Ib74e27f06ca24ff13f3000297c88306a7a9bb579
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-09-21 12:23:06 +00:00
Miikka Heikkinen
ac6d875d12 QmlDesigner: Display informative string for 3D support in Qt5 projects
Fixes: QDS-10661
Change-Id: I91ba32e478039711758e19c11d385af9fac4c99f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-09-15 08:28:22 +00:00
Mahmoud Badri
7d48260177 QmlDesigner: Prevent bundle effect add when no active 3D scene found
Fixes: QDS-10205
Change-Id: I88f3e6f95ea9beab1470dd8057d2b01497c2caf0
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-07-31 11:43:07 +00:00
Mahmoud Badri
cc244f6bed QmlDesigner: Expand matched bundle effects sections on search
Fixes: QDS-10193
Change-Id: I66acdab870cd358b2c70811fc30e190c068b652f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-06-29 11:56:10 +00:00
Mahmoud Badri
2b3ffe61c9 QmlDesigner: Add effects bundle to the Content Library
Fixes: QDS-9683
Fixes: QDS-10167
Fixes: QDS-10171
Fixes: QDS-10191
Fixes: QDS-10192
Change-Id: Ia6f764737783277c719109b28fad248ae3ea2990
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-06-29 09:30:59 +00:00
Samuel Ghinet
fb042cba21 QmlDesigner: Use new icon(s) for update button for textures
Task-number: QDS-9855
Change-Id: I012c1e96a11216a30da6e15124d55733da2fdcdc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2023-06-13 17:37:32 +00:00
Samuel Ghinet
616c53d0e6 QmlDesigner: Make textures updatable
Fetch the new textures from the remote server

Also, disabled tst_qml_wizard, for now.

Task-number: QDS-9607
Change-Id: I35081b90afadddff8d8c4b32da8bed82996304cd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-02 19:46:33 +00:00
Mahmoud Badri
fcf3370202 QmlDesigner: Prevent scrolling when a section's context menu is open
Fixes: QDS-9619
Change-Id: Ic278cda058b179bfed08b2ce6e2def7ca9131d69
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-04-18 10:41:25 +00:00
Samuel Ghinet
dbf91a8f03 QmlDesigner: Fix Material download not showing any progress
Also, now delayed the finish part by 200ms so that 100% progress would
be visible to the user.

Task-number: QDS-9562
Change-Id: Ie8f87ff70770b206256d4dbf0c08227723067eeb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-31 07:26:45 +00:00
Samuel Ghinet
129153e663 QmlDesigner: Allow user to download multiple textures at once
Task-number: QDS-9224
Change-Id: Ia1ec8f8b0951e8dd31d47f64509d39137cdeaa41
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-30 12:26:36 +00:00
Samuel Ghinet
b9b2121ae1 QmlDesigner: Show a placeholder text in the Content Library when empty
When QDS starts for the first time, and there is no internet connection
(to download the materials bundle and the textures bundle), tell the
user that the problem might be the internet connection.

Task-number: QDS-9539
Change-Id: I81311bf00c830b76019e0edb53eeb980362a1339
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-30 09:12:28 +00:00
Mahmoud Badri
0b79db5c17 QmlDesigner: Close section's context-menu on view focus out
When clicking outside any view that has sections and a section's
context-menu is visible, it is now closed.

Fixes: QDS-9564
Change-Id: I73cd3a9754c5a18360427525a2a943c2c549e83f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-03-30 07:31:24 +00:00
Samuel Ghinet
77720c1122 Download textures and materials only by clicking the download icon
Previously, clicking the texture thumbnail itself would start the
download.

Also, improved the look of the download icon:
* added a margin to the right
* the inside "arrow" is now black, instead of transparent

Task-number: QDS-9398
Change-Id: I58f958493f1c6072a57402288ea155135909e117
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-27 17:59:05 +00:00
Tim Jenßen
feabda3aa7 Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at:
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
2023-03-26 16:26:18 +02:00
Samuel Ghinet
98be6d289f Make Content Library Materials downloadable
Task-number: QDS-9267
Change-Id: Ib4da1871cd1d9f0bf52323793b7d8d1b028ae170
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-21 12:30:31 +00:00
Miikka Heikkinen
15ebc22aeb QmlDesigner: Allow setting Section category
Section collapse all and expand all functionalities are controlled via
a singleton instance. Since multiple views are now sharing QML engine,
they also share this controller singleton. Therefore it is necessary
to allow user of the Section to specify which category the section
belongs to, so that invoking expand all from one view doesn't
expand sections in another view, but only sections in the same
category.

This also allows fine tuning which sections are grouped within a view,
which was not possible previously.

Fixes: QDS-9248
Change-Id: I0a1c870e6746580255a02f91d590eb80ce6ebcbe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-13 08:34:54 +00:00
Mahmoud Badri
a0df1fd61a QmlDesigner: Allow changing downloaded textures path
For now changing the path triggers the "restart needed" dialog. Some
refactoring (for future) is needed to make the change works right away.

Also added few missing ContentLibraryBackend uses.

Fixes: QDS-9233
Change-Id: I3a576d397b0452a70d9940edaaa38193c41af347
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-09 11:47:01 +00:00
Mahmoud Badri
e3b37edb15 QmlDesigner: Fix adding bundle material from context menu
Was broken by 57448021b8

Change-Id: Id4822b75038dadac6c898191bce2b4f60de79232
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-09 09:30:39 +00:00
Thomas Hartmann
fb685307f9 QmlDesigner: Use StudioQuickWidget in content library
The event filter has to be installed on the actual QQuickWidget.
Using registerPropertyMap instead of global context properties.

Task-number: QDS-9124
Change-Id: I148ecc6b489f6d72d80a345aa195f74676a92d51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-09 08:10:12 +00:00
Miikka Heikkinen
333ebb5bc2 QmlDesigner: Fix content library textures tooltip width
Width calculation didn't account for possible status text.

Change-Id: I58378a2dd185ea9ad47459ce107c1c227c2f6fd8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-07 14:24:47 +00:00
Miikka Heikkinen
9a55bb0fd0 QmlDesigner: Take content library texture metadata file in use
Metadata file texture_bundle.json will be included with bundle icons,
and it contains details about the texture (format, dimensions, and size)
that are useful to know before downloading the texture.

Metadata is used to generate proper tooltip for non-downloaded textures
in content library.

Also removed default suffix from displayed filename in case metadata is
missing, as it was misleading.

Fixes: QDS-9230
Change-Id: Icbe0bbb7f1e663e0adc41d379231b7f41dc79e31
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-06 12:22:54 +00:00
Samuel Ghinet
6c8d75e690 QmlDesigner: Fix textures becoming misaligned in a search
When doing a search, some textures appeared misaligned. This was caused
by the fact that the "invisible" (i.e. hidden) textures had their Image
set correctly as invisible but the delegate itself remained visible.

Task-number: QDS-9234
Change-Id: Ia2cd6f4f6795bb435567b8915e770b78461babed
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-23 09:55:00 +00:00
Henning Gruendl
5c9758a104 QmlDesigner: Fix SearchBox resizing
Task-number: QDS-9235
Change-Id: I8802582f5a1574961dfbffdb599b1e10192bc196
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-02-22 15:01:30 +00:00
Samuel Ghinet
f45080e619 QmlDesigner: Don't show the context menu for not-downloaded textures
Task-number: QDS-9227
Change-Id: I1f0c147e2dfd69bee9da0872b15d796741b57609
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-21 12:41:46 +00:00
Samuel Ghinet
bf61be5cc0 QmlDesigner: Allow texture download only via left mouse button
Previously, the user would have downloaded the real texture even when
clicking with the right mouse button.

Task-number: QDS-9226
Change-Id: I4040cda4a8c541edc12b4bfe821a09c76eb7efc4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-21 12:38:48 +00:00
Samuel Ghinet
87f76d9bfa QmlDesigner: Fix downloading textures no longer working after some clicks
A "locking" mechanism was implemented to prevent multiple textures from
being downloaded at the same time. However, there was a mistake made,
which made it so that when a texture that had already been downloaded
was clicked again, this locking would be enforced and not released.

Also, fixed minor issues:
* The download button now has a black outline, so as to better
distinguish it inside black-and-white textures
* Canceling the download of a texture no longer marks the download as
failed -- it should show it as if the download was never attempted.
* Fixed tooltips not showing the texture size for downloaded textures
- and now we also update the tooltip text after the real texture has been
downloaded.
* Always creating the "target path" in the FileExtractor, if it does not
exist -- this is different from the "target folder" name, which is an
folder that can optionally be created inside this "target path"

Task-number: QDS-8664
Change-Id: Ieac0e81a5595a8bff3d1aa7ff6252e16c2509c2e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-02-21 11:47:01 +00:00
Samuel Ghinet
1a6cc6fa5e QmlDesigner: Make ContentLibrary textures downloadable
At this point the textures_bundle is still required, but only because
of the icons of the textures. Also, some changes should be done for the
visuals of the downloading.

Also, did a fix in FileDownloader: In case the URL given does not look
to be an image file, we should cancel the download instead of treating
it as a zip archive--it can be that eg we were redirected to a sign-in
page and we don't want to download the content of the page and save it
as a zip file.

Task-number: QDS-8664
Change-Id: Iec40e540c116030288df76e1922eab56ba323d1e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-02-20 12:28:44 +00:00
Henning Gruendl
fbb79bb4e4 QmlDesigner: Fix SearchBox related QML toolbars
Change-Id: I88962fe48acd4345c29233cb00f72ec2ac6b6ca9
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-02-15 10:59:03 +00:00
Brook Cronin
28bb9d7d72 QmlDesigner: Add toolbar to content library
Change-Id: I28045fdd0346ad08d9636c25c3942a3facaf00fe
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-02-13 10:50:18 +00:00
Mahmoud Badri
ce1092ea50 QmlDesigner: Fix content library autoscrolls after drag-n-drop
Fixes: QDS-8711
Change-Id: I1ca399928a299d4917814bf651a8291b981f0f32
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-07 11:56:26 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Mahmoud Badri
e4af787ff6 QmlDesigner: Add image info to content library texture tooltip
Fixes: QDS-8489
Change-Id: I1afbf91ad12839cc93a46f0a608ab3bda135b76b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-20 11:29:30 +00:00