From 56a4865b2f37e810f656f1f79ea416cac5109d49 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 12 May 2020 12:32:54 +0200 Subject: QbsProjectManager: Fix potential null pointer access We retrieved the watcher result from the wrong pointer. Fixes: QTCREATORBUG-23924 Change-Id: I876d8adc0aef011deb3f5827f3e50c43a8d92dfc Reviewed-by: Ivan Komissarov Reviewed-by: Christian Stenger --- src/plugins/qbsprojectmanager/qbsproject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index b3264dfb59..96efcd1d6b 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -480,7 +480,7 @@ void QbsBuildSystem::updateProjectNodes(const std::function &continuati m_treeCreationWatcher = new TreeCreationWatcher(this); connect(m_treeCreationWatcher, &TreeCreationWatcher::finished, this, [this, watcher = m_treeCreationWatcher, continuation] { - std::unique_ptr rootNode(m_treeCreationWatcher->result()); + std::unique_ptr rootNode(watcher->result()); if (watcher != m_treeCreationWatcher) { watcher->deleteLater(); return; -- cgit v1.2.1 From 795fb5f59db59c2489feaf7ece8a3e18a3a114da Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 7 May 2020 09:24:14 +0200 Subject: Doc: Update info about QML types supported by Qt Quick Designer Update screenshots. Change-Id: If079a93940dc103b4afa283f01c94825d895bfa3 Reviewed-by: Thomas Hartmann --- doc/qtcreator/images/qmldesigner-bindings.png | Bin 3378 -> 4181 bytes .../images/qmldesigner-editing-components.png | Bin 0 -> 34532 bytes .../images/qmldesigner-properties-view.png | Bin 0 -> 29394 bytes .../images/qmldesigner-qml-components.png | Bin 38614 -> 59047 bytes doc/qtcreator/src/qtquick/qtquick-components.qdoc | 83 +++++++++++---------- .../src/qtdesignstudio-components.qdocinc | 9 ++- 6 files changed, 48 insertions(+), 44 deletions(-) create mode 100644 doc/qtcreator/images/qmldesigner-editing-components.png create mode 100644 doc/qtcreator/images/qmldesigner-properties-view.png diff --git a/doc/qtcreator/images/qmldesigner-bindings.png b/doc/qtcreator/images/qmldesigner-bindings.png index c3a90cc3c7..017b22cd23 100644 Binary files a/doc/qtcreator/images/qmldesigner-bindings.png and b/doc/qtcreator/images/qmldesigner-bindings.png differ diff --git a/doc/qtcreator/images/qmldesigner-editing-components.png b/doc/qtcreator/images/qmldesigner-editing-components.png new file mode 100644 index 0000000000..1fe80e23c1 Binary files /dev/null and b/doc/qtcreator/images/qmldesigner-editing-components.png differ diff --git a/doc/qtcreator/images/qmldesigner-properties-view.png b/doc/qtcreator/images/qmldesigner-properties-view.png new file mode 100644 index 0000000000..36c2e9ca15 Binary files /dev/null and b/doc/qtcreator/images/qmldesigner-properties-view.png differ diff --git a/doc/qtcreator/images/qmldesigner-qml-components.png b/doc/qtcreator/images/qmldesigner-qml-components.png index a2b090dd37..46918eee92 100644 Binary files a/doc/qtcreator/images/qmldesigner-qml-components.png and b/doc/qtcreator/images/qmldesigner-qml-components.png differ diff --git a/doc/qtcreator/src/qtquick/qtquick-components.qdoc b/doc/qtcreator/src/qtquick/qtquick-components.qdoc index 3820b01116..ca4a6e6d89 100644 --- a/doc/qtcreator/src/qtquick/qtquick-components.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-components.qdoc @@ -51,14 +51,15 @@ \image qmldesigner-qml-components.png "QML Components" - The \uicontrol {QML Types} tab displays the QML types grouped by category: - your own QML components, basic types, layouts, positioner types, and views. + The \uicontrol {QML Types} tab displays the QML types grouped by category, + such as your own QML components, basic types, layouts, positioner types, and + views. Sets of UI components with the look and feel of a particular mobile device platform have been defined for Qt Quick 1. Since Qt 5.1, ready-made Qt Quick Controls, Dialogs, and Layouts are available for creating user interfaces using Qt Quick 2. The components and controls are based on - standard QML types. To view the components and controls in the + standard QML types. To view the components and controls in \uicontrol {Library}, import the component sets in \uicontrol {QML Imports}. The \uicontrol {Qt Quick Application} wizards for a particular platform add @@ -70,21 +71,23 @@ \section1 Adding Components to Designs - \image studio-design-mode.png "Design mode" + \image qmldesigner-editing-components.png "Editing QML components in Design mode" \list 1 - \li Drag and drop components from the \uicontrol Library (2) to the - \uicontrol Navigator (3) or \uicontrol {Form Editor} (1). - \li Select components in the \uicontrol Navigator to edit their - properties in the \uicontrol Properties view (4). For more - information, see \l {Specifying Item Properties}. + \li Drag and drop components from \uicontrol Library (1) to + \uicontrol Navigator (2) or \uicontrol {Form Editor} (3). + \li Select components in \uicontrol Navigator to edit their + properties in \uicontrol Properties. + \image qmldesigner-properties-view.png "Properties view" + For more information, see \l {Specifying Item Properties}. \li Connect components to signals or create bindings between components - in the \uicontrol Connections view (5). For more information, see - \l{Adding Connections}. + in the \uicontrol Connections view. + \image qmldesigner-bindings.png "Connections view Bindings tab" + For more information, see \l{Adding Connections}. \li Add states to apply sets of changes to the properties of one or - several components in the \uicontrol States view (6). For more - information, see \l{Adding States}. - \li Animate component properties in the \uicontrol Timeline view (7). + several components in the \uicontrol States view. + For more information, see \l{Adding States}. + \li Animate component properties in the \uicontrol Timeline view. For more information, see \l{Creating Animations}. \endlist @@ -136,12 +139,12 @@ When you add a \l{GridView}{Grid View}, \l{ListView}{List View}, or \l{PathView}{Path View}, the ListModel and the delegate component that creates an instance for each item in the model are added automatically. - You can edit item properties in the \uicontrol Properties view or - in the \uicontrol {Text Editor}. You can also replace the default model and - delegate with other, more complex models and delegates in the + You can edit item properties in \uicontrol Properties or in + \uicontrol {Text Editor}. You can also replace the default model and + delegate with other, more complex models and delegates in \uicontrol {Text Editor}. \l{ItemDelegate}{Item Delegate} and \l{SwipeDelegate}{Swipe Delegate} delegate components are also available - in the \uicontrol Library. + in \uicontrol Library. \section1 Positioning Items in UIs @@ -179,7 +182,7 @@ \image qmldesigner-set-expression.png "Type properties context menu" - In the \uicontrol {Binding Editor}, select an item and a property from + In \uicontrol {Binding Editor}, select an item and a property from lists of available items and their properties. \image qmldesigner-binding-editor.png "Binding Editor" @@ -192,7 +195,7 @@ When a binding is set, the \uicontrol Actions menu icon changes to \inlineimage icons/action-icon-binding - . To remove bindings, select \uicontrol Reset in the \uicontrol Actions menu. + . To remove bindings, select \uicontrol Actions > \uicontrol Reset. You can set bindings also in the \uicontrol Connections view. For more information, see \l {Adding Bindings Between Properties}. @@ -227,7 +230,7 @@ (\uicontrol {Reset Anchors}) button to reset the anchors to their saved state. - You can specify the baseline anchor in the \uicontrol {Text Editor} in the + You can specify the baseline anchor in \uicontrol {Text Editor} in the Design mode. For performance reasons, you can only anchor an item to its siblings @@ -340,8 +343,9 @@ \endlist To position several items in a \uicontrol Column, \uicontrol Row, - \uicontrol Grid, or \uicontrol Flow, select the items on the canvas, and - then select \uicontrol Position in the context menu. + \uicontrol Grid, or \uicontrol Flow, select the items in + \uicontrol {Form Editor}, and then select \uicontrol Position in + the context menu. \section2 Using Layouts @@ -353,8 +357,6 @@ You can use the following layout types to arrange items in UIs: \list - \li \l{Layout} provides attached properties for items pushed onto a - column, row, or grid layout. \li \l{ColumnLayout}{Column Layout} provides a grid layout with only one column. \li \l{RowLayout}{Row Layout} provides a grid layout with only one row. @@ -365,7 +367,7 @@ \endlist To lay out several items in a column, row, grid, or - \uicontrol {Stack Layout}, select the items in the \uicontrol {Form Editor}, + \uicontrol {Stack Layout}, select the items in \uicontrol {Form Editor}, and then select \uicontrol Layout in the context menu. You can also click the \inlineimage column.png @@ -374,9 +376,9 @@ (\uicontrol {Grid Layout}) toolbar buttons to apply layouts to the selected items. - To make an item within a layout as wide as possible while respecting - the given constraints, select the item on the canvas and then select - \uicontrol Layout > \uicontrol {Fill Width} in the context menu. To + To make an item within a layout as wide as possible while respecting the + given constraints, select the item in \uicontrol {Form Editor}, and then + select \uicontrol Layout > \uicontrol {Fill Width} in the context menu. To make the item as high as possible, select \uicontrol {Fill Height}. \section2 Editing Stack Layouts @@ -385,7 +387,7 @@ To add items to a \uicontrol {Stack Layout}, select the \inlineimage plus.png - button next to the type name in the \uicontrol {Form Editor}. To move + button next to the type name in \uicontrol {Form Editor}. To move between items, select the \inlineimage prev.png (\uicontrol Previous) and \inlineimage next.png (\uicontrol Next) buttons. @@ -550,22 +552,22 @@ \endif \uicontrol Choose to create a new .qml file. - \note Components are listed in the \uicontrol {QML Components} section of - the \uicontrol Library only if the filename begins with a capital - letter. + \note Components are listed in the \uicontrol {My QML Components} + tab in the \uicontrol Library view only if the filename begins with + a capital letter. \li Click \uicontrol Design to open the .qml file in the Design mode. - \li Drag and drop a QML type from the \uicontrol Library to the + \li Drag and drop a QML type from \uicontrol Library to \uicontrol Navigator or \uicontrol {Form Editor}. - \li Edit its properties in the \uicontrol Properties view. + \li Edit its properties in \uicontrol Properties. The available properties depend on the QML type. \endlist - The following sections contain more information about how to use the + The following sections contain more information about how to use \uicontrol {Form Editor} to edit 2D content, as well as examples of how to create some common components using basic QML types: @@ -582,10 +584,11 @@ \section1 Moving Within Components Components can consist of several other components. To view the component - hierarchy as a bread crumb path when you edit a component on the canvas, - select \uicontrol {Go into Component} or press \key F2. Click the component - names in the path to navigate to them. You can easily navigate back to the - top level when you are done editing the component. + hierarchy as a bread crumb path when you edit a component in + \uicontrol {Form Editor}, select \uicontrol {Go into Component} or press + \key F2. Click the component names in the path to navigate to them. You + can easily navigate back to the top level when you are done editing the + component. \image qmldesigner-breadcrumbs.png "Go into Component command" */ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc b/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc index ad072db594..c9214a35a2 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc +++ b/doc/qtdesignstudio/src/qtdesignstudio-components.qdocinc @@ -44,7 +44,7 @@ independently of each other. \li \l Flipable provides a surface that can be flipped. \li \l Group provides an item with the size property. - \li \l Iso adds a container for an ISO 7000 icon. + \li \l {Iso}{Iso Icon} adds a container for an ISO 7000 icon. \li \l Pie adds a pie slice or a pie with a slice missing from it. \li \l Rectangle adds a rectangle with corners that you can shape independently of each other. @@ -60,7 +60,8 @@ You can use the project wizard to create a starting point for a custom \l [QtQuickControls2] {Button}, \l [QtQuickControls2] {Pane}, - \l [QtQuickControls2] {StackView}{Stack View}, or + \l [QtQuickControls2] {StackLayout}{Stacked Layout}, + \l [QtQuickControls2] {SwipeView}{Swipe View}, or \l [QtQuickControls2] {Switch}. \list 1 @@ -68,8 +69,8 @@ \uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls}. \li Select the control to create, and then select \uicontrol Choose. - \note Components are listed in the \uicontrol {QML Components} - section of the \uicontrol Library only if the filename begins + \note Components are listed in the \uicontrol {My QML Components} + tab of the \uicontrol Library only if the filename begins with a capital letter. \li Edit component properties in the \uicontrol Properties view. -- cgit v1.2.1 From b15e19ac1234e69265f55cce6f418d1c397f64cd Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 12 May 2020 10:05:39 +0200 Subject: Doc: Update screenshot of Properties view in Design mode ...and remove the numbers from the image and text, as one can easily see the item type. Task-number: QDS-2056 Change-Id: I821db7a0f3a4ff1999c58701f379ae3667821a0a Reviewed-by: Thomas Hartmann --- .../images/qmldesigner-element-properties.png | Bin 63003 -> 59796 bytes doc/qtcreator/src/qtquick/qtquick-properties.qdoc | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/qtcreator/images/qmldesigner-element-properties.png b/doc/qtcreator/images/qmldesigner-element-properties.png index 6df75cc67a..18239bdf41 100644 Binary files a/doc/qtcreator/images/qmldesigner-element-properties.png and b/doc/qtcreator/images/qmldesigner-element-properties.png differ diff --git a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc index cdba49811c..78c70b2809 100644 --- a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc @@ -37,7 +37,7 @@ The bottom part of the view displays properties that are specific to each QML type. For example, the following image displays the properties you can - set for \uicontrol Rectangle (1) and \uicontrol Text (2) items. + set for \uicontrol Rectangle and \uicontrol Text items. \image qmldesigner-element-properties.png -- cgit v1.2.1 From b788c70b95b0cca589c68da77fc7dd1ad50dabc6 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 12 May 2020 14:51:44 +0200 Subject: Doc: Update info about States view Check terminology, restructure information, and update screenshots. Task-number: QDS-2056 Change-Id: Ieaa2d0856bf2d310f67d8c0d9f9376a48cf33534 Reviewed-by: Thomas Hartmann --- doc/qtcreator/images/qmldesigner-screen-design.png | Bin 81247 -> 54663 bytes .../images/qmldesigner-states-when-condition.png | Bin 25214 -> 15375 bytes doc/qtcreator/images/qmldesigner-states.png | Bin 61713 -> 34569 bytes doc/qtcreator/images/qmldesigner-transitions.png | Bin 5169 -> 6353 bytes .../creator-only/qtquick-states-scxml.qdocinc | 15 +-- doc/qtcreator/src/qtquick/qtquick-states.qdoc | 107 ++++++++++----------- 6 files changed, 61 insertions(+), 61 deletions(-) diff --git a/doc/qtcreator/images/qmldesigner-screen-design.png b/doc/qtcreator/images/qmldesigner-screen-design.png index 42bb30bb16..ff19977a0f 100644 Binary files a/doc/qtcreator/images/qmldesigner-screen-design.png and b/doc/qtcreator/images/qmldesigner-screen-design.png differ diff --git a/doc/qtcreator/images/qmldesigner-states-when-condition.png b/doc/qtcreator/images/qmldesigner-states-when-condition.png index a26ba37b52..7a1530efb0 100644 Binary files a/doc/qtcreator/images/qmldesigner-states-when-condition.png and b/doc/qtcreator/images/qmldesigner-states-when-condition.png differ diff --git a/doc/qtcreator/images/qmldesigner-states.png b/doc/qtcreator/images/qmldesigner-states.png index 0b2510e6dc..4f1193bfba 100644 Binary files a/doc/qtcreator/images/qmldesigner-states.png and b/doc/qtcreator/images/qmldesigner-states.png differ diff --git a/doc/qtcreator/images/qmldesigner-transitions.png b/doc/qtcreator/images/qmldesigner-transitions.png index 8d7309ddc8..8791133a87 100644 Binary files a/doc/qtcreator/images/qmldesigner-transitions.png and b/doc/qtcreator/images/qmldesigner-transitions.png differ diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc b/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc index ccbc236229..18100dfe36 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-states-scxml.qdocinc @@ -26,20 +26,23 @@ /*! //! [scxml state machines] - \section2 Using SCXML State Machines + \section1 Using SCXML State Machines - To use QML together with an SCXML state machine, add states and bind them to - the state machine in the \uicontrol Backends tab in the Design mode, as + To use QML together with an SCXML state machine, add states and + bind them to the state machine in the \uicontrol Backends tab + of the \uicontrol Connections view, as described in \l {Managing C++ Backend Objects}. - In the \uicontrol States view, you can edit the \c when condition of states + In the \uicontrol States view, you can select \uicontrol Actions > + \uicontrol {Set when Condition} to edit the \c when condition of states to map QML states to the states of the SCXML state machine. For an example, see \l {Qt SCXML Traffic Light QML Example (Dynamic)}. \image qmldesigner-states-when-condition.png - If you add animation to the states, you can run the application to test the - animation. + If you add animation to the states, you can \l{Previewing}{preview} + or \l{Running on Multiple Platforms}{run} the application to test + the animation. //! [scxml state machines] */ diff --git a/doc/qtcreator/src/qtquick/qtquick-states.qdoc b/doc/qtcreator/src/qtquick/qtquick-states.qdoc index d670fb21b5..d3902d34d6 100644 --- a/doc/qtcreator/src/qtquick/qtquick-states.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-states.qdoc @@ -55,56 +55,59 @@ \list \li Show some UI items and hide others. \li Present different available actions to the user. - \li Start, stop or pause animations. + \li Start, stop, or pause animations. \li Execute some script required in the new state. \li Change a property value for a particular item. \li Show a different view. \endlist + \section1 Creating States + The \uicontrol States view displays the different \l{State}{states} - of the component in the Design mode. The \uicontrol States view is - collapsed by default to save space. Select \uicontrol Expand in - the context menu to view the whole view. + of a UI, beginning with a \e {base state}. \image qmldesigner-transitions.png "States view" To add states, click the \inlineimage plus.png - button. Then modify the new state in the editor. For example, to change the - appearance of a button, you can hide the button image and show another image - in its place. Or, to add movement to the view, you can change the position - of an object on the canvas and then add animation to the change between the - states. - - To determine when the state should be applied, select - \uicontrol {Set when Condition} in the menu and specify a - \l [QtQuick]{State::when}{when} property for the state. - Set the value of the property to an expression that - evaluates to \c true when you want the state to be applied. - In the binding editor, select the component and property to - create the expression. For example, to change the state when - a button is pressed, you could select a button component and - its pressed property. - - \image qtquick-states-binding-editor.png "Binding editor in States view" - - You can preview the states in the \uicontrol States view and click them to - switch between states on the canvas. + button. Click the new state to switch to it in \uicontrol {Form Editor}, + and then modify the properties of components in \uicontrol Properties. - \section1 Using States + For example, to change the appearance of a button, you can hide the button + image and show another image in its place. Or, to add movement to the view, + you can change the position of an object in \uicontrol {Form Editor} + and then add animation to the change between the states. + + The properties that you change in a state are highlighted with blue color. + In \uicontrol {Text Editor}, you can see the changes recorded as changes + to the base state. - QML states typically describe user interface configurations, such as the UI - controls, their properties and behavior and the available actions. For - example, you can use states to create two views. + \image qmldesigner-states.png "States and Properties views" - To add states, click the empty slot in the \uicontrol States view. - Then modify the new state in the \uicontrol {Form Editor} or the - \uicontrol Properties view. + \section1 Setting the Default State - \image qmldesigner-states.png "States view" + To determine the startup state of the application, + select \inlineimage icons/action-icon.png + to open the \uicontrol Actions menu, and then select + \uicontrol {Set as Default}. - The properties that you change in a state are highlighted with blue color. - In the \uicontrol {Text Editor}, you can see the changes recorded as changes - to the base state. + To reset the state later, select \uicontrol Actions > + \uicontrol {Reset Default}. + + \section1 Applying States + + To determine when a state should be applied, select \uicontrol Actions > + \uicontrol {Set when Condition}. In \uicontrol {Binding Editor}, specify + a \l [QtQuick]{State::when}{when} property for the state. Set the value of + the property to an expression that evaluates to \c true when you want the + state to be applied. + + In \uicontrol {Binding Editor}, select the component and property to + create the expression. For example, to change the state when a button is + pressed, you could select a button component and its pressed property. + + \image qtquick-states-binding-editor.png "Binding Editor in States view" + + \section1 Using States To keep the QML code clean, you should create a base state that contains all the types you will need in the application. You can then create states, @@ -124,30 +127,24 @@ To create views for an application by using states: + \image qmldesigner-screen-design.png "Designing views" + \list 1 \li In the base state, add all items you will need in the application (1). While you work on one view, you can click the \inlineimage eye_open.png icon to hide items on the canvas that are not part of a view. - \li In the \uicontrol States view, click the empty slot to create a + \li In \uicontrol States, click the empty slot to create a new state and give it a name. For example, \c Normal. - \li In the \uicontrol Properties view (2), deselect the - \uicontrol Visibility check box or set \uicontrol Opacity to 0 - for each item that is not needed in this view. If you specify - the setting for the parent item, all child items inherit it and - are also hidden. - \image qmldesigner-screen-design.png "Designing views" + \li In \uicontrol Properties (2), deselect the \uicontrol Visibility + check box or set \uicontrol Opacity to 0 for each item that is not + needed in this view. If you specify the setting for the parent item, + all child items inherit it and are also hidden. \li Create additional states for each view and set the visibility or opacity of the items in the view. - \li To determine which view opens when the application starts, use the - \uicontrol {Text Editor} to set the state of the root item of the - .qml file, as specified by the following code snippet: - \qml - Item { - state: "Normal" - } - \endqml - \endlist + \li To determine which state is applied when the application starts, + select \uicontrol Actions > \uicontrol {Set as Default}. + \endlist \if defined(qtcreator) \include qtquick-states-scxml.qdocinc scxml state machines @@ -165,7 +162,7 @@ the type of behavior that is required. You can drag and drop the following QML types from \uicontrol Library - > \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to the + > \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to \uicontrol Navigator or \uicontrol {Form Editor}: \list @@ -181,10 +178,10 @@ sequential animation to create a step where nothing happens, for a specified duration. \li \l [QML] {PropertyAction}{Property Action} immediately changes - a propertyvalue during an animation, without animating the property - change. + a property value during an animation, without animating the + property change. \li \l [QML] {PropertyAnimation}{Property Animation} animates - changes in thevalue of a property. + changes in the value of a property. \li \l [QML] {ScriptAction}{Script Action} defines scripts to be run during an animation. \li \l [QML] {SequentialAnimation}{Sequential Animation} enables -- cgit v1.2.1 From a90ec2809c0fcdc240210a261cd7ae285bdffd0c Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 7 May 2020 13:26:44 +0200 Subject: Squish: Don't expect pastes to pastebin.com to appear in list Change-Id: I02a73244e3aecad906f2c08b37d60ebe1880f534 Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_codepasting/test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py index 4f1b4fedd3..42eb3ef8b0 100644 --- a/tests/system/suite_tools/tst_codepasting/test.py +++ b/tests/system/suite_tools/tst_codepasting/test.py @@ -129,7 +129,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting): closeHTTPStatusAndPasterDialog(protocol, ':PasteSelectDialog_CodePaster::PasteSelectDialog') return -1 waitFor("pasteModel.rowCount() > 1", 20000) - if (not skippedPasting and not any(map(lambda str:pasteId in str, dumpItems(pasteModel)))): + if (protocol != NAME_PBCOM and not skippedPasting and not any(map(lambda str:pasteId in str, dumpItems(pasteModel)))): test.warning("Fetching too fast for server of %s - waiting 3s and trying to refresh." % protocol) snooze(3) clickButton("{text='Refresh' type='QPushButton' unnamed='1' visible='1' " @@ -152,7 +152,11 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting): "Verify that line in list of pastes contains the description") except: if not skippedPasting: - test.fail("Could not find id '%s' in list of pastes from %s" % (pasteId, protocol)) + message = "Could not find id '%s' in list of pastes from %s" % (pasteId, protocol) + if protocol == NAME_PBCOM: + test.xfail(message, "pastebin.com does not show pastes in list anymore") + else: + test.fail(message) foundSnippet = False replaceEditorContent(waitForObject(":PasteSelectDialog.pasteEdit_QLineEdit"), pasteId) if foundSnippet: -- cgit v1.2.1 From bbddd60e036d6ea85d9c1064198a5702fb3133cf Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 13 May 2020 09:16:35 +0200 Subject: Doc: Remove extra copies of images that were moved They are now in doc/qtcreator/images. They seem to reappear here during merges. Change-Id: I7dc0b58997996601be7e54fb0a45898f0a5718a7 Reviewed-by: Eike Ziller --- doc/images/qtcreator-kit-nimble.png | Bin 16641 -> 0 bytes doc/images/qtcreator-project-nimble.png | Bin 10927 -> 0 bytes doc/images/qtcreator-python-wizard-qml.png | Bin 7996 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/images/qtcreator-kit-nimble.png delete mode 100644 doc/images/qtcreator-project-nimble.png delete mode 100644 doc/images/qtcreator-python-wizard-qml.png diff --git a/doc/images/qtcreator-kit-nimble.png b/doc/images/qtcreator-kit-nimble.png deleted file mode 100644 index fd21928ef9..0000000000 Binary files a/doc/images/qtcreator-kit-nimble.png and /dev/null differ diff --git a/doc/images/qtcreator-project-nimble.png b/doc/images/qtcreator-project-nimble.png deleted file mode 100644 index ae928bebc2..0000000000 Binary files a/doc/images/qtcreator-project-nimble.png and /dev/null differ diff --git a/doc/images/qtcreator-python-wizard-qml.png b/doc/images/qtcreator-python-wizard-qml.png deleted file mode 100644 index d8d3aeb929..0000000000 Binary files a/doc/images/qtcreator-python-wizard-qml.png and /dev/null differ -- cgit v1.2.1 From a12669292eeaef787effc9037bcfc7c1748eb677 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 13 May 2020 10:59:20 +0200 Subject: Doc: Remove link to non-existing tutorial Part 5 is still a work-in-progress. Change-Id: I7c8cd07be3921b9fd36eeb913d9e393e6f15d895 Reviewed-by: Thomas Hartmann --- doc/qtdesignstudio/examples/doc/loginui4.qdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/qtdesignstudio/examples/doc/loginui4.qdoc b/doc/qtdesignstudio/examples/doc/loginui4.qdoc index e9e19eaeb9..95f8d5819e 100644 --- a/doc/qtdesignstudio/examples/doc/loginui4.qdoc +++ b/doc/qtdesignstudio/examples/doc/loginui4.qdoc @@ -32,7 +32,6 @@ \brief Illustrates how to use the timeline and states to animate UI components. \previouspage {Log In UI - Part 3} - \nextpage {Log In UI - Part 5} \image loginui4.gif "Log In UI" -- cgit v1.2.1 From f362304169444c2543ccd7cc204a7551690d3744 Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Tue, 12 May 2020 22:03:41 +0200 Subject: Add library export documentation for Sketch Qt-bridge Task-number: QDS-2046 Change-Id: Idca24fdac106da1b6631518ddd9bb9fa7253a8c7 Reviewed-by: Leena Miettinen --- .../images/qt-sketch-bridge-library.png | Bin 0 -> 34478 bytes .../src/qtbridge/qtbridge-sketch-using.qdoc | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 doc/qtdesignstudio/images/qt-sketch-bridge-library.png diff --git a/doc/qtdesignstudio/images/qt-sketch-bridge-library.png b/doc/qtdesignstudio/images/qt-sketch-bridge-library.png new file mode 100644 index 0000000000..b65a094820 Binary files /dev/null and b/doc/qtdesignstudio/images/qt-sketch-bridge-library.png differ diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc index 7e52e05838..82b9c0b807 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-using.qdoc @@ -220,4 +220,24 @@ \uicontrol {Export format options} field. You can remove metadata from PNG files, export assets as progressive JPG or compact SVG, and include SVG namespaces in SVG files. + + + \section1 Exporting Library Symbols + + \QBSK can handle symbols used from a local library. Before you use \QBSK to export a document + that contains remote symbols, you must annotate the Sketch document of the local library for + QML export. + + For more information about Sketch libraries, see Sketch documentation. + + You can either export the complete library with the document or unlink the symbols. + Unlinking the symbols exports the symbols as if the symbols were part of the document as + Group layers. + Exporting the complete library exports all the layers of the library irrespective of their usage + in the document. + + To export a library, select \uicontrol Export. \QBSK asks you whether you want to export the + complete library or to unlink the symbols. + + \image qt-sketch-bridge-library.png */ -- cgit v1.2.1 From 689fac8fe9cc245a957db78d4ff8d8f12515f687 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 13 May 2020 14:02:15 +0200 Subject: LSP: Fix wrong assert Change-Id: If1015ba4f1d5519ac379e4c4b1cca8ffbf2c52ae Reviewed-by: Christian Stenger --- src/libs/languageserverprotocol/lsputils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/languageserverprotocol/lsputils.h b/src/libs/languageserverprotocol/lsputils.h index 8da5fdd93a..435d956eeb 100644 --- a/src/libs/languageserverprotocol/lsputils.h +++ b/src/libs/languageserverprotocol/lsputils.h @@ -118,7 +118,7 @@ public: LanguageClientValue(const T &value) : Utils::variant(value) { } LanguageClientValue(const QJsonValue &value) { - if (QTC_GUARD(value.isUndefined()) || value.isNull()) + if (!QTC_GUARD(!value.isUndefined()) || value.isNull()) *this = nullptr; else *this = fromJsonValue(value); -- cgit v1.2.1 From 2c5d6de9b4cdd8fda1a0c9245a389e13d56d638f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 13 May 2020 11:47:38 +0200 Subject: ProjectExplorer: Ensure that the session model stays sorted Fixes: QTCREATORBUG-23996 Change-Id: I96c8c1b780f5b56cb064146de3de6a4c90f9147a Reviewed-by: Christian Stenger --- src/plugins/projectexplorer/sessionmodel.cpp | 4 ++++ src/plugins/projectexplorer/sessionmodel.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/plugins/projectexplorer/sessionmodel.cpp b/src/plugins/projectexplorer/sessionmodel.cpp index a535294f91..5ba79dbf80 100644 --- a/src/plugins/projectexplorer/sessionmodel.cpp +++ b/src/plugins/projectexplorer/sessionmodel.cpp @@ -192,6 +192,8 @@ void SessionModel::sort(int column, Qt::SortOrder order) return isLess; }; Utils::sort(m_sortedSessions, cmp); + m_currentSortColumn = column; + m_currentSortOrder = order; endResetModel(); } @@ -237,6 +239,7 @@ void SessionModel::deleteSessions(const QStringList &sessions) beginResetModel(); SessionManager::deleteSessions(sessions); m_sortedSessions = SessionManager::sessions(); + sort(m_currentSortColumn, m_currentSortOrder); endResetModel(); } @@ -268,6 +271,7 @@ void SessionModel::runSessionNameInputDialog(SessionNameInputDialog *sessionInpu createSession(newSession); m_sortedSessions = SessionManager::sessions(); endResetModel(); + sort(m_currentSortColumn, m_currentSortOrder); if (sessionInputDialog->isSwitchToRequested()) switchToSession(newSession); diff --git a/src/plugins/projectexplorer/sessionmodel.h b/src/plugins/projectexplorer/sessionmodel.h index a4c09132f8..d95102590c 100644 --- a/src/plugins/projectexplorer/sessionmodel.h +++ b/src/plugins/projectexplorer/sessionmodel.h @@ -81,6 +81,8 @@ private: void runSessionNameInputDialog(ProjectExplorer::Internal::SessionNameInputDialog *sessionInputDialog, std::function createSession); QStringList m_sortedSessions; + int m_currentSortColumn = 0; + Qt::SortOrder m_currentSortOrder = Qt::AscendingOrder; }; } // namespace Internal -- cgit v1.2.1 From 567b61eee5488dc8a727bfe73d62ab6115a8ec54 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 14 May 2020 09:00:17 +0200 Subject: ClangTools: Fix placeholder in tr() Change-Id: I90727287ebdbe12b8e422e7e91adc9f3e5abafbd Reviewed-by: Christian Kandeler --- src/plugins/clangtools/clangtool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangtools/clangtool.cpp b/src/plugins/clangtools/clangtool.cpp index 87ce2875f7..e08b73bae6 100644 --- a/src/plugins/clangtools/clangtool.cpp +++ b/src/plugins/clangtools/clangtool.cpp @@ -1208,7 +1208,7 @@ void ClangTool::updateForCurrentState() // Info bar: diagnostic stats QString diagText; if (issuesFound) { - diagText = tr("%1 diagnostics. %2 fixits, %4 selected.") + diagText = tr("%1 diagnostics. %2 fixits, %3 selected.") .arg(issuesVisible) .arg(m_diagnosticFilterModel->fixitsScheduable()) .arg(m_diagnosticFilterModel->fixitsScheduled()); -- cgit v1.2.1 From 53cf4aa3c5573d34b399d783cdb6dc0c12b041af Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 11 May 2020 15:54:30 +0200 Subject: Fix availability of "Link with Qt" info bar The info bar should never appear if the button is disabled, for example because the Qt Creator directory is not accessible. Fixes: QTCREATORBUG-23900 Change-Id: I819c87f5ca51f69f34bd462fca8e877be3544100 Reviewed-by: hjk --- src/plugins/qtsupport/qtoptionspage.cpp | 37 +++++++++++++++++++++++++------ src/plugins/qtsupport/qtoptionspage.h | 2 ++ src/plugins/qtsupport/qtsupportplugin.cpp | 2 +- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index 95c3b84d50..3f851979fe 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -823,28 +823,41 @@ static QString linkingPurposeText() "Linking with a Qt installation automatically registers Qt versions and kits."); } -void QtOptionsPageWidget::setupLinkWithQtButton() +static bool canLinkWithQt(QString *toolTip) { + bool canLink = true; bool installSettingsExist; const Utils::optional installSettingsValue = currentlyLinkedQtDir( &installSettingsExist); QStringList tip; tip << linkingPurposeText(); if (!FilePath::fromString(Core::ICore::resourcePath()).isWritablePath()) { - m_ui.linkWithQtButton->setEnabled(false); - tip << tr("%1's resource directory is not writable.").arg(Core::Constants::IDE_DISPLAY_NAME); + canLink = false; + tip << QtOptionsPageWidget::tr("%1's resource directory is not writable.") + .arg(Core::Constants::IDE_DISPLAY_NAME); } // guard against redirecting Qt Creator that is part of a Qt installations // TODO this fails for pre-releases in the online installer // TODO this will fail when make Qt Creator non-required in the Qt installers if (installSettingsExist && !installSettingsValue) { - m_ui.linkWithQtButton->setEnabled(false); - tip << tr("%1 is part of a Qt installation.").arg(Core::Constants::IDE_DISPLAY_NAME); + canLink = false; + tip << QtOptionsPageWidget::tr("%1 is part of a Qt installation.") + .arg(Core::Constants::IDE_DISPLAY_NAME); } const QString link = installSettingsValue ? *installSettingsValue : QString(); if (!link.isEmpty()) - tip << tr("%1 is currently linked to \"%2\".").arg(Core::Constants::IDE_DISPLAY_NAME, link); - m_ui.linkWithQtButton->setToolTip(tip.join("\n\n")); + tip << QtOptionsPageWidget::tr("%1 is currently linked to \"%2\".") + .arg(Core::Constants::IDE_DISPLAY_NAME, link); + if (toolTip) + *toolTip = tip.join("\n\n"); + return canLink; +} + +void QtOptionsPageWidget::setupLinkWithQtButton() +{ + QString tip; + canLinkWithQt(&tip); + m_ui.linkWithQtButton->setToolTip(tip); connect(m_ui.linkWithQtButton, &QPushButton::clicked, this, &QtOptionsPage::linkWithQt); } @@ -1018,6 +1031,16 @@ QtOptionsPage::QtOptionsPage() setWidgetCreator([] { return new QtOptionsPageWidget; }); } +bool QtOptionsPage::canLinkWithQt() +{ + return Internal::canLinkWithQt(nullptr); +} + +bool QtOptionsPage::isLinkedWithQt() +{ + return currentlyLinkedQtDir(nullptr).has_value(); +} + void QtOptionsPage::linkWithQt() { QtOptionsPageWidget::linkWithQt(); diff --git a/src/plugins/qtsupport/qtoptionspage.h b/src/plugins/qtsupport/qtoptionspage.h index e2bfc9cbef..6f5599f51a 100644 --- a/src/plugins/qtsupport/qtoptionspage.h +++ b/src/plugins/qtsupport/qtoptionspage.h @@ -35,6 +35,8 @@ class QtOptionsPage final : public Core::IOptionsPage public: QtOptionsPage(); + static bool canLinkWithQt(); + static bool isLinkedWithQt(); static void linkWithQt(); }; diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp index 40f00c1e2c..7a8466f81f 100644 --- a/src/plugins/qtsupport/qtsupportplugin.cpp +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -122,7 +122,7 @@ static void askAboutQtInstallation() { // if the install settings exist, the Qt Creator installation is (probably) already linked to // a Qt installation, so don't ask - if (QFile::exists(ICore::settings(QSettings::SystemScope)->fileName()) + if (!QtOptionsPage::canLinkWithQt() || QtOptionsPage::isLinkedWithQt() || !ICore::infoBar()->canInfoBeAdded(kLinkWithQtInstallationSetting)) return; -- cgit v1.2.1 From f51258a17c898d1dc8f11bcda8b039fad68ad09e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 14 May 2020 10:56:00 +0200 Subject: Doc: Move Qt Bridge product name macros to the common macros file ..from the Qt Design Studio Manual doc configuration file. Change-Id: Iebbfb5404cae4ef277f05c867e7259997b19a27e Reviewed-by: Paul Wicking --- doc/config/macros.qdocconf | 3 +++ doc/qtdesignstudio/config/qtdesignstudio.qdocconf | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/config/macros.qdocconf b/doc/config/macros.qdocconf index c71ddf7fa2..88a92778d6 100644 --- a/doc/config/macros.qdocconf +++ b/doc/config/macros.qdocconf @@ -17,6 +17,9 @@ macro.note = "\\b{Note:}" macro.oslash.HTML = "ø" macro.ouml.HTML = "ö" macro.QA = "Qt Assistant" +macro.QB = "Qt Bridge" +macro.QBPS = "Qt Bridge for Adobe Photoshop" +macro.QBSK = "Qt Bridge for Sketch" macro.QC = "$IDE_DISPLAY_NAME" macro.QCE = "$IDE_DISPLAY_NAME Enterprise" macro.QD = "Qt Designer" diff --git a/doc/qtdesignstudio/config/qtdesignstudio.qdocconf b/doc/qtdesignstudio/config/qtdesignstudio.qdocconf index 1fcda6e66a..d99c57c609 100644 --- a/doc/qtdesignstudio/config/qtdesignstudio.qdocconf +++ b/doc/qtdesignstudio/config/qtdesignstudio.qdocconf @@ -110,10 +110,6 @@ qhp.qtdesignstudio.subprojects.manual.type = manual # Doxygen compatibility commands macro.see = "\\sa" macro.function = "\\fn" -macro.QB = "Qt Bridge" -macro.QBPS = "Qt Bridge for Adobe Photoshop" -macro.QBSK = "Qt Bridge for Sketch" -macro.QDS = "Qt Design Studio" navigation.landingpage = "$IDE_DISPLAY_NAME Manual" buildversion = "$IDE_DISPLAY_NAME Manual $QTC_VERSION" -- cgit v1.2.1 From 7a63a47ef03e9fed7215e9f622661e672e23aa60 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 7 May 2020 09:56:52 +0200 Subject: Debugger: Work around for gdb reporting zero array sizes in some cases Task-number: QTCREATORBUG-23998 Change-Id: I101d032705b66faf50260067f6aa604214f09298 Reviewed-by: Christian Stenger --- share/qtcreator/debugger/dumper.py | 9 +++++---- share/qtcreator/debugger/gdbbridge.py | 7 ++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index da8c322582..80d8d47fee 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1089,6 +1089,10 @@ class DumperBase(): return '_ZN%sE' % ''.join(map(lambda x: '%d%s' % (len(x), x), typeName.split('::'))) + def arrayItemCountFromTypeName(self, typeName, fallbackMax=1): + itemCount = typeName[typeName.find('[') + 1:typeName.find(']')] + return int(itemCount) if itemCount else fallbackMax + def putCStyleArray(self, value): arrayType = value.type.unqualified() innerType = arrayType.ltarget @@ -1107,10 +1111,7 @@ class DumperBase(): # This should not happen. But it does, see QTCREATORBUG-14755. # GDB/GCC produce sizeof == 0 for QProcess arr[3] # And in the Nim string dumper. - s = value.type.name - itemCount = s[s.find('[') + 1:s.find(']')] - if not itemCount: - itemCount = '100' + itemCount = self.arrayItemCountFromTypeName(value.type.name, 100) arrayByteSize = int(itemCount) * innerType.size() n = arrayByteSize // innerType.size() diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py index bcaf8ed314..ecc53a8f32 100644 --- a/share/qtcreator/debugger/gdbbridge.py +++ b/share/qtcreator/debugger/gdbbridge.py @@ -341,7 +341,12 @@ class Dumper(DumperBase): #DumperBase.warn('ARRAY') nativeTargetType = nativeType.target().unqualified() targetType = self.fromNativeType(nativeTargetType) - count = nativeType.sizeof // nativeTargetType.sizeof + if nativeType.sizeof == 0: + # QTCREATORBUG-23998, note that nativeType.name == None here, + # whereas str(nativeType) returns sth like 'QObject [5]' + count = self.arrayItemCountFromTypeName(str(nativeType), 1) + else: + count = nativeType.sizeof // nativeTargetType.sizeof return self.createArrayType(targetType, count) if code == gdb.TYPE_CODE_TYPEDEF: -- cgit v1.2.1 From f08fe165ab586e6142eb3d6187e7e10087cd2bcf Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 7 May 2020 12:38:28 +0200 Subject: McuSupport: Read supported targets from SDK .json files ... Replace the current hard-coded list of supported (non-Desktop) targets. Task-number: UL-2012 Change-Id: I65851d11eea9f62635d56c42788caeae8a77a4f3 Reviewed-by: Eike Ziller --- src/plugins/mcusupport/mcusupportoptions.cpp | 6 +- src/plugins/mcusupport/mcusupportsdk.cpp | 222 +++++++++++++++++---------- src/plugins/mcusupport/mcusupportsdk.h | 9 +- 3 files changed, 148 insertions(+), 89 deletions(-) diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index 2ce44293b7..894eb9cb4c 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -61,7 +61,7 @@ namespace McuSupport { namespace Internal { -static const int KIT_VERSION = 3; // Bumps up whenever details in Kit creation change +static const int KIT_VERSION = 4; // Bumps up whenever details in Kit creation change static QString packagePathFromSettings(const QString &settingsKey, const QString &defaultPath = {}) { @@ -441,14 +441,14 @@ void McuSupportOptions::deletePackagesAndTargets() const QVersionNumber &McuSupportOptions::supportedQulVersion() { - static const QVersionNumber v({1, 1, 0}); + static const QVersionNumber v({1, 1}); return v; } void McuSupportOptions::setQulDir(const Utils::FilePath &dir) { deletePackagesAndTargets(); - Sdk::hardcodedTargetsAndPackages(dir, &packages, &mcuTargets); + Sdk::targetsAndPackages(dir, &packages, &mcuTargets); //packages.append(qtForMCUsSdkPackage); for (auto package : packages) { connect(package, &McuPackage::changed, [this](){ diff --git a/src/plugins/mcusupport/mcusupportsdk.cpp b/src/plugins/mcusupport/mcusupportsdk.cpp index bd57cd5c50..42e59f80c9 100644 --- a/src/plugins/mcusupport/mcusupportsdk.cpp +++ b/src/plugins/mcusupport/mcusupportsdk.cpp @@ -27,10 +27,17 @@ #include "mcusupportoptions.h" #include "mcusupportsdk.h" +#include #include #include #include +#include +#include +#include +#include +#include +#include namespace McuSupport { namespace Internal { @@ -220,9 +227,9 @@ static McuPackage *createMcuXpressoIdePackage() return result; } -static McuPackage *createFreeRTOSSourcesPackage(const QString &envVarPrefix) +static McuPackage *createFreeRTOSSourcesPackage(const QString &envVar) { - const QString envVar = envVarPrefix + "_FREERTOS_DIR"; + const QString envVarPrefix = envVar.chopped(strlen("_FREERTOS_DIR")); const QString defaultPath = qEnvironmentVariableIsSet(envVar.toLatin1()) ? @@ -238,98 +245,147 @@ static McuPackage *createFreeRTOSSourcesPackage(const QString &envVarPrefix) return result; } -void hardcodedTargetsAndPackages(const Utils::FilePath &dir, QVector *packages, - QVector *mcuTargets) +struct McuTargetDescription { - McuToolChainPackage* armGccPackage = Sdk::createArmGccPackage(); - McuToolChainPackage *ghsToolchainPackage = createGhsToolchainPackage(); - McuToolChainPackage* desktopToolChainPackage = createDesktopToolChainPackage(); - McuPackage* stm32CubeFwF7SdkPackage = Sdk::createStm32CubeFwF7SdkPackage(); - McuPackage* stm32CubeProgrammerPackage = Sdk::createStm32CubeProgrammerPackage(); - McuPackage* evkbImxrt1050SdkPackage = Sdk::createEvkbImxrt1050SdkPackage(); - McuPackage *mcuXpressoIdePackage = createMcuXpressoIdePackage(); - McuPackage *rglPackage = createRGLPackage(); - McuPackage *freeRTOSSTM32F7Package = createFreeRTOSSourcesPackage("STM32F7"); - McuPackage *freeRTOSIMXRT1050Package = createFreeRTOSSourcesPackage("IMXRT1050"); - McuPackage *freeRTOSIMXRT1064Package = createFreeRTOSSourcesPackage("IMXRT1064"); - - QVector stmEvalPackages = { - armGccPackage, stm32CubeProgrammerPackage}; - QVector nxpEvalPackages = { - armGccPackage, mcuXpressoIdePackage}; - QVector renesasEvalPackages = { - ghsToolchainPackage, rglPackage}; - QVector desktopPackages = {}; - *packages = { - armGccPackage, desktopToolChainPackage, ghsToolchainPackage, - stm32CubeFwF7SdkPackage, stm32CubeProgrammerPackage, evkbImxrt1050SdkPackage, - mcuXpressoIdePackage, rglPackage, - freeRTOSSTM32F7Package, freeRTOSIMXRT1050Package, freeRTOSIMXRT1064Package}; - - const QString vendorStm = "STM"; - const QString vendorNxp = "NXP"; - const QString vendorQt = "Qt"; - const QString vendorRenesas = "Renesas"; - - const struct { - const QString &vendor; - const QString qulPlatform; - const QVector &packages; - McuToolChainPackage *toolchainPackage; - McuPackage *freeRTOSPackage; - const QVector colorDepths; - } targets[] = { - {vendorNxp, {"MIMXRT1050-EVK"}, nxpEvalPackages, armGccPackage, - freeRTOSIMXRT1050Package, {16}}, - {vendorNxp, {"MIMXRT1064-EVK"}, nxpEvalPackages, armGccPackage, - freeRTOSIMXRT1064Package, {16}}, - {vendorQt, {"Qt"}, desktopPackages, desktopToolChainPackage, - nullptr, {32}}, - {vendorRenesas, {"RH850-D1M1A"}, renesasEvalPackages, ghsToolchainPackage, - nullptr, {32}}, - {vendorStm, {"STM32F469I-DISCOVERY"}, stmEvalPackages, armGccPackage, - nullptr, {24}}, - {vendorStm, {"STM32F7508-DISCOVERY"}, stmEvalPackages, armGccPackage, - freeRTOSSTM32F7Package, {32, 16}}, - {vendorStm, {"STM32F769I-DISCOVERY"}, stmEvalPackages, armGccPackage, - freeRTOSSTM32F7Package, {32}}, - {vendorStm, {"STM32H750B-DISCOVERY"}, stmEvalPackages, armGccPackage, - nullptr, {32}}, - {vendorStm, {"STM32L4R9I-DISCOVERY"}, stmEvalPackages, armGccPackage, - nullptr, {24}}, - {vendorStm, {"STM32L4R9I-EVAL"}, stmEvalPackages, armGccPackage, - nullptr, {24}} + QString qulVersion; + QString platform; + QString platformVendor; + QVector colorDepths; + QString toolchainId; + QString boardSdkEnvVar; + QString freeRTOSEnvVar; +}; + +static QVector targetsFromDescriptions(const QList &descriptions, + QVector *packages) +{ + const QHash tcPkgs = { + {{"armgcc"}, createArmGccPackage()}, + {{"greenhills"}, createGhsToolchainPackage()}, + {{"desktop"}, createDesktopToolChainPackage()}, + }; + + const QHash vendorPkgs = { + {{"ST"}, createStm32CubeProgrammerPackage()}, + {{"NXP"}, createMcuXpressoIdePackage()}, + {{"Renesas"}, createRGLPackage()} }; - const QString QulTargetTemplate = - dir.toString() + "/lib/cmake/Qul/QulTargets/QulTargets_%1_%2.cmake"; - for (const auto target : targets) { - for (auto os : {McuTarget::OS::Desktop, McuTarget::OS::BareMetal, - McuTarget::OS::FreeRTOS}) { - for (int colorDepth : target.colorDepths) { - QVector required3rdPartyPackages = target.packages; + QHash freeRTOSPkgs; + QVector mcuTargets; + + for (auto desc : descriptions) { + McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId); + if (desc.toolchainId == "desktop") { + auto mcuTarget = new McuTarget(desc.platformVendor, desc.platform, + McuTarget::OS::Desktop, {}, tcPkg); + mcuTargets.append(mcuTarget); + continue; + } + for (auto os : {McuTarget::OS::BareMetal, McuTarget::OS::FreeRTOS}) { + for (int colorDepth : desc.colorDepths) { + QVector required3rdPartyPkgs = { + vendorPkgs.value(desc.platformVendor), tcPkg + }; if (os == McuTarget::OS::FreeRTOS) { - if (target.freeRTOSPackage) - required3rdPartyPackages.append(target.freeRTOSPackage); - else + if (desc.freeRTOSEnvVar.isEmpty()) { continue; - } else if (os == McuTarget::OS::Desktop && target.toolchainPackage->type() - != McuToolChainPackage::TypeDesktop) { - continue; + } else { + if (!freeRTOSPkgs.contains(desc.freeRTOSEnvVar)) { + auto freeRTOSPkg = createFreeRTOSSourcesPackage(desc.freeRTOSEnvVar); + freeRTOSPkgs.insert(desc.freeRTOSEnvVar, freeRTOSPkg); + } + required3rdPartyPkgs.append(freeRTOSPkgs.value(desc.freeRTOSEnvVar)); + } } - const QString QulTarget = - QulTargetTemplate.arg(target.qulPlatform, QString::number(colorDepth)); - if (!Utils::FilePath::fromUserInput(QulTarget).exists()) - continue; - auto mcuTarget = new McuTarget(target.vendor, target.qulPlatform, os, - required3rdPartyPackages, target.toolchainPackage); - if (target.colorDepths.count() > 1) + auto mcuTarget = new McuTarget(desc.platformVendor, desc.platform, os, + required3rdPartyPkgs, tcPkg); + if (desc.colorDepths.count() > 1) mcuTarget->setColorDepth(colorDepth); - mcuTargets->append(mcuTarget); + mcuTargets.append(mcuTarget); } } } + + packages->append(Utils::transform >( + tcPkgs.values(), [&](McuToolChainPackage *tcPkg) { return tcPkg; })); + packages->append(vendorPkgs.values().toVector()); + packages->append(freeRTOSPkgs.values().toVector()); + + return mcuTargets; +} + +static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir) +{ + // Workaround for UL-2390: Instead of "./kits/", walk through "./lib/cmake/Qul/boards/" + QFileInfoList result; + QDirIterator it(dir.toString() + "/lib/cmake/Qul/boards/", {QLatin1String("*.json")}, + QDir::Files, QDirIterator::Subdirectories); + while (it.hasNext()) + result.append(it.next()); + return result; +} + +static QString freeRTOSEnvVarForPlatform(const QString &platform) +{ + if (platform == "STM32F769I-DISCOVERY" || platform == "STM32F7508-DISCOVERY") + return "STM32F7_FREERTOS_DIR"; + else if (platform == "MIMXRT1050-EVK") + return "IMXRT1050_FREERTOS_DIR"; + else if (platform == "MIMXRT1064-EVK") + return "IMXRT1064_FREERTOS_DIR"; + + return {}; +} + +static McuTargetDescription parseDescriptionJson(const QByteArray &data) +{ + const QJsonDocument document = QJsonDocument::fromJson(data); + const QJsonObject target = document.object(); + const QJsonObject toolchain = target.value("toolchain").toObject(); + const QJsonObject boardSdk = target.value("boardSdk").toObject(); + + const QString platform = target.value("platform").toString(); + + const QVariantList colorDepths = target.value("colorDepths").toArray().toVariantList(); + const auto colorDepthsVector = Utils::transform >( + colorDepths, [&](const QVariant &colorDepth) { return colorDepth.toInt(); }); + + return { + target.value("qulVersion").toString(), + platform, + target.value("platformVendor").toString(), + colorDepthsVector, + toolchain.value("id").toString(), + boardSdk.value("boardSdkEnvVar").toString(), + freeRTOSEnvVarForPlatform(platform) // Workaround for UL-2514: Missing FreeRTOS information + }; +} + +void targetsAndPackages(const Utils::FilePath &dir, QVector *packages, + QVector *mcuTargets) +{ + QList descriptions; + + for (const QFileInfo &fileInfo : targetDescriptionFiles(dir)) { + QFile file(fileInfo.absoluteFilePath()); + if (!file.open(QFile::ReadOnly)) + continue; + const McuTargetDescription desc = parseDescriptionJson(file.readAll()); + if (!McuSupportOptions::supportedQulVersion() + .isPrefixOf(QVersionNumber::fromString(desc.qulVersion))) + continue; + descriptions.append(desc); + } + + if (!descriptions.isEmpty()) { + // Workaround for missing JSON file for Desktop target: + descriptions.prepend({McuSupportOptions::supportedQulVersion().toString(), + "Qt", "Qt", {32}, "desktop", {}, {}}); + + mcuTargets->append(targetsFromDescriptions(descriptions, packages)); + } } } // namespace Sdk diff --git a/src/plugins/mcusupport/mcusupportsdk.h b/src/plugins/mcusupport/mcusupportsdk.h index 444855b881..1cc2adadc7 100644 --- a/src/plugins/mcusupport/mcusupportsdk.h +++ b/src/plugins/mcusupport/mcusupportsdk.h @@ -27,6 +27,10 @@ #include +namespace Utils { +class FilePath; +} + namespace McuSupport { namespace Internal { class McuPackage; @@ -36,9 +40,8 @@ namespace Sdk { McuPackage *createQtForMCUsPackage(); -// Legacy: List of targets supported by Qt for MCUs 1.0 -void hardcodedTargetsAndPackages(const Utils::FilePath &qulDir, - QVector *packages, QVector *mcuTargets); +void targetsAndPackages(const Utils::FilePath &qulDir, + QVector *packages, QVector *mcuTargets); } // namespace Sdk } // namespace Internal -- cgit v1.2.1 From c59e8ce65157b8b8a170179f4dd70e4053550623 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 14 May 2020 15:08:25 +0200 Subject: Doc: Update information about Scene Environment properties "Blend mode" field seems to have been removed. The Skybox option has been added to "Background mode" field. Task-number: QDS-2056 Change-Id: Ie5c5b5fae4aba83bd8b9b50357bb83d58fbb69c2 Reviewed-by: Miikka Heikkinen Reviewed-by: Thomas Hartmann --- .../qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc index 16653e7f4b..8a54021a19 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-scene-environment.qdoc @@ -80,13 +80,12 @@ To clear the background using a color, select \uicontrol Color, and select the color in the \uicontrol {Clear Color} field. - To leave the scene uncleared, select \uicontrol {Unspecified}. - - \section1 Blending Scene Colors + To render a Skybox or Skydome instead of clearing the scene, + select \uicontrol SkyBox. You can specify the image to use as + a value of the \l{SceneEnvironment::lightProbe}{lightProbe} + property in \uicontrol {Text Editor}. - To determine how colors are blended, select a blend mode in the - \uicontrol {Blend mode} field. For more information on the options, - see \uicontrol {Blending Colors}. + To leave the scene uncleared, select \uicontrol {Unspecified}. \section1 Performing Depth Tests -- cgit v1.2.1 From 9edf0056aed137466a2de7a1ebfaf6bd7b4d95db Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 14 May 2020 09:28:47 +0200 Subject: ClangTools: Fix crash when starting the analyzer again Address a nullptr dereference of m_runWorker in ClangTool::updateForCurrentState() for the case described as (C2) below, reproducible with "./qtcreator -test ClangTools". Two use cases are connected to this: (C1) Run the analyzer twice with clearing app output pane in-between (C2) Run the analyzer twice without clearing app output pane in-between Relevant observations in this context are: (O1) Closing the app output pane destroys the RunControl/RunWorker. (O2) Running the analyzer a second time will first create a new RunControl/RunWorker, then destroy the old one. Now, the change ClangTools: Avoid accessing deleted run worker This reverts commit d02f5664e53df41ff7156eb46069e339479074d2. fixed a use-after-free-crash for (C1), but introduced a nullptr-deref-crash for (C2) as it resets m_runWorker to nullptr on RunControl destruction, which conflicts with the order mentioned in (O2). To fix both use cases, revert the mentioned change and access m_runWorker only when we know that it exists for sure - right after signal emission. Change-Id: I034f0905d635b15c0c6bbe499648b62d5a058c04 Reviewed-by: Christian Stenger --- src/plugins/clangtools/clangtool.cpp | 27 ++++++++++++++++----------- src/plugins/clangtools/clangtool.h | 3 +++ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/plugins/clangtools/clangtool.cpp b/src/plugins/clangtools/clangtool.cpp index e08b73bae6..0928e40e6b 100644 --- a/src/plugins/clangtools/clangtool.cpp +++ b/src/plugins/clangtools/clangtool.cpp @@ -696,9 +696,12 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection, connect(m_runWorker, &ClangToolRunWorker::buildFailed,this, &ClangTool::onBuildFailed); connect(m_runWorker, &ClangToolRunWorker::startFailed, this, &ClangTool::onStartFailed); connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted); - connect(m_runWorker, &ClangToolRunWorker::runnerFinished, - this, &ClangTool::updateForCurrentState); - connect(m_runControl, &RunControl::destroyed, [this](){ m_runWorker = nullptr; }); + connect(m_runWorker, &ClangToolRunWorker::runnerFinished, this, [this]() { + m_filesCount = m_runWorker->totalFilesToAnalyze(); + m_filesSucceeded = m_runWorker->filesAnalyzed(); + m_filesFailed = m_runWorker->filesNotAnalyzed(); + updateForCurrentState(); + }); // More init and UI update m_diagnosticFilterModel->setProject(project); @@ -857,6 +860,10 @@ void ClangTool::reset() m_state = State::Initial; m_runControl = nullptr; m_runWorker = nullptr; + + m_filesCount = 0; + m_filesSucceeded = 0; + m_filesFailed = 0; } static bool canAnalyzeProject(Project *project) @@ -1039,8 +1046,6 @@ void ClangTool::onRunControlStopped() void ClangTool::update() { updateForInitialState(); - if (!m_runWorker) - return; updateForCurrentState(); } @@ -1162,9 +1167,9 @@ void ClangTool::updateForCurrentState() // Info bar: errors const bool hasErrorText = !m_infoBarWidget->errorText().isEmpty(); - const bool hasErrors = m_runWorker && m_runWorker->filesNotAnalyzed() > 0; + const bool hasErrors = m_filesFailed > 0; if (hasErrors && !hasErrorText) { - const QString text = makeLink( tr("Failed to analyze %1 files.").arg(m_runWorker->filesNotAnalyzed())); + const QString text = makeLink( tr("Failed to analyze %1 files.").arg(m_filesFailed)); m_infoBarWidget->setError(InfoBarWidget::Warning, text, [this]() { showOutputPane(); }); } @@ -1177,12 +1182,12 @@ void ClangTool::updateForCurrentState() break; case State::AnalyzerRunning: showProgressIcon = true; - if (m_runWorker->totalFilesToAnalyze() == 0) { + if (m_filesCount == 0) { infoText = tr("Analyzing..."); // Not yet fully started/initialized } else { infoText = tr("Analyzing... %1 of %2 files processed.") - .arg(m_runWorker->filesAnalyzed() + m_runWorker->filesNotAnalyzed()) - .arg(m_runWorker->totalFilesToAnalyze()); + .arg(m_filesSucceeded + m_filesFailed) + .arg(m_filesCount); } break; case State::PreparationStarted: @@ -1195,7 +1200,7 @@ void ClangTool::updateForCurrentState() infoText = tr("Analysis stopped by user."); break; case State::AnalyzerFinished: - infoText = tr("Finished processing %1 files.").arg(m_runWorker->totalFilesToAnalyze()); + infoText = tr("Finished processing %1 files.").arg(m_filesCount); break; case State::ImportFinished: infoText = tr("Diagnostics imported."); diff --git a/src/plugins/clangtools/clangtool.h b/src/plugins/clangtools/clangtool.h index 3ee72da83c..a32bb50c2c 100644 --- a/src/plugins/clangtools/clangtool.h +++ b/src/plugins/clangtools/clangtool.h @@ -162,6 +162,9 @@ private: QAction *m_stopAction = nullptr; State m_state = State::Initial; + int m_filesCount = 0; + int m_filesSucceeded = 0; + int m_filesFailed = 0; DiagnosticFilterModel *m_diagnosticFilterModel = nullptr; -- cgit v1.2.1 From 0767107c5585fb0d4cdb35c60841c06908847e35 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 15 May 2020 06:53:10 +0200 Subject: McuSupport: Fix compile for gcc 5.3 Change-Id: I389330addba4b4516eb5da8f72b41b56f612888a Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupportsdk.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/mcusupport/mcusupportsdk.cpp b/src/plugins/mcusupport/mcusupportsdk.cpp index 42e59f80c9..757d919315 100644 --- a/src/plugins/mcusupport/mcusupportsdk.cpp +++ b/src/plugins/mcusupport/mcusupportsdk.cpp @@ -330,11 +330,11 @@ static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir) static QString freeRTOSEnvVarForPlatform(const QString &platform) { if (platform == "STM32F769I-DISCOVERY" || platform == "STM32F7508-DISCOVERY") - return "STM32F7_FREERTOS_DIR"; + return {"STM32F7_FREERTOS_DIR"}; else if (platform == "MIMXRT1050-EVK") - return "IMXRT1050_FREERTOS_DIR"; + return {"IMXRT1050_FREERTOS_DIR"}; else if (platform == "MIMXRT1064-EVK") - return "IMXRT1064_FREERTOS_DIR"; + return {"IMXRT1064_FREERTOS_DIR"}; return {}; } @@ -382,7 +382,7 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector *packa if (!descriptions.isEmpty()) { // Workaround for missing JSON file for Desktop target: descriptions.prepend({McuSupportOptions::supportedQulVersion().toString(), - "Qt", "Qt", {32}, "desktop", {}, {}}); + {"Qt"}, {"Qt"}, {32}, {"desktop"}, {}, {}}); mcuTargets->append(targetsFromDescriptions(descriptions, packages)); } -- cgit v1.2.1 From 1d257e60d13e39a5b2b7282231d26c0e59d895ff Mon Sep 17 00:00:00 2001 From: Johanna Vanhatapio Date: Tue, 12 May 2020 16:20:33 +0300 Subject: Doc: Update information about 3D Editor Change-Id: I047b96e1db411ccbbe73a94f701cc7e632bc98c9 Reviewed-by: Miikka Heikkinen Reviewed-by: Leena Miettinen Reviewed-by: Mahmoud Badri --- doc/qtcreator/src/qtcreator-toc.qdoc | 2 +- .../images/studio-3d-editor-axis-helper.png | Bin 0 -> 23470 bytes .../images/studio-3d-editor-move.png | Bin 21034 -> 23210 bytes .../images/studio-3d-editor-rotate.png | Bin 22978 -> 25151 bytes .../images/studio-3d-editor-scale.png | Bin 20896 -> 23213 bytes doc/qtdesignstudio/images/studio-3d-editor.png | Bin 25151 -> 22866 bytes doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc | 2 +- doc/qtdesignstudio/src/qtdesignstudio.qdoc | 2 +- .../qtquick3d-editor/qtdesignstudio-3d-editor.qdoc | 233 +++++++++++---------- .../src/qtquick3d-editor/qtdesignstudio-3d.qdoc | 2 +- 10 files changed, 130 insertions(+), 111 deletions(-) create mode 100644 doc/qtdesignstudio/images/studio-3d-editor-axis-helper.png diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index da35dae588..2b17c2c5da 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -127,7 +127,7 @@ \endlist \li \l{Importing 3D Assets} \li \l{Editing 3D Assets in Design Mode} - \li \l{Working in the 3D Editor} + \li \l{Working in 3D Editor} \li \l{Adding 3D Views} \li \l{Using 3D Components} \list diff --git a/doc/qtdesignstudio/images/studio-3d-editor-axis-helper.png b/doc/qtdesignstudio/images/studio-3d-editor-axis-helper.png new file mode 100644 index 0000000000..edaaeea4ef Binary files /dev/null and b/doc/qtdesignstudio/images/studio-3d-editor-axis-helper.png differ diff --git a/doc/qtdesignstudio/images/studio-3d-editor-move.png b/doc/qtdesignstudio/images/studio-3d-editor-move.png index 77e83eacd5..5163aa78c6 100644 Binary files a/doc/qtdesignstudio/images/studio-3d-editor-move.png and b/doc/qtdesignstudio/images/studio-3d-editor-move.png differ diff --git a/doc/qtdesignstudio/images/studio-3d-editor-rotate.png b/doc/qtdesignstudio/images/studio-3d-editor-rotate.png index 033c4c4a9e..5f7c13d4e5 100644 Binary files a/doc/qtdesignstudio/images/studio-3d-editor-rotate.png and b/doc/qtdesignstudio/images/studio-3d-editor-rotate.png differ diff --git a/doc/qtdesignstudio/images/studio-3d-editor-scale.png b/doc/qtdesignstudio/images/studio-3d-editor-scale.png index af2ecee0d0..8ae936f175 100644 Binary files a/doc/qtdesignstudio/images/studio-3d-editor-scale.png and b/doc/qtdesignstudio/images/studio-3d-editor-scale.png differ diff --git a/doc/qtdesignstudio/images/studio-3d-editor.png b/doc/qtdesignstudio/images/studio-3d-editor.png index 575b7510c6..00c55df87f 100644 Binary files a/doc/qtdesignstudio/images/studio-3d-editor.png and b/doc/qtdesignstudio/images/studio-3d-editor.png differ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc index eba0407984..349337a405 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-toc.qdoc @@ -94,7 +94,7 @@ \li \l{Editing 3D Scenes} \list \li \l{Editing 3D Assets in Design Mode} - \li \l{Working in the 3D Editor} + \li \l{Working in 3D Editor} \li \l{Adding 3D Views} \li \l{Using 3D Components} \list diff --git a/doc/qtdesignstudio/src/qtdesignstudio.qdoc b/doc/qtdesignstudio/src/qtdesignstudio.qdoc index 979ba94e13..74081404dd 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio.qdoc @@ -79,7 +79,7 @@ \li \b {\l{Editing 3D Scenes}} \list \li \l{Editing 3D Assets in Design Mode} - \li \l{Working in the 3D Editor} + \li \l{Working in 3D Editor} \li \l{Adding 3D Views} \li \l{Using 3D Components} \endlist diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc index 5b7fe602d5..cc42cbc100 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc @@ -28,75 +28,120 @@ \page studio-3d-editor.html \nextpage studio-3d-view.html - \title Working in the 3D Editor + \title Working in 3D Editor - To project a 3D scene to a 2D viewport, it is necessary to view the scene - from a \l{Using Scene Camera}{camera}. Select the \uicontrol {Toggle - Perspective/Orthographic Projection} button (1) on the 3D editor toolbar to - switch between a \e {perspective camera} and an \e {orthographic camera}. - A perspective camera uses field of view and near and far clip planes to - specify the projection, whereas an orthographic camera can be thought of - as a 2D camera. Both of them are free-form cameras that you can use to - orbit around the scene. + When editing a 3D scene, you view the scene in \uicontrol {3D Editor} by + using the \uicontrol {3D Editor} camera. You can switch between + \e {perspective camera} and \e {orthographic camera} modes. When using the + perspective camera mode, objects that are far from the camera appear smaller + than those nearby. In the orthographic camera mode, all objects appear at + the same scale irrespective of their distance from the camera. Both of them + are free-form camera modes that you can use to orbit around the scene. When you import 3D scenes from files that you exported from 3D graphics - tools, you also import the camera, light, model, and materials. If your - scene did not contain them, you can add the corresponding Qt Quick 3D - types from the \uicontrol Library. - - You can use the toolbar buttons (2) to show the \e transformation - gizmo in the \uicontrol {3D Editor} when an item is selected - and to determine what happens when you drag the selected item. - Transformation refers to moving, rotating, or scaling of an object. - Select the \uicontrol {Toggle Local/Global Orientation} button (3) to - determine whether the gizmos affect only the local transformations of the - item or whether they transform with respect to the global space. + tools, you also import a \l{Using Scene Camera}{scene camera}, + \l{Using Lights}{light}, \l{Adding Models}{model}, and + \l {Using Materials and Shaders}{materials}. If your scene did not contain + them, you can add the corresponding Qt Quick 3D types from \uicontrol + Library. + + You can use the toolbar buttons to \e transform 3D objects and manipulate + the 3D scene. Transformation refers to moving, rotating, or scaling of an + object. The \e pivot of the component is used as the origin for + transformations. You can set a \l{Setting Transform Properties}{local pivot + offset} for an item in \uicontrol Properties to transform the component + around a point other than its local origin. A line is drawn in \uicontrol + {3D Editor} from the pivot point to the center of the component to provide + a visual connection between them. + + Toggle between local and global orientation to determine whether the gizmos + affect only the local transformations of the item or whether they transform + with respect to the global space. + + Additional helpful features when editing 3D scenes are the \e {edit light}, + which is a quick way to light the scene, and the grid that helps you to + navigate in 3D space. Select the \inlineimage grid_on.png + (\uicontrol {Toggle Grid Visibility}) to show or hide the grid. \image studio-3d-editor.png "3D Editor" - The \e pivot of the component is used as the origin for position, scale, - and rotation operations. You can set a \l{Setting Transform Properties} - {local pivot offset} for an item in the \uicontrol Properties view to - manipulate the component around a point other than its local origin. A - line is drawn in the 3D editor from the pivot point to the center of the - component to provide a visual connection between them. + \section1 Controlling the 3D Editor Camera - \section1 Controlling the Edit View Camera + To switch to perspective camera mode, select + \inlineimage perspective_camera.png + (\uicontrol {Toggle Perspective/Orthographic Edit Camera}). + To switch to orthographic camera mode, select + \inlineimage orthographic_camera.png + . - You can add 3D camera types to the scene to project the view you see in - the View3D type in the application. While editing scenes, you can use - a separate \e {edit view camera} (4) to project the scene to the 3D edit - view in the Design mode. + You can navigate the scene by panning, rotating, and zooming the 3D Editor + camera: - You can navigate the scene by rotating, panning, and zooming the edit view - camera. - - To zoom, use the mouse wheel or press \key Alt and right-click anywhere in - the rendered view to zoom the view in or out as you drag up or down. - - To pan, press \key Alt and use the middle mouse button to click anywhere in - the rendered view to slide the view around. - - To orbit, press \key Alt and click anywhere in the rendered view to rotate - the view. + \list + \li To pan, press \key Alt and use the middle mouse button to click + anywhere in the rendered view to slide the view around. + \li To orbit, press \key Alt and click anywhere in the rendered view to + rotate the view. + \li To zoom, use the mouse wheel or press \key Alt and right-click + anywhere in the rendered view to zoom the view in or out as you drag + up or down. + \endlist - To scale the edit view camera and to focus it on the selected items, select - \uicontrol {Fit Selected} button or press \key F. + To zoom and focus the 3D Editor camera on a selected item, + select \inlineimage fit_selected.png + (\uicontrol {Fit Selected}) or press \key F. - The world axis helper (5) shows the direction of the world axes in respect - to the edit view camera. To point the camera at the currently selected + The world axis helper (1) shows the direction of the world axes in respect + to the 3D Editor camera. To point the camera at the currently selected component in the direction of an axis, click the axis. If no component is selected, the camera is pointed at the world origin. This does not affect the camera zoom level. - For more information about using the cameras in the scene, the available - 3D camera types, and their properties, see \l{Using Scene Camera}. + \image studio-3d-editor-axis-helper.png "Axis helper in 3D Editor" + + You can use scene cameras (2) to view the the View3D type from a specific + angle in \uicontrol {Form Editor} while editing scenes. Different types of + cameras are available in \uicontrol Library under \uicontrol + {Qt Quick 3D}. For more information about using cameras in the scene, + the available camera types, and their properties, see + \l{Using Scene Camera}. + + \section1 Using Global and Local Orientation + + To switch between local and global orientation, select + \inlineimage local.png + or \inlineimage global.png + (\uicontrol {Toggle Local/Global Orientation}) + or press \key Y. + + In global orientation mode, transformation of a selected object is presented + with respect to the global space. For example, while the move tool is + selected, selecting a cube will show its move gizmo aligned with the axes + of global space. Dragging on the red arrow of the gizmo moves the object in + the global x direction. + + In local orientation mode, the position of a selected object is shown + according to local axes specific to the selected object. For example, + selecting a rotated cube will show its axes rotated, and not aligned with + the axes of global space. Dragging on the red arrow of the gizmo + moves the object in the local x direction in relation to the object. + + \section1 Using Edit Light + + The edit light is an extra point light that follows the edit camera. + To switch the edit light on and off, select \inlineimage edit_light_on.png + or \inlineimage edit_light_off.png + (\uicontrol {Toggle Edit Light}) + or press \key U. + + For more information about the available scene light types and their + properties, see \l{Using Lights}. \section1 Selecting Items To move, rotate, or scale items in the scene, you need to select them first. The selection mode buttons determine how items are selected when you click - them in the 3D editor. + them in \uicontrol {3D Editor}: \list \li In the \inlineimage select_item.png @@ -111,80 +156,54 @@ \section1 Moving Items - \image studio-3d-editor-move.png "3D editor in move mode" + \image studio-3d-editor-move.png "3D Editor in move mode" You can move items in relation to their coordinate system, along the x, y, - or z view axis or on the top, bottom, left, and right clip planes of the - render camera. + or z axis or on the top, bottom, left, and right clip planes of the + \uicontrol {3D Editor} camera. To move items, select \inlineimage move_on.png - or press \key W. + or press \key W: - To move items along an axis, click the axis and drag the item along the - axis. - - To move items on a plane, select the plane handle and drag the item on - the plane. - - To move an item freely in the editor, select the handle at the center of - the item. + \list + \li To move items along the axes of the move gizmo, click the axis and + drag the item along the axis. + \li To move items on a plane, click the plane handle and drag the item + on the plane. + \li To move an item freely in the editor, click the gray handle at the + center of the item. + \endlist \section1 Rotating Items - You can rotate items around the view axes of the camera. - - \image studio-3d-editor-rotate.png "3D editor in rotate mode" + \image studio-3d-editor-rotate.png "3D Editor in rotate mode" To rotate items, select \inlineimage rotate_on.png - or press \key E. - - To rotate an item around an axis, select the axis and drag in the direction - you want to rotate the item in. - - To freely rotate the item, select the gray circle. - - \section1 Using Global and Local Orientation - - To switch between global and local orientation, select \uicontrol - {Toggle Local/Global Orientation}. + or press \key E: - In global orientation mode, transformation of a selected object is presented - with respect to the global space. For example, while the move tool is - selected, selecting a cube will show its move gizmo aligned with the axes - of global space. Dragging on the red arrow of the gizmo moves the object in - the global x direction. - - In local orientation mode, the position of a selected object is shown - according to local axes specific to the selected object. For example, - selecting a rotated cube will show its axes rotated, and not aligned with - the axes of global space. Dragging on the red arrow of the gizmo - moves the object in the local x direction in relation to the object. + \list + \li To rotate an item around its rotation gizmo, click the axis and + drag in the direction you want to rotate the item in. + \li To freely rotate the item, select the gray circle. + \endlist \section1 Scaling Items - \image studio-3d-editor-scale.png "3D editor in scale mode" - - To scale items, select \inlineimage scale_on.png - or press \key R. + \image studio-3d-editor-scale.png "3D Editor in scale mode" You can use the scale handles to adjust the local x, y, or z scale of an - item. You can adjust the scale across one, two, or three axes, depending - on the handle. - - To adjust the scale across one axis, select the scale handle attached to - the axis. To uniformly scale an item across all axes, select the handle - at the center of the item. + item. You can adjust the scale across one, two, or three axes, depending on + the handle. - To adjust the scale across a plane, select the plane handle and drag the - item on the plane. - - \section1 Using Edit View Light - - You use 3D light types to light the models in the scene. While editing - scenes, you can use a separate \e {edit view light} to illuminate the - portions of the scene that the scene lights do not hit. To switch the edit - view light on and off, select the \uicontrol {Toggle Edit Light} button (6). + To scale items, select \inlineimage scale_on.png + or press \key R: - For more information about the available scene light types and their - properties, see \l{Using Lights}. + \list + \li To adjust the scale across one axis, click and drag the scale handle + attached to the axis. + \li To adjust the scale across a plane, click the plane handle and drag + the item on the plane. + \li To uniformly scale an item across all axes, click and drag the + handle at the center of the item. + \endlist */ diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc index 6a2939e5e9..ab65cea8f4 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc @@ -68,7 +68,7 @@ \QDS opens QML files that contain 3D scenes in the Design mode and the scenes in the 3D editor. You can add imported 3D assets to projects as 3D components. - \li \l {Working in the 3D Editor} + \li \l {Working in 3D Editor} You can select 3D components in the 3D editor to move, rotate, and scale them in the scene projected by the camera. -- cgit v1.2.1 From 3819b766a47db1e31e13d1faa572fe9a83ac0dc9 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 13 May 2020 16:12:26 +0200 Subject: Doc: Update information about project wizards Qt Quick 3D, Flow Item and Flow view wizards have been added, the Qt for MCUs wizard is now included in Qt Design Studio, and the font loader wizard has been removed. Task-number: QDS-2056 Change-Id: Ie5d42320661977d57767c3bf58fd480e7d6c3c8d Reviewed-by: Thomas Hartmann --- .../creator-only/creator-projects-creating.qdoc | 16 ++++---- .../images/studio-project-wizards.png | Bin 33200 -> 15718 bytes .../src/qtdesignstudio-projects-overview.qdoc | 3 +- .../src/qtdesignstudio-projects.qdoc | 42 +++++++++++---------- .../qtquick3d-editor/qtdesignstudio-3d-view.qdoc | 32 ++++++++-------- 5 files changed, 49 insertions(+), 44 deletions(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index 0866481120..2ff19db916 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -102,18 +102,18 @@ \list \li Qt Quick Application - Empty - Create an empty Qt Quick application that uses Qt Quick 2 types. + Create an empty \l{Qt Quick} application that uses Qt Quick 2 + types. You can build the application and deploy it to desktop, embedded, and mobile target platforms. \li Qt Quick Application - Scroll, Stack, or Swipe - Create a Qt Quick application that uses - \l{http://doc.qt.io/qt-5/qtquickcontrols2-index.html} - {Qt Quick Controls} to implement a scrollable list (requires - Qt 5.9 or later) or a set of pages with a stack-based or - swipe-based navigation model (requires Qt 5.7 or later). + Create a Qt Quick application that uses \l{Qt Quick Controls} to + implement a scrollable list (requires Qt 5.9 or later) or a set + of pages with a stack-based or swipe-based navigation model + (requires Qt 5.7 or later). \endlist \li Application (Qt) @@ -150,8 +150,8 @@ \list \li MCU Support Application - Creates an application that uses a subset of QML and - Qt Quick Controls (as supported by Qt for MCUs) that + Creates an application that uses a subset of Qt QML and + Qt Quick Controls types (as supported by Qt for MCUs) that you can deploy, run, and debug on MCU boards. For more information, see \l {Connecting MCUs}. \endlist diff --git a/doc/qtdesignstudio/images/studio-project-wizards.png b/doc/qtdesignstudio/images/studio-project-wizards.png index 29a31a2e14..bdfb78546a 100644 Binary files a/doc/qtdesignstudio/images/studio-project-wizards.png and b/doc/qtdesignstudio/images/studio-project-wizards.png differ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-projects-overview.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-projects-overview.qdoc index c09078339f..036879ad63 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-projects-overview.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-projects-overview.qdoc @@ -46,8 +46,7 @@ You can use wizards to create projects for the desktop or embedded Linux and Android devices. In addition, you can add individual QML - files, components, font loaders, and JavaScript files to your - projects. + files, components, and JavaScript files to your projects. \li \l{Using Git} diff --git a/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc index f98f53349b..c545d0dab2 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Design Studio documentation. @@ -63,15 +63,22 @@ or create them from scratch using the following wizards: \list - \li \uicontrol General generates projects that are suitable for all - target platforms. - \omit - \li \uicontrol Embedded generates projects that work well on embedded - Linux devices. - \endomit - \li \uicontrol Mobile generates projects that work well on mobile - devices. - \li \uicontrol Desktop generates projects that work well on the desktop. + \li \uicontrol {MCU Support Application} creates an application that + uses a subset of \l{Qt QML} and \l{Qt Quick Controls} types (as + supported by Qt for MCUs) that you can deploy, run, and debug on + MCU boards. + \li \uicontrol {Qt Quick Application - Empty} creates a Qt Quick UI + project that uses \l{Qt Quick} types and can be run on all target + platforms. + \li \uicontrol {Qt Quick 3D Application} creates a Qt Quick UI project + that uses Qt Quick and \l{Qt Quick 3D} types. + \li \uicontrol {Qt Quick Application - Scroll} and + \uicontrol {Qt Quick Application - Stack} create a Qt Quick + application that uses Qt Quick Controls to implement a scrollable + list or a set of pages with a stack-based navigation model. + \li \uicontrol {Qt Quick Application - Launcher} creates a Qt Quick UI + project that uses Qt Quick types and defines a QML laucher + application. \endlist \section1 Using Project Wizards @@ -119,10 +126,12 @@ \list \li \uicontrol {Qt Quick Files} \list + \li \uicontrol {Flow Item} and \uicontrol {Flow View} generate + types that you can use to design the application flow. \li \uicontrol {Qt Quick File} generates a QML type with one of the following types as the root item: \l Item, \l Rectangle, \l Image, \l BorderImage, \l Flickable, - \l Row, \l Column, \l Flow, or \li Grid. + \l Row, \l Column, \l Flow, or \l Grid. \li \uicontrol {Qt Quick UI File} generates a UI form with one of the above types as the root item. \li \uicontrol {Qt Quick Views} generates a \l GridView or a @@ -141,17 +150,12 @@ \li \l [Qt Quick Controls 2] {SwipeView} enables users to navigate pages by swiping sideways. \endlist - \li \uicontrol {QML Files} - \list - \li \l FontLoader imports custom fonts to the project for - deployment to devices. For more information, see - \l {Using Custom Fonts}. - \li \l ListModel adds a list model to the project. - \endlist + \li \uicontrol ListModel adds a \l{ListModel}{list model} to the + project. \li \uicontrol {JavaScript File} generates files that you can use to write the application logic. This is useful for testing the application before the developers implement the application logic in C++, for example. For more information, see \l {Simulating Application Logic}. - \endlist + \endlist */ diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc index de74979357..3cc6c92d2f 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc @@ -30,32 +30,34 @@ \title Adding 3D Views - To display \l {Qt Quick 3D} types in the \uicontrol Library, select - \uicontrol Library > \uicontrol {QML Imports} > \uicontrol {Add Import} > - \uicontrol QtQuick3D. The types are displayed in the \uicontrol {QML Types} - tab. + You can use a wizard to create a Qt Quick 3D UI project that imports + the \l{Qt Quick 3D} QML types to the \uicontrol {QML Types} tab in + \uicontrol Library and contains a 3D view, scene light, camera, and + model. A default material is attached to the model. You can attach + textures to materials. For more information about creating projects, + see \l{Creating Projects}. + + To add a 3D view to some other kind of project and to display the Qt Quick + 3D QML types in \uicontrol Library, select \uicontrol Library > + \uicontrol {QML Imports} > \uicontrol {Add Import} > \uicontrol QtQuick3D. \image studio-qtquick-3d-components.png - To add a 3D view to the scene, drag and drop a \uicontrol {View 3D} - component from \uicontrol Library > \uicontrol {QML Types} > - \uicontrol {Qt Quick 3D} to the 3D editor or to the \uicontrol Navigator. - A 3D view contains a reference node that specifies a scene light, camera, - and model. A default material is attached to the model. You can attach - textures to materials. + To add components to the scene, drag and drop them to \uicontrol Navigator + or \uicontrol {Form Editor}. \image studio-navigator-view3d.png "View 3D component in the Navigator" By default, a directional light and a perspective camera are used. - To use other light and camera types, change the type of the component in - the \uicontrol Type field in the \uicontrol Properties view. For example, + To use other light and camera types, change the type of the component + in the \uicontrol Type field in \uicontrol Properties. For example, to use a point light, enter \e {PointLight}. \image studio-3d-properties-type.png "Type field in Properties view" - To edit component properties, select the component in the 3D editor - or in the \uicontrol Navigator and modify the property values in the - \uicontrol Properties view. + To edit component properties, select the component in + \uicontrol {Form Editor} or \uicontrol Navigator and + modify the property values in \uicontrol Properties. \image studio-qtquick-3d-view.png "View 3D component properties" -- cgit v1.2.1 From 921b56cd468b14f322cbb9e9441f1e32326b0b46 Mon Sep 17 00:00:00 2001 From: Johanna Vanhatapio Date: Fri, 15 May 2020 10:56:08 +0300 Subject: Doc: Update information about views for editing 3D assets Task-number: QDS-2056 Change-Id: Iee6aab42c4cd6d97d99eafc3599e55828f0d9657 Reviewed-by: Mahmoud Badri Reviewed-by: Miikka Heikkinen Reviewed-by: Leena Miettinen --- .../images/studio-editing-3d-scenes.png | Bin 74154 -> 87606 bytes .../qtdesignstudio-3d-design-mode.qdoc | 70 ++++++++------------- 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/doc/qtdesignstudio/images/studio-editing-3d-scenes.png b/doc/qtdesignstudio/images/studio-editing-3d-scenes.png index 329e38b5c3..f5b29439a7 100644 Binary files a/doc/qtdesignstudio/images/studio-editing-3d-scenes.png and b/doc/qtdesignstudio/images/studio-editing-3d-scenes.png differ diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc index 3d9da455cb..e2457f512f 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc @@ -35,57 +35,41 @@ \title Editing 3D Assets in Design Mode \QDS opens QML files that contain 3D scenes in the Design mode and the - scenes in the 3D editor. You can add imported 3D assets - to projects and edit them to create scenes and states, as well as the - transitions between them. + scenes in \uicontrol {3D Editor}. You can add imported 3D assets to projects + and edit them to create scenes and states, as well as the transitions + between them. The other views enable you to select QML types to use in the + scene, specify properties for them, and view them in a tree structure, + as well as to create connections and browse projects and files. \image studio-editing-3d-scenes.png "3D assets in Design mode" - To edit 3D scenes in the Design mode: + To open the following views, select \uicontrol Window > \uicontrol Views: \list \li \uicontrol {3D Editor} (1) is the working area where you create the scene, position the model, light and camera, as well as move and - scale items. - \li \uicontrol {3D View} (2) is where you see the scene projected by the - camera. - \li The sidebars contain views where you can select QML types to use in - the scene, specify properties for them, and view them in a tree - structure, as well as to create connections and browse projects and - files. You can select the content of the sidebars in the sidebar - menu: - \list - \li \uicontrol {Library} (3) displays the building blocks that you - can use to create scenes: predefined Qt Quick 3D Components, - Qt Quick Controls, your own 3D assets that you import to the - project, and other assets. For more information, see - \l {Adding 3D Views}. - \li \uicontrol {Navigator} (4) displays the items in the current QML - file as a tree structure. For more information, see - \l {Managing Item Hierarchy}. - \li \uicontrol {Properties} (5) organizes the properties of the - selected item. You can change the properties also in the - \uicontrol {Text Editor}. For more information, see - \l {Specifying Item Properties}. - \li \uicontrol Connections enables you to create connections - between objects, signals, and object properties. For more - information, see \l{Adding Connections}. - \li \uicontrol {File System} shows all files in the currently - selected directory. For more information, see - \l{Viewing the File System}. - \li \uicontrol {Open Documents} shows currently open files. - \li \uicontrol {Projects} shows a list of projects open in the - current session. For more information, see - \l{Viewing Project Files}. - \endlist - \li \uicontrol {States} displays the different states of the - item. QML states typically describe user interface configurations, - such as the UI controls, their properties and behavior and the - available actions. For more information, see \l{Adding States}. - \li \uicontrol Timeline (6) provides a timeline and keyframe based + scale items. For more information, see \l {Working in 3D Editor}. + \li \uicontrol {Form Editor} (2) is where you see the scene projected by + the camera. + \li \uicontrol {Library} (3) displays the building blocks that you + can use to create scenes: predefined Qt Quick 3D Components, + Qt Quick Controls, your own 3D assets that you import to the + project, and other assets. For more information, see \l {Adding 3D + Views}. + \li \uicontrol {Navigator} (4) displays the items in the current QML + file as a tree structure. For more information, see + \l {Managing Item Hierarchy}. + \li \uicontrol {Properties} (5) organizes the properties of the + selected item. You can change the properties also in the + \uicontrol {Text Editor}. For more information, see + \l {Specifying Item Properties}. + \li \uicontrol Connections (6) enables you to create connections + between objects, signals, and object properties. For more + information, see \l{Adding Connections}. + \li \uicontrol Timeline (7) provides a timeline and keyframe based editor that enables you to animate the properties of components. \endlist - To close the 3D editor, select \uicontrol 2D in the list on the toolbar (7). - To reopen it, select \uicontrol {2D/3D}. + For more information on other views, see + \l {Editing QML Files in Design Mode}. */ -- cgit v1.2.1 From 7051ba84984b20676ef2de07349e56b0d7bdfa8c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 14 May 2020 08:49:47 +0200 Subject: Build script: Add option for passing arguments to build command So one can pass e.g. -j3 when locally testing while still doing other things Change-Id: I7a528884f19698290e49c372eb31030afe609d23 Reviewed-by: Eike Ziller --- scripts/build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build.py b/scripts/build.py index 8102224cd8..e7e414f508 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -87,6 +87,8 @@ def get_arguments(): action='store_true', default=False) parser.add_argument('--no-zip', help='Skip creation of 7zip files for install and developer package', action='store_true', default=False) + parser.add_argument('--add-make-arg', help='Passes the argument to the make tool.', + action='append', dest='make_args', default=[]) return parser.parse_args() def build_qtcreator(args, paths): @@ -137,7 +139,10 @@ def build_qtcreator(args, paths): '-DIDE_REVISION_URL=https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=' + ide_revision] common.check_print_call(cmake_args + [paths.src], paths.build) - common.check_print_call(['cmake', '--build', '.'], paths.build) + build_args = ['cmake', '--build', '.'] + if args.make_args: + build_args += ['--'] + args.make_args + common.check_print_call(build_args, paths.build) if not args.no_docs: common.check_print_call(['cmake', '--build', '.', '--target', 'docs'], paths.build) -- cgit v1.2.1