aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: Fix some deprecation warningshjk3 days1-1/+1
| | | | | | | | QT_DEPRECATED_VERSION_X_6_1("Use setFontFamilies instead") inline void setFontFamily(const QString &family) { setProperty(FontFamilies, QVariant(QStringList(family))); } Change-Id: I22f48abf783404a80e9d8d604d1ff886c2a55f14 Reviewed-by: David Schulz <david.schulz@qt.io>
* Fix more metatype related deprecation warningshjk8 days7-30/+30
| | | | | | | | QT_DEPRECATED_VERSION_6_0 static int type(const QT_PREPEND_NAMESPACE(QByteArray) &typeName) Change-Id: I6a085c6d370b6d65193dc09d4318765de81a8ce3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix more metatype related deprecation warningshjk11 days5-10/+10
| | | | | | Change-Id: If206b70d263bcdb6d617827fb9cb8fe3214564a1 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Fix some deprecation warning in FormEditorGraphicsViewhjk2024-06-062-5/+4
| | | | | Change-Id: Ic7c7df7fd357bcb3b7500f2fc9bb5b7cb9661ff9 Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
* Fix some random deprecation warninghjk2024-06-063-7/+6
| | | | | | | | | | if QT_DEPRECATED_SINCE(6, 0) QT_DEPRECATED_VERSION_X_6_0("Use position().toPoint()") inline QPoint pos() const { return position().toPoint(); } ... Change-Id: If885b26c8e5f4d68ca1c5c7e4ffc495b0701b210 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix QIcon::pixmap() related deprecation warningshjk2024-06-051-4/+1
| | | | | | | | | QPixmap pixmap(const QSize &size, qreal devicePixelRatio, Mode mode = Normal, State state = Off) const; QT_DEPRECATED_VERSION_X_6_0("Use pixmap(size, devicePixelRatio) instead") QPixmap pixmap(QWindow *window, const QSize &size, Mode mode = Normal, State state = Off) const; Change-Id: I8b08bec86014809887c1915b72c2776bae4a87fb Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Introduce a convenience function creatorColor()hjk2024-05-2915-25/+28
| | | | | | | ... forwarding to creatorTheme()->color(...) Change-Id: Iefaa043495127b3e500ed225584481d3ec0f8c1f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge "Merge remote-tracking branch 'origin/qds/dev'"The Qt Project2024-05-29175-7621/+5778
|\
| * Merge remote-tracking branch 'origin/qds/dev'Tim Jenssen2024-05-28175-7621/+5778
| |\ | | | | | | | | | | | | | | | Conflicts: src/plugins/qmldesigner/CMakeLists.txt Change-Id: I250c8e5284ddb0f335c440999b8920762419c89b
| | * QmlDesigner: Rename user bundles json files to just bundle.jsonMahmoud Badri2024-05-283-9/+11
| | | | | | | | | | | | | | | Change-Id: I23440591083146d9630d0beec8a22efbc5339d35 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * Utils: Add to_underlyingMarco Bubke2024-05-283-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | to_underlying was added to C++23 to get the underlying integer type for an enumeration. Change-Id: Ib7262882a47cf4b060cff428bb10a6a65c089fc5 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| | * QmlDesigner: Fix wild castsMarco Bubke2024-05-284-41/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Never use a cast for a dependency injection. If it can not be null use a reference. Task-number: QDS-12883 Change-Id: Ie63a4968f264587a8781f04fa10048e1a7371e44 Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
| | * QmlDesigner: Use the noexcept interface for optional and unexpectedMarco Bubke2024-05-284-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Optional and unexpected have a interface designed after pointer usage. That cannot throw exceptions. They added continuation too. That is making it harder to make mistakes. Change-Id: Ie9d41a2e69c7467a7e4ac4999825aede1326e529 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| | * QmlDesigner: Use error notifier for prototype and extension type name resolvingMarco Bubke2024-05-282-72/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the prototype or extension has an unresolved id, it needs to be checked, if an exported name belonging to the prototype or extension was updated. In that case the id has to be again resolved. Task-number: QDS-12761 Change-Id: I7a733662cf37e13e8c2db53dec5a4f3e0a9b6ecf Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| | * QmlDesigner: Use id if name is empty when adding a comp to user bundleMahmoud Badri2024-05-281-0/+3
| | | | | | | | | | | | | | | Change-Id: I64082413603310bc84d2b711e9e209fc990d1734 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Return const & fileUrlMarco Bubke2024-05-273-4/+4
| | | | | | | | | | | | | | | Change-Id: I80cf03c53692d5a0593fdc63009df715d8d5e2a5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| | * QmlDesigner: Add look-at gizmo to visualize 3D edit camera look-at posMiikka Heikkinen2024-05-243-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Look-at gizmo can be toggled from visibility toggles submenu. Look-at gizmo is hidden when fly mode crosshairs is visible. Fixes: QDS-12767 Change-Id: I2c71b23f14e403c9774498937764607cfea3bd1d Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesigner: Prevent adding bundle items back to content libMahmoud Badri2024-05-241-17/+24
| | | | | | | | | | | | | | | Change-Id: I65e2eb936fa741599ffd087f903e33a71d01de99 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Improve 3D import dialog logicMiikka Heikkinen2024-05-243-41/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Got rid of the separate accept button. Now the import button turns into accept button after preview is shown, as long as user hasn't changed any options. Import preview is also generated automatically using default options. Fixes: QDS-12822 Change-Id: I5f1080f855cf1ba09e917cef7741534c0fb16d8c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesigner: Confirm overwriting 3d items in content libraryMahmoud Badri2024-05-243-9/+38
| | | | | | | | | | | | | | | | | | Fixes: QDS-12826 Change-Id: I29ee10f670ba38e219375f0217f89809a496f45c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Handle abort reason in PreviewTooltipBackend::showTooltip()Mahmoud Badri2024-05-241-1/+12
| | | | | | | | | | | | | | | Change-Id: Ib71d4e7e2e74d7c8fbcc74188a155a08d610be00 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Allow adding imported 3D components to content libraryMahmoud Badri2024-05-235-14/+80
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QDS-12784 Change-Id: I87edf8f6c14fabb066c85e8536c91b58e439e5d0 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Ali Kianian <ali.kianian@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Allow rotation of 3D import previewMiikka Heikkinen2024-05-234-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3D import preview can now be rotated using left mouse button and dragging the preview image. This causes camera to orbit around the previewed model, similar to rotation to 3D edit view orbit camera. Close/Cancel button logic was also improved. Fixes: QDS-12795 Change-Id: I0c7d1ad28f8fe779b9bedc4bf76be704078d91a6 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesigner: Add project storage error mechanismMarco Bubke2024-05-237-4/+84
| | | | | | | | | | | | | | | | | | Task-number: QDS-12761 Change-Id: If782b5d81b53979033e2738292dedac91e1adcbf Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| | * QmlDesigner: Parse components recursivelyMarco Bubke2024-05-2313-92/+246
| | | | | | | | | | | | | | | | | | | | | Change-Id: I8fa892cce8e34b5e58cbdde04c57e30b9fc74866 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
| | * QmlDesigner: Remove the optional func param from Model::generateNewId()Mahmoud Badri2024-05-232-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not needed anymore after using UniqueName class. Change-Id: I252659376af7e8aaf5e4642f9b9bfd2c57cc19fb Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
| | * QmlDesigner: Remove Model EditorAli Kianian2024-05-2234-5245/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QDS-12808 Change-Id: I9d1a716cda8d4a972b335270961ee7b489ed07c3 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesigner: Convert UniqueName keywords to array of stringviewsMahmoud Badri2024-05-216-46/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also change the class to namespace, rename "get" to "generate" and add unit tests. Change-Id: Ib52bf7e3e0110e33acb40ca6e3d9bfc61cefdca0 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| | * Show 3D import previewMiikka Heikkinen2024-05-2112-64/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show preview of 3D import in item library import dialog when importing a single 3D asset. Fixes: QDS-11111 Change-Id: I13135be1e931cbee034ca8a89654c0827b937bdf Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
| | * QmlDesigner: Fix double deletion of rewriter actionsMiikka Heikkinen2024-05-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Actions were deleted after being inserted into actionsToRemove, which caused them to get deleted again, leading to crash. Change-Id: If6597f117859ca92cfc5af67c730e2f84e5c0639 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
| | * QmlDesigner: Remove Model::generateIdFromName()Mahmoud Badri2024-05-2013-212/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added UniqueName::getId() - Cleaned up generateNewId() and made it use UniqueName::getId() - Moved UniqueName to designercore Also reversed how the predicate of UniqueName::get() works. Change-Id: I89c50f7d80610243f56be165b1495ef428da457c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * Allow scene environment as background for non-View3D scenesMiikka Heikkinen2024-05-203-31/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For non-View3D scenes, the environment from the previous View3D is used. Fixes: QDS-12398 Change-Id: I6adc82cd0205ebe443b5834d9bb0f4906e2cd009 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
| | * QmlDesigner: Hide bundles from the components viewMahmoud Badri2024-05-164-43/+53
| | | | | | | | | | | | | | | | | | | | | | | | Also few relevant tweaks. Fixes: QDS-12680 Change-Id: I3d552d9de2d92c0501c7b05d626cad84e3688dc9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Fix compilation errorMarco Bubke2024-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ia49491a7deae085460fe4498cbcc6727cc10db7b Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Ali Kianian <ali.kianian@qt.io>
| | * QmlDesigner: Update 3d user bundle imported state on loadMahmoud Badri2024-05-141-0/+1
| | | | | | | | | | | | | | | | | | Change-Id: I8df19486523cfd25db832ed78f0792095548dfea Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
| | * QmlDesigner: Prevent adding component materials to the content libMahmoud Badri2024-05-148-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * QmlDesigner: Fix crash on exitMarco Bubke2024-05-141-1/+2
| | | | | | | | | | | | | | | | | | Change-Id: I26f3c1154d8cdef9cf76b6f608634067b099ea0e Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesigner: Don't override existing content lib user texturesMahmoud Badri2024-05-141-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Better solution to ask for overriding or not is for the future. Fixes: QDS-12626 Change-Id: Ib147121d3b9cb783f45a79a96fa432d371750a0e Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Use reverse iterators to support qualified scopesThomas Hartmann2024-05-141-1/+1
| | | | | | | | | | | | | | | Change-Id: I88a4dcbff7a50f399b81a948f273e9cf9e36782d Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| | * QmlDesigner: Handle content library user items empty stateMahmoud Badri2024-05-145-93/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
| | * QmlDesigner: Add UniqueName::getpath()Mahmoud Badri2024-05-144-25/+52
| | | | | | | | | | | | | | | | | | | | | Also relevant tweaks in the same class Change-Id: I59ca0839a28478028b8aa36b9df500f29d831b90 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Use UniqueName util in the assets viewMahmoud Badri2024-05-143-55/+22
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1e27cb55fd1085f36ba8b6b38829baef49040c29 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>
| | * QmlDesigner: Ensure unique content lib user item icon namesMahmoud Badri2024-05-134-128/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also update user materials model to have the improvements done to the 3D model. Also trying to make the 2 mdoels as similar as possible to make it easy for further future refactoring. Change-Id: I5a32e1dcd7919bdf3cb638b068b0cdb5d4afecd9 Fixes: QDS-12736 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Use GeneratedComponentsUtils in Model EditorAli Kianian2024-05-1315-196/+236
| | | | | | | | | | | | | | | Change-Id: I567c746eb098c0c64d590ea7fed71f17de5adc76 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesigner: Add UniqueName classMahmoud Badri2024-05-134-8/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The class is used for generating a unique name anywhere in QmlDesigner codebase. The role of this class is generation of next candidate name when name is not unique. Actual checking of name uniqueness is provided as a function param. Also applied the new UniqueName on 1 usecase in ContentLibraryUserModel::getUniqueLib3DQmlName Change-Id: I777aeef7c269bed7d999695cf5fcee6a5576222b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Enable content lib user 3D context menuMahmoud Badri2024-05-139-63/+134
| | | | | | | | | | | | | | | | | | | | | | | | Also some relevant tweaks. Change-Id: I7bace9ce6bd7b45951cc18f7175b4646251196f0 Reviewed-by: Ali Kianian <ali.kianian@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| | * QmlDesigner: Fix adding keyframeThomas Hartmann2024-05-132-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keyframes were always added on the selected model node instead of the modelnode belonging to the property. Task-number: QDS-12622 Change-Id: Iae44cfecd862d79b14c062854d5f329da595f729 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
| | * QmlDesigner: Allow saving a 3D node to the content libraryMahmoud Badri2024-05-107-33/+188
| | | | | | | | | | | | | | | | | | | | | Fixes: QDS-12393 Change-Id: I3112244bcbe74ea0f8f2eda8ccb6ad7470ca0e1e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
| | * QmlDesigner: Support more json structures in Model EditorAli Kianian2024-05-107-111/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * A visitor is added to detect the property order of the nested json models. * A pure json object is defined as a json which does not contain any array or object as its member. * All of the json lists which has pure models, will be imported. * A pure object which is a child of another object, will be imported. Fixes: QDS-12546 Change-Id: Ib44e1567e3dde0fc5cb433b4f1dc20358e6a3949 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
| | * QmlDesignerProjectManager: prevent crash at destructionMarco Bubke2024-05-082-37/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | found in https://the-qt-company-00.sentry.io/issues/5315357110 Pick-to: qds/4.5 Change-Id: Ie8d7358c246799c5883e52fbdadb6f3a5e2a4359 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>