summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* QmlDesigner: Fix crash in material browserqds/v3.5.0qds-3.5Miikka Heikkinen2022-06-281-0/+3
| | | | | | Task-number: QDS-7191 Change-Id: I9542a227aeb3f462ff3572e9a07a7473f98bfa61 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix crash on mode changeMiikka Heikkinen2022-06-272-1/+8
| | | | | | | | Added model pointer validity checks into a few places. Fixes: QDS-7191 Change-Id: I94beb134f4d9a0b1c7fc9dc87da1d02ad255beaa Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* update fixed version of icon fontBrook Cronin2022-06-241-0/+0
| | | | | Change-Id: Iedf945b3718d4df245e24ac1ba756b20f6ed9cf1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Only remove node with positionThomas Hartmann2022-06-242-3/+29
| | | | | | | | Extending the test case. Change-Id: I37255de763262e069c2f9d30b1ce584a0347fbcf Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Create material library at import changeMiikka Heikkinen2022-06-231-0/+3
| | | | | | | | | | There are still rewriter issues with Qt5, where component library templates for models contain materials, so create material library when quick3d import is added to ensure we never need to create it when models are added. Change-Id: I7006a39228d316dbfd84f49d19c025bb42b6765c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Unify the background of 3D preview imagesMiikka Heikkinen2022-06-238-55/+51
| | | | | | | | | | | | | | | | Added 3D checkerboard floor on all 3D previews. Since shadows generally look bad for arbitrary 3D scenes, and would mostly be obscured by the model itself as we want the light mostly from the front, removed shadows also from the material preview to unify the previews. Qt5 had issues rendering the 3D floor texture, so used a static image there, as Qt5 only generates previews of one size. Fixes: QDS-7078 Change-Id: I74d094878ed01e6e531ad60df1f8d9d7cf415860 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Remove duplicate assertMiikka Heikkinen2022-06-231-1/+2
| | | | | | | This assert was redundant, leading to duplicate warnings if triggered. Change-Id: I59b6a7c17345a2ccba0d51ef50a303eec2026422 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Tweak 3D asset import dialog layoutMiikka Heikkinen2022-06-231-2/+2
| | | | | | | | | | On some font scalings, spinboxes were too tight, especially when there was just one row of options showing, so increased the row height and tweaked layout margins a bit. Fixes: QDS-7186 Change-Id: I0650ab976d96f27fc9cf606c4faa6fa2d7c5e8f4 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix hover color for ButtonRowHenning Gruendl2022-06-221-1/+1
| | | | | | | | | | | | Use the default background color for ButtonRow buttons on global hover. This needs to be done to distinguish between hover and global hover on ButtonRow buttons as we unified the two colors as an attempt to make the UI a bit less noisy. Change-Id: I63f9c730367e9b906a772a63210c7ca548647352 Reviewed-by: Brook Cronin <brook.cronin@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Create transitions with proper versionsThomas Hartmann2022-06-221-43/+47
| | | | | | | | | The versions were hard coded which leads to issues. Task-number: QDS-6760 Change-Id: I94c3599348b996bb700da636cd63e74ea4c02be6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add createModelNode without explicit versionsThomas Hartmann2022-06-222-0/+9
| | | | | | | This makes it easier to create properly versioned ModelNodes. Change-Id: I2a81021daa5e57af6740e447826124f1554a2c78 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Show metainfo when node is created in debugviewThomas Hartmann2022-06-221-1/+3
| | | | | Change-Id: Id377b3e29f0a953a206dc3aa08008bb87f12bf0a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Ensure material lib node exists on project launchMahmoud Badri2022-06-224-32/+34
| | | | | | | | | | | | | | | In this commit material library node is created on model attach. A timer keeps monitoring until it is suitable to create the node. This will properly move materials into material library for projects created with previous QDS versions. Also removed unnecessary handling on new material dragging, as rewriter now works properly with material library creation. Fixes: QDS-7178 Change-Id: Idf6f41906e02bc064961d8de9841ba1644bd3552 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Use single transaction to move items into a layoutThomas Hartmann2022-06-221-6/+3
| | | | | Change-Id: Ic8eb3907d06843e7ad0d7b0117154b0b7a987808 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Support reparenting to new nodes in transactionsThomas Hartmann2022-06-225-2/+108
| | | | | | | | | | | | When we reparent to a new node that was created during the same transaction, then this node has no position. In this case we have to delete the reparented nodes and they will be created as part of the creation of the new node, since they are children. Change-Id: Icd1d02f29f529fc0f00809f7ecebf3eabfdc9a5c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Reduce number of preview requests from material editorMiikka Heikkinen2022-06-221-1/+8
| | | | | | | | | | | Removed preview request call from setValue, as it is called in long loops during initial project load and added the calls outside those loops where they already weren't there. Fixes: QDS-7175 Change-Id: Ia83814a0de6fe801d954373dc8ce0e4920e8a6a6 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix material editor/browser textsMiikka Heikkinen2022-06-223-6/+9
| | | | | | | Fixes: QDS-7083 Change-Id: Ib4a5269e275c7811a5645bbff54e3b0ec95ec302 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Show IconButton tooltip also when button is disabledMiikka Heikkinen2022-06-221-5/+10
| | | | | | Fixes: QDS-7076 Change-Id: If412827e22c6f71a9f073d1c868dcdb325870c1d Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Improve puppet reset handling in material browserMiikka Heikkinen2022-06-222-18/+24
| | | | | | | | | | | | | Ensure just one reset call for cases where multiple materials are added at once, and detect reset completion from root instance completion notification instead of reset trigger notification, as it comes later and catches all puppet reset cases. Fixes: QDS-7119 Change-Id: I99baa718bd1c85b4581f07ce75193213110e8e96 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Add some delays to material browser refreshingMiikka Heikkinen2022-06-221-2/+15
| | | | | | | | | | | | | Import change causes puppet to reset, so bit of delay is needed there before triggering material browser refresh. Also added similar delay to refresh done at model attach as it seems puppet reset can sometimes be triggered after attach as well. Fixes: QDS-7172 Change-Id: I47f7af54e55af074fb2b9e8cdb9e78fb051a16cc 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>
* QmlDesigner: There can be also document messages from the puppetThomas Hartmann2022-06-211-1/+1
| | | | | | | We have to check if the rewriterView()->errors() are actually empty. Change-Id: Icbcc82aa9229078fd51c975e48de3e1f06c29f4d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Fix crash for dangling targetMarco Bubke2022-06-211-1/+1
| | | | | | | | | It can be that the target is a dangling pointer. Task-number: QDS-7134 Change-Id: I51b7c9109b0f9193c31ee645144e2a24d1244ba9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Install busy handler for every database accessMarco Bubke2022-06-211-2/+2
| | | | | | | | | | Even for pragma changes the statement can be getting busy. To prevent any exceptions in that case we set the busy handler directly after opening the database. Change-Id: Id10aab20d812d5224f8031fa895c396762858fdf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Make inErrorState() privateThomas Hartmann2022-06-214-5/+5
| | | | | | | | | This method should be only for internal use, since it is different from errors.isEmpty(), because the rewriter is only inErrorState if parsing/rewriting fails, not if there is a semantic error. Change-Id: Ib021e5e80750a4edcb4661755e85e6880fd6617c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Fix FontComboBox drag'n'dropHenning Gruendl2022-06-211-3/+5
| | | | | | | | | | * Fix URL schema to also work under macOS * Avoid setting font name and further processing if error during font loading occurred Change-Id: I9d07a3daad8f7c8c464422b0cf3f94d61e4b231d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add a wizard for a ui.qml .qml file pairThomas Hartmann2022-06-215-0/+170
| | | | | | Task-number: QDS-5963 Change-Id: I16ee8361779f11ca2f24f35877869f3e83279d10 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix test buildChristian Stenger2022-06-171-2/+1
| | | | | | | Amends 50aadacb6e670. Change-Id: If6cd7a1fc4df380693f3c4deee8791ed9863672a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Parse material library on model attachMahmoud Badri2022-06-172-2/+13
| | | | | | | | | | | Parsing has to happen so material in an old project are correctly appearing in the material views. Using a timer to wait until it is ok to create the material editor node. Otherwise errors happen. Change-Id: I54b532211f8a865c5183fab0fd8c12e5f15b983a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Detect asset drag'n'drop support based on property typeMahmoud Badri2022-06-162-3/+9
| | | | | | | | | | | Handle property support for asset drag based on property type rather than name in order to support properties with any name (like lightProbe). Change-Id: I20fd422119db96aebd505b47888c97f0d94bf7f9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Reset puppet when material is addedMiikka Heikkinen2022-06-164-8/+26
| | | | | | | | | | This is workaround for material rendering issues in quick3d when a material is shared by multiple windows. Fixes: QDS-7096 Fixes: QDS-7118 Change-Id: I64fe2e51c5dda8e238502e5d926b6938b7b0731a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Ensure materials render properly after puppet resetMiikka Heikkinen2022-06-162-1/+42
| | | | | | | | | | | This is a workaround for quick3d issue QTBUG-103316, where material library materials for editor are properly initialized only if the first encountered View3D in the scene is also rendered first. Fixes: QDS-7084 Change-Id: I8bb6a8e6bfe2fcffddfe86f92157d386fdf4095d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QDS Editor 3D: Allow the user to select (and reset) the color of grid linesSamuel Ghinet2022-06-1622-128/+286
| | | | | | | Task-number: QDS-7122 Change-Id: I686269e61b53bd5e3d5d1225376930612d869072 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Fix occasional creator side crash related to puppet resetMiikka Heikkinen2022-06-131-1/+1
| | | | | Change-Id: Iee032937b89b8ffcaa012c21b7cac029e1b286cf Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Use changed properties to update 3D previewThomas Hartmann2022-06-131-4/+4
| | | | | | | | | EffectReference is always dirty and it is the only dirty flag. Instead, we update now if any property changed. Task-number: QDS-7079 Change-Id: I157cf2d3b15120c33f4a6b3f53e526d555c7f80c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Do not apply smooth rendering if root is a 3D nodeThomas Hartmann2022-06-131-5/+5
| | | | | | Task-number: QDS-7136 Change-Id: I5260153b8d6131160a8d4b67418e81c6f6e4d862 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Apply root item transform in Node component previewsMiikka Heikkinen2022-06-104-6/+6
| | | | | | | | | When generating a preview from a component with a 3D node for a root, the root Node transform is now applied when calculating camera zoom. Fixes: QDS-7131 Change-Id: I73054a09b3e82868c999ef6f9797dc941e625b33 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Queue puppet processes during importMiikka Heikkinen2022-06-103-90/+103
| | | | | | | | | | On some systems launcing multiple simultaneous import processes causes imports to fail. Fixed by only launching single process at a time and queuing the rest. Fixes: QDS-7107 Change-Id: I330c5920dcbd74d3b4f2e7f40899795a4fbaf3ac Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add option for smooth rendering in form editorThomas Hartmann2022-06-107-4/+38
| | | | | | | | | | | | | | | | Smooth rendering turns on MSAA and doubles the resolution for rendered items. With this option enabled everything stays smooth when zooming in. Around factor 8-10 pixels become clearly visible again, but it still looks relatively smooth. I added both MSAA and increased the resolution to one option, for simplicity. The smooth mode takes 4 times the shared memory, which should not be an issue in most cases. For now, the option is not the default. Task-number: QDS-7129 Task-number: QDS-7128 Change-Id: I8a778650bb40f8ba796960db9bc966e8a1efff4e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Doc: Add documentation for Material Editor and BrowserMats Honkamaa2022-06-1011-166/+278
| | | | | | | | | - Add Material Editor and Browser docs - Reorganize and edit current materials docs Task-number: QDS-6991 Change-Id: Ibea128dc48c0c2e167abf36e7700d4516673b45b Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Do license check only onceThomas Hartmann2022-06-091-1/+18
| | | | | | | | | We should only make the license check once. An evaluationLicense is handled as enterprise license. Change-Id: Ib4b53795a7d735c10b5238f1e7b76346a9bcc8e1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Fix templateThomas Hartmann2022-06-091-0/+1
| | | | | | | | Add missing '}' Task-number: QDS-7125 Change-Id: I7ecf80d681de0400368e28b98179488db560381e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add drag'n'drop to PropertyEditorViewHenning Gruendl2022-06-0815-43/+191
| | | | | | | | | | | | | * Implement drag and drop for UrlChooser and FontComboBox * Change the style of controls accepting drag payload and drag hovering. Utilize states for those styles. * Fix aspect ratio of drag pixmap * Fix issue that causes drag to continue after pressing the escape key Change-Id: I5cf67175abe936e60e8af00fa8c2f7a2dec355b3 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Add tooltips to UrlChooserHenning Gruendl2022-06-0823-57/+682
| | | | | | | | | | | | | | | * Add tooltips with thumbnails to UrlChooser enable preview of image formats and meshes * Add property editor image provider which makes use of the image cache * Add mesh image cache collector in order to create thumbnails for meshes and built-in primitves * Fix typo in explicit image cache image provider * Add return value in time stamp provider if provided file does not exist Change-Id: I2290d2ace87ddd90e9899e343f2ad1ecd2993fdf Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Change FileResourcesModelHenning Gruendl2022-06-084-57/+115
| | | | | | | | | | Change FileResourcesModel to have one list of FileResourcesItem with properties absoluteFilePath, relativeFilePath and fileName instead of having two separated lists. Change-Id: Ib4b4884a6739658434844d2adb9c05c3871104e7 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QmlDesigner: Fix node component missing state propHenning Gruendl2022-06-081-1/+1
| | | | | | | | | | | Fix node components not showing the states property in the property editor. This is caused by querying majorVersion instead of majorQtQuickVersion. Task-number: QDS-6981 Change-Id: I0a87d921ce985f7fd58b92f526531c49622bb235 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Clang Format: Fix misplaced cursor after undoArtem Sokolovskii2022-06-081-1/+1
| | | | | | | | | | | | | | Fixed behavior, when after undo function cursor, jumps to the start of a file. Join the undo block generated by auto format with the last available undo block. This will place the cursor at the last edit position instead of the document beginning when triggering undo. Fixes: QTCREATORBUG-27608 Change-Id: I1bb630af00e997ac53f178594445293ceebcfa26 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* QmlDesigner: Update QDS version in templateThomas Hartmann2022-06-081-1/+1
| | | | | Change-Id: I0bfbd469d49568ec2be0b6b936c46bbc9160fbcb Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Make text label visible in 3d wizardThomas Hartmann2022-06-081-6/+7
| | | | | | Task-number: QDS-7054 Change-Id: I44a2d01c799b619b553c6b1e76c003324e7b80ba Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: add new timeline animation iconBrook Cronin2022-06-081-0/+0
| | | | | | Change-Id: I69efb2ed5a56fbf1848d00963ae70002f11b2e75 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* QmlDesigner: Ensure material library is created when neededMiikka Heikkinen2022-06-079-145/+144
| | | | | | | | | | | | | | | Added material library accessor to AbstractView, which creates the material library and moves existing materials under it in case it doesn't yet exist. Also added material assignment function to AbstractView. The reason these were added to AbstractView instead of being handled e.g. via custom notification in material editor is that they need to be called from multiple different views in the same transaction that triggers the need of material library. Fixes: QDS-7081 Change-Id: If2bb884f87d04c9f3599c2342df66ef51ec238ee Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>