Commit Graph

32 Commits

Author SHA1 Message Date
Mahmoud Badri
d5ea5cabe4 QmlDesigner: Fix 'add to selected' gone from conent lib materials
Fixes: QDS-13125
Change-Id: I58737e8138579ed15166cefdfad05b11269a80da
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-28 11:44:32 +00:00
Mahmoud Badri
e574ba97f1 QmlDesigner: Fix bundle material json file donwload path
Also small renames to add clarity.

Fixes: QDS-12998
Change-Id: I1b38fa501bcc606f13675a98c5543709d15ac615
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-24 12:19:46 +00:00
Mahmoud Badri
de5a3b696d QmlDesigner: Refactor out ContentLibraryMaterial from user bundle
Some tweaks and refactoring to get rid of ContentLibraryMaterial in the
user section of the content library. The end goal is to unify the code
for handling all Qml components in the user section (materials, 3d
components, effects, 2D components. etc).

Change-Id: I99d4fb64dae0b52265994ce478525e574e4bc658
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-06-11 12:14:14 +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
c8215e986d QmlDesigner: Reload bundles when id change
i.e. when opening a project that has a different import folder style
from the currently open project.

Fixes: QDS-12639
Change-Id: I8d341c38ec771dc5e28c4436cd9ad191e27c38a8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-05-02 12:13:10 +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
Miikka Heikkinen
6cc8c13c7c QmlDesigner: Tweak generated components folders
Old type names were too long, shortened various names:
"GeneratedComponents" -> "Generated"
"ComponentBundles" -> "Bundles"
"MaterialBundle" -> "Materials"
"EffectBundle" -> "Effects"
"UserMaterialBundle" -> "UserMaterials"

Fixes: QDS-12629
Change-Id: I3a49e57bbc8d401cadd8c5de6648c7229579d2b2
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-04-30 12:13:10 +00:00
Mahmoud Badri
25f8081032 QmlDesigner: Refactor update bundle imported state
Remove the useless round trip from model to view and back

Change-Id: I38a5826e165014f64d7855139b58e9691b0f6310
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-29 14:38:59 +00:00
Mahmoud Badri
af6dcb6659 QmlDesigner: Remove "Internal" namespace from the bundle importer
Change-Id: If082d7fe724b6db2aaad8c1a6bf56f68bbbb3baf
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-29 14:16:22 +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
b0b1542814 QmlDesigner: Use QJsonValueConstRef instead of auto
This used to not build on linux. Doesnt seem the case anymore.

Change-Id: Ia58d388bfe4f5cc794b29f8e25a9a8d6b3f229c3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-04-26 13:23:32 +00:00
Mahmoud Badri
ccf0a68c42 QmlDesigner: Fix bundle material instance not removed
after removing a bundle material from project

Fixes: QDS-12527
Change-Id: I72b4d99d15a6fbd454d45bdf0ba1a1b469e1a5bb
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-04-26 10:20:17 +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
Miikka Heikkinen
eae76dedff QmlDesigner: Change asset import path
The only import path should be project root, so change things that
are generated under asset_imports to be generated in new folder
GeneratedComponents under project root. GeneratedComponents is prefixed
to the type names of generated items as well.

If project already contains asset_imports folder, then old location is
used.

Fixes: QDS-12430
Change-Id: I7a419fe1c5411e3d39bf3c1e659df0043c60ba33
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-04-11 12:52:27 +00:00
Jarek Kobus
ff1aa20892 QmlDesigner: Fix remaining C++20 warnings about [=] captures
Change-Id: Ia54208e5e72016f6ca22e0b005d479aac8f49929
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-07 11:20:13 +00:00
Tim Jenssen
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02:00
hjk
9679412a23 Replace QFile::exists by QFileInfo::exists
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.

Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-01 10:24:31 +00:00
Marco Bubke
344c33c247 QmlDesigner: Remove NodeMetaInfo::typeName() usage
The project storage is using the imports of a document to get the type.
So it is not using qualified types and gets the version from the imports.
After we switch all three methods will be removed.

Task-number: QDS-10266
Change-Id: Ic127a3bb6bd6f559457b3ce6a8631774359259a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-08-17 11:55:04 +00:00
Mahmoud Badri
977facbbda QmlDesigner: Update content library models when visibility change
...instead of resetting the model. This prevents downloading materials
and textures from getting interrupted and is more efficient
performance-wise.

Fixes: QDS-9654
Change-Id: Id15a86c43ba06aa07071229259b9ea163979b619
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-06-26 07:23:39 +00:00
Marco Bubke
278d69df4f QmlDesigner: Fix deprecated function calls
count() -> size()
userType() -> typeId()
type() -> typeId()

Fixes: QTCREATORBUG-29237
Change-Id: Ic63b79f6fab1f6ed5227d97aa12dcbfdebb4f05f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-06-07 11:31:25 +00:00
Samuel Ghinet
84f75a7ffb QmlDesigner: Fix materials download path not using the configured path
In Preferences, the User can configure the download path for bundles.
However, this configured the path only for the textures, while the
materials kept using the hardcoded path.

Task-number: QDS-9622
Change-Id: Id4ac82f899542eac5c2ce9cc51053113327aef2c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-05-03 12:20:53 +00:00
Samuel Ghinet
a59cf942e0 QmlDesigner: Fix materials & textures not shown when internet is down
If internet is down, or, for some reason, the URLs are inaccessible,
then we should still show the existing materials and textures.

Task-number: QDS-9582
Change-Id: Ic9516c7bc00a37d1c3cd31643749f51a217bf317
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-29 15:26:15 +00:00
Mahmoud Badri
38cf58d0ca QmlDesigner: Emit changed signal after updating m_matBundleExists
Fixes: QDS-9516
Change-Id: I905aff3a526d913d3eb56ae556cbebd7d7e67c5b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-28 09:24:20 +00:00
Samuel Ghinet
2081d1c0bc Download icons and metadata of textures at startup
Task-number: QDS-9397
Change-Id: If1bb4a5500896b70b4a9dbb82d2122c1232ee744
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-27 17:58:53 +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
Marco Bubke
c738305989 QmlDesigner: Fix compilation error
There was an unused parameter.

Change-Id: I50e727a2c7152d730660f63a9f2aa43718ae1e4a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-21 14:39:24 +00: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
Tim Jenssen
eb16c66552 QmlDesigner: adjust content library paths in .app bundles
Change-Id: I7109b25097d061dbbbc8828273b5d0acfe94bf3c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-06 10:07:41 +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
Miikka Heikkinen
57448021b8 QmlDesigner: Fix content library visibility logic
Also fix enable logic of context menus in content library.

Fixes: QDS-8446
Change-Id: I82f80779f507aa5336ebafac5cffc36365238fc5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-02 08:19:56 +00:00
Mahmoud Badri
072bdb22fc QmlDesigner: Update isEmpty state upon content library load
Change-Id: Ibb26294efac90e177f5e4f691609a95f6a181475
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-30 19:12:47 +00:00
Mahmoud Badri
d5a7f25e60 QmlDesigner: Implement content library view
Fixes: QDS-8058
Fixes: QDS-8059
Change-Id: I1adfdc7ac15141e010467813ec6e673060269241
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-08 10:04:43 +00:00