Merge "Merge remote-tracking branch 'origin/5.0'"
@@ -57,6 +57,7 @@ if(GoogleBenchmark_FOUND AND NOT TARGET GoogleBenchmark)
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/counter.cc"
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/csv_reporter.cc"
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/json_reporter.cc"
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/perf_counters.cc"
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/reporter.cc"
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/sleep.cc"
|
||||
"${GOOGLE_BENCHMARK_SRC_DIR}/statistics.cc"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
dependencies:
|
||||
../../qt/qt5.git:
|
||||
ref: "6.1"
|
||||
ref: "6.2"
|
||||
|
||||
|
BIN
doc/qtcreator/images/icons/align-bottom.png
Normal file
After Width: | Height: | Size: 200 B |
BIN
doc/qtcreator/images/icons/align-center-horizontal.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
doc/qtcreator/images/icons/align-center-vertical.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
doc/qtcreator/images/icons/align-left.png
Normal file
After Width: | Height: | Size: 210 B |
BIN
doc/qtcreator/images/icons/align-right.png
Normal file
After Width: | Height: | Size: 211 B |
BIN
doc/qtcreator/images/icons/align-top.png
Normal file
After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 496 B After Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 166 B |
BIN
doc/qtcreator/images/icons/center-horizontal.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
doc/qtcreator/images/icons/center-vertical.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
doc/qtcreator/images/icons/distribute-bottom.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
doc/qtcreator/images/icons/distribute-center-horizontal.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
doc/qtcreator/images/icons/distribute-center-vertical.png
Normal file
After Width: | Height: | Size: 128 B |
BIN
doc/qtcreator/images/icons/distribute-left.png
Normal file
After Width: | Height: | Size: 124 B |
BIN
doc/qtcreator/images/icons/distribute-origin-bottom-right.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
doc/qtcreator/images/icons/distribute-origin-center.png
Normal file
After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 179 B |
BIN
doc/qtcreator/images/icons/distribute-origin-top-left.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
doc/qtcreator/images/icons/distribute-right.png
Normal file
After Width: | Height: | Size: 127 B |
BIN
doc/qtcreator/images/icons/distribute-spacing-horizontal.png
Normal file
After Width: | Height: | Size: 194 B |
BIN
doc/qtcreator/images/icons/distribute-spacing-vertical.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
doc/qtcreator/images/icons/distribute-top.png
Normal file
After Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtquick-designer-color-details.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
doc/qtcreator/images/qtquick-designer-color-palette.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 6.4 KiB |
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -72,6 +72,17 @@
|
||||
\QC automatically adds run configurations for all targets declared with
|
||||
\c {executable()} function in Meson build descriptions.
|
||||
|
||||
\section1 Selecting Default Run Target
|
||||
|
||||
\QC has multiple executables, but when you run a project you typically want
|
||||
to run \c qtcreator and not the first executable in the list. To filter the
|
||||
run target list, set \c qtc_runnable as the value of the \c FOLDER property
|
||||
in the \c {CMakeLists.txt} file for the project. For example:
|
||||
|
||||
\badcode
|
||||
set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable")
|
||||
\endcode
|
||||
|
||||
\section1 Creating Run Configurations for Subprojects
|
||||
|
||||
To prevent \QC from automatically creating run configurations for SUBDIRS
|
||||
|
@@ -112,7 +112,13 @@
|
||||
|
||||
In the \uicontrol {Accepted buttons} field, select the mouse button that
|
||||
the mouse area reacts to. Select \uicontrol AllButtons to have the mouse
|
||||
are react to all mouse buttons.
|
||||
area react to all mouse buttons. You can add support for several buttons
|
||||
in \l {Text Editor} or \uicontrol {Binding Editor} by combining the
|
||||
values with the OR operator (|). For more information about the available
|
||||
values, see the developer documentation for \l {MouseArea::acceptedButtons}
|
||||
{acceptedButtons}.
|
||||
|
||||
\image qtquick-properties-mouse-area-accepted-buttons.png "Adding accepted buttons in Binding Editor"
|
||||
|
||||
In the \uicontrol {Cursor shape} field, select the cursor shape for this
|
||||
mouse area. On platforms that do not display a mouse cursor, this value
|
||||
|
@@ -81,7 +81,8 @@
|
||||
string and press \key Ctrl+Space to display a list of properties, IDs, and
|
||||
code snippets. When you enter a period (.) after a property name, a list of
|
||||
available values is displayed. Press \key Enter to accept the first
|
||||
suggestion in the list and to complete the code.
|
||||
suggestion in the list and to complete the code. For more information, see
|
||||
\l{Completing Code}.
|
||||
|
||||
When a binding is set, the \uicontrol Actions menu icon changes to
|
||||
\inlineimage icons/action-icon-binding
|
||||
@@ -135,21 +136,21 @@
|
||||
\c {anchor.left: sibling.right}. This allows you to keep sibling components
|
||||
together.
|
||||
|
||||
In the following image, \uicontrol{Rectangle 2} is anchored to
|
||||
\uicontrol {Rectangle 1} on its left and to the bottom of its parent.
|
||||
In the following image, the left edge of \e rectangle1 is anchored to the
|
||||
right edge of the sibling on its left side, \e rectangle, while its top
|
||||
edge is anchored to the top of its parent.
|
||||
|
||||
\image qmldesigner-anchors.png "Anchoring sibling components"
|
||||
|
||||
The anchors for \uicontrol{Rectangle 2} are specified as follows in code:
|
||||
The anchors are specified as follows in code:
|
||||
|
||||
\qml
|
||||
Rectangle {
|
||||
id: rectangle2
|
||||
anchors.left: rectangle1.right
|
||||
anchors.leftMargin: 78
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 200
|
||||
//
|
||||
id: rectangle1
|
||||
anchors.left: rectangle.right
|
||||
anchors.top: parent.top
|
||||
anchors.leftMargin: 5
|
||||
anchors.topMargin: 30
|
||||
}
|
||||
\endqml
|
||||
|
||||
@@ -167,11 +168,11 @@
|
||||
|
||||
\image qmldesigner-alignment.png "Aligning sibling components"
|
||||
|
||||
Select the buttons in the \uicontrol Align group to align the top/bottom
|
||||
or left/right edges of the components in the group to the one farthest away
|
||||
Select the buttons in the \uicontrol Alignment field to align the top/bottom
|
||||
or left/right edges of a group of components to the one farthest away
|
||||
from the center of the group. For example, when left-aligning, the
|
||||
components are aligned to the leftmost component. You can also align the
|
||||
horizontal/vertical centers of components, or both, as in the image above.
|
||||
horizontal/vertical centers of components, or both.
|
||||
|
||||
In the \uicontrol {Align to} field, select whether to align the components
|
||||
in respect to the selection, the root component, or a \e {key component}
|
||||
@@ -185,33 +186,105 @@
|
||||
values possible or tweak your design so that the components and spacing
|
||||
can be distributed perfectly.
|
||||
|
||||
When distributing components, you can select whether the distance between
|
||||
them is calculated from their top/bottom or left/right edges or their
|
||||
horizontal/vertical center.
|
||||
When distributing components, select the buttons in the
|
||||
\uicontrol {Distribute objects} field to determine whether the
|
||||
distance between components is calculated from their top/bottom
|
||||
or left/right edges or their horizontal/vertical center.
|
||||
|
||||
\image qmldesigner-distribute-objects.png "Distribute components buttons"
|
||||
|
||||
You can distribute spacing either evenly within a target area or at
|
||||
When distributing spacing, select the buttons in the
|
||||
\uicontrol {Distribute spacing} field to determine whether
|
||||
it is distributed evenly within a target area or at
|
||||
specified distances, calculated from a starting point.
|
||||
|
||||
You can select the orientation in which the components are distributed
|
||||
evenly within the target area: horizontally along the x axis or vertically
|
||||
along the y axis.
|
||||
|
||||
\image qmldesigner-distribute-spacing-evenly.png "Distribute spacing evenly"
|
||||
|
||||
Alternatively, you can distribute spacing in pixels by selecting one of the
|
||||
starting point buttons: left/right or top/bottom edge of the target area,
|
||||
or its horizontal/vertical center. Note that some components might end up
|
||||
outside the target area.
|
||||
starting point buttons: top-left or bottom-right edge of the target area,
|
||||
or its center. Note that some components might end up outside the target
|
||||
area.
|
||||
|
||||
\image qmldesigner-distribute-spacing-pixels.png "Distribute spacing in pixels"
|
||||
|
||||
You can set the space between components in pixels. You can
|
||||
disable the distribution of spacing in pixels by clicking
|
||||
the \inlineimage icons/distribute-origin-none.png
|
||||
In the \uicontrol {Pixel spacing} field, you can set the space between
|
||||
components in pixels. You can disable the distribution of spacing in
|
||||
pixels by clicking the \inlineimage icons/distribute-origin-none.png
|
||||
button.
|
||||
|
||||
\section3 Summary of Aligment Buttons
|
||||
|
||||
The following table summarizes the buttons available in the
|
||||
\uicontrol Alignment section.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Icon
|
||||
\li Purpose
|
||||
\row
|
||||
\li \inlineimage icons/align-left.png
|
||||
\li Aligns the left edges of the selected components to the one
|
||||
farthest away from the center of the group.
|
||||
\row
|
||||
\li \inlineimage icons/align-center-horizontal.png
|
||||
\li Aligns the horizontal centers of the selected components.
|
||||
\row
|
||||
\li \inlineimage icons/align-right.png
|
||||
\li Aligns the right edges of the selected components.
|
||||
\row
|
||||
\li \inlineimage icons/align-top.png
|
||||
\li Aligns the top edges of the selected components.
|
||||
\row
|
||||
\li \inlineimage icons/align-center-vertical.png
|
||||
\li Aligns the verical centers of the selected components.
|
||||
\row
|
||||
\li \inlineimage icons/align-bottom.png
|
||||
\li Aligns the bottom edges of the selected components.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-left.png
|
||||
\li Distributes the selected components and calculates the distance
|
||||
between them from their left edges.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-center-horizontal.png
|
||||
\li Distributes the selected components and calculates the distance
|
||||
between them from their horizontal centers.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-right.png
|
||||
\li Distributes the selected components and calculates the distance
|
||||
between them from their right edges.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-top.png
|
||||
\li Distributes the selected components and calculates the distance
|
||||
between them from their top edges.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-center-vertical.png
|
||||
\li Distributes the selected components and calculates the distance
|
||||
between them from their vertical centers.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-bottom.png
|
||||
\li Distributes the selected components and calculates the distance
|
||||
between them from their bottom edges.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-spacing-horizontal.png
|
||||
\li Distributes spacing between the selected components horizontally.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-spacing-vertical.png
|
||||
\li Distributes spacing between the selected components vertically.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-origin-none.png
|
||||
\li Disables the distribution of spacing in pixels.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-origin-top-left.png
|
||||
\li Sets the top-left corner of the target area as the starting point
|
||||
for distributing spacing in pixels.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-origin-center.png
|
||||
\li Sets the center of the target area as the starting point
|
||||
for distributing spacing in pixels.
|
||||
\row
|
||||
\li \inlineimage icons/distribute-origin-bottom-right.png
|
||||
\li Sets the bottom-right corner of the target area as the starting
|
||||
point for distributing spacing in pixels.
|
||||
\endtable
|
||||
|
||||
\section2 Using Positioners
|
||||
|
||||
Positioner components are containers that manage the positions of their
|
||||
@@ -239,7 +312,7 @@
|
||||
|
||||
In addition, you can specify the vertical and horizontal padding between
|
||||
content and the left, right, top, and bottom edges of components as values
|
||||
of the fields in the \uicontrol Padding group.
|
||||
of the fields in the \l Padding section.
|
||||
|
||||
\section3 Row and Flow Positioners
|
||||
|
||||
@@ -256,7 +329,8 @@
|
||||
either left-to-right or top-to-bottom in the \uicontrol Flow field.
|
||||
Components are positioned next to to each other according to the value you
|
||||
set in the \uicontrol {Layout direction} field until the width or height of
|
||||
the Flow component is exceeded, then wrapped to the next row or column.
|
||||
the \uicontrol Flow component is exceeded, then wrapped to the next row or
|
||||
column.
|
||||
|
||||
You can set the layout direction to either \uicontrol LeftToRight or
|
||||
\uicontrol RightToLeft in the \uicontrol {Layout direction} field. If
|
||||
@@ -284,7 +358,7 @@
|
||||
|
||||
To mirror the layout, set the layout direction to \uicontrol RightToLeft.
|
||||
To also mirror the horizontal alignment of components, select
|
||||
\uicontrol AlignRight in the \uicontrol {Horizontal item alignment} field.
|
||||
\uicontrol AlignRight in the \uicontrol {Alignment H} field.
|
||||
|
||||
\section3 Summary of Positioners
|
||||
|
||||
@@ -328,8 +402,8 @@
|
||||
Unlike positioners, layouts manage both the positions and sizes of their
|
||||
child components, and are therefore well suited for dynamic and resizable
|
||||
UIs. However, this means that you should not specify fixed positions and
|
||||
sizes for the child components in the \l{2D Geometry}{Geometry} group in
|
||||
\l Properties, unless their implicit sizes are not satisfactory.
|
||||
sizes for the child components in the \l{2D Geometry}{Geometry - 2D} section
|
||||
in \l Properties, unless their implicit sizes are not satisfactory.
|
||||
|
||||
You can use anchors or the width and height properties of the layout itself
|
||||
to specify its size in respect to its non-layout parent component. However,
|
||||
@@ -367,14 +441,16 @@
|
||||
The child components of grid layout components are arranged according to the
|
||||
\uicontrol Flow property. When the direction of a flow is set to
|
||||
\uicontrol LeftToRight, child components are positioned next to to each
|
||||
other until the the number of \uicontrol Columns is reached. Then,
|
||||
other until the the number of columns specified in the
|
||||
\uicontrol {Columns & Rows} field is reached. Then,
|
||||
the auto-positioning wraps back to the beginning of the next row.
|
||||
|
||||
\image qtquick-layout-grid-properties.png "Grid Layout properties"
|
||||
|
||||
If you set the direction of the flow to \uicontrol TopToBottom, child
|
||||
components are auto-positioned vertically using the value of the
|
||||
\uicontrol Rows field to determine the maximum number of rows.
|
||||
components are auto-positioned vertically using the number of rows set
|
||||
in the \uicontrol {Columns & Rows} field to determine the maximum number
|
||||
of rows.
|
||||
|
||||
You can set the layout direction to either \uicontrol LeftToRight or
|
||||
\uicontrol RightToLeft in the \uicontrol {Layout direction} field.
|
||||
@@ -382,7 +458,7 @@
|
||||
will be mirrored.
|
||||
|
||||
You can specify the spacing between rows and columns in the
|
||||
\uicontrol {Row spacing} and \uicontrol {Column spacing} fields.
|
||||
\uicontrol Spacing field.
|
||||
|
||||
\section3 Stack Layout
|
||||
|
||||
|
@@ -84,7 +84,7 @@
|
||||
Set the properties in the \uicontrol {Geometry - 2D} section to determine
|
||||
the position and size of a component.
|
||||
|
||||
\image qtquick-properties-2d-geometry.png "2D Geometry properties"
|
||||
\image qtquick-properties-2D-geometry.png "2D Geometry properties"
|
||||
|
||||
In the \uicontrol Position group, you can set the position of a component on
|
||||
the x and y axis. The position of a component in the UI can be either
|
||||
@@ -180,21 +180,42 @@
|
||||
|
||||
\section1 Picking Colors
|
||||
|
||||
To specify the color of the selected component in the color picker view (1),
|
||||
select the color picker icon (2) in the \uicontrol Properties view.
|
||||
You can define color properties for some of the components in the
|
||||
\uicontrol Properties view by using the color picker. Open the color picker
|
||||
by clicking, for example, the color field of the \uicontrol {Fill color} or
|
||||
\uicontrol {Border color} property.
|
||||
|
||||
\image qtquick-designer-color-picker.png "Color Picker view"
|
||||
|
||||
You can use either a solid color (3) or a gradient (4). You can select the
|
||||
gradient in the \uicontrol {Gradient Picker} (5).
|
||||
To select a new color, click the color of your choice in the color selector
|
||||
(1), or click the \uicontrol {Eye Dropper} icon (2) to be able to select any
|
||||
color visible in your screen to use further in your project.
|
||||
|
||||
The \uicontrol Original field displays the original color of the component,
|
||||
whereas the \uicontrol New field displays the current color. The
|
||||
\uicontrol Recent field displays the colors that you have last selected.
|
||||
while the \uicontrol New field displays the current color.
|
||||
|
||||
\section1 Picking Gradients
|
||||
Make the color fully transparent by clicking the \uicontrol Transparent icon
|
||||
(3).
|
||||
|
||||
A gradient is defined by two or more colors, which will be blended
|
||||
To use preset \l {Selecting Web Gradients}{web gradients}, click the
|
||||
\uicontrol {Gradient Picker} icon (4).
|
||||
|
||||
Use the dropdown menu (5) to determine the color fill type you wish to use.
|
||||
You can choose a solid or a gradient color. Available gradient types vary
|
||||
between components. The items listed in light grey are not available for the
|
||||
selected component.
|
||||
|
||||
The current color bar (6) shows gradient and gradient stops when a gradient
|
||||
is selected.
|
||||
|
||||
Use the hue slider (7) or the alpha slider (8) to further define a new
|
||||
color.
|
||||
|
||||
Click the \uicontrol X icon to close the color picker.
|
||||
|
||||
\section2 Picking Gradients
|
||||
|
||||
A gradient is defined by two or more colors which are blended
|
||||
seamlessly. The colors are specified as a set of gradient stops,
|
||||
each of which defines a position on the gradient bar from 0.0 to 1.0
|
||||
and a color. Drag the gradient stops along the gradient bar to set their
|
||||
@@ -205,6 +226,10 @@
|
||||
it with the finger-shaped cursor. To remove gradient stops, pull them away
|
||||
from the gradient line.
|
||||
|
||||
Set the direction of the gradient by selecting \uicontrol Horizontal
|
||||
or \uicontrol Vertical in the \uicontrol {Gradient Controls} section of the
|
||||
color picker.
|
||||
|
||||
\image qtquick-designer-gradient-stops.gif
|
||||
|
||||
Calculating gradients can be computationally expensive compared to the
|
||||
@@ -214,10 +239,13 @@
|
||||
\if defined(qtdesignstudio)
|
||||
\section2 Setting Gradient Properties
|
||||
|
||||
Select the arrow below the gradient button to set gradient properties
|
||||
for \l{Shapes}{Qt Quick Studio Components}.
|
||||
\image qtquick-designer-gradient-types.png "Available gradient types"
|
||||
|
||||
\image qtquick-designer-gradient-types.png "Gradients supported by Qt Quick Studio Components"
|
||||
You can select \uicontrol Linear (1), \uicontrol Radial (2), or
|
||||
\uicontrol Conical (3) as the color fill type. After selecting one of the
|
||||
gradient types, you can define the gradient properties for
|
||||
\l{Shapes}{Qt Quick Studio Components} in the \uicontrol {Gradient Controls}
|
||||
section of the color picker.
|
||||
|
||||
\section3 Linear Gradients
|
||||
|
||||
@@ -227,7 +255,7 @@
|
||||
vertical interpolation in the \uicontrol X1, \uicontrol X2, \uicontrol Y1,
|
||||
and \uicontrol Y2 fields.
|
||||
|
||||
\image qtquick-designer-gradient-properties-linear.png "Linear gradient properties"
|
||||
\image qtquick-designer-gradient-properties-linear.png "Linear gradient controls"
|
||||
|
||||
\section3 Radial Gradients
|
||||
|
||||
@@ -236,16 +264,17 @@
|
||||
be transparent. Outside the end points, the gradient is either padded,
|
||||
reflected, or repeated depending on the spread type.
|
||||
|
||||
\image qtquick-designer-gradient-properties-radial.png "Radial gradient properties"
|
||||
|
||||
You can set the center and focal radius in the \uicontrol {Center radius}
|
||||
and \uicontrol {Focal radius} fields. For simple radial gradients, set
|
||||
the focal radius to 0.
|
||||
\uicontrol {Focal radius} to 0.
|
||||
|
||||
You can set the center and focal points in the \uicontrol CenterX,
|
||||
\uicontrol CenterY, \uicontrol FocalX, and \uicontrol FocalY fields.
|
||||
To specify a simple radial gradient, set the focal X and focal Y to
|
||||
the value of center X and center Y, respectively.
|
||||
To specify a simple radial gradient, set the \uicontrol FocalX and
|
||||
\uicontrol FocalY to the value of \uicontrol CenterX and \uicontrol CenterY,
|
||||
respectively.
|
||||
|
||||
\image qtquick-designer-gradient-properties-radial.png "Radial gradient properties"
|
||||
|
||||
\section3 Conical Gradients
|
||||
|
||||
@@ -264,7 +293,7 @@
|
||||
that support \l QGradient.
|
||||
|
||||
To open the \uicontrol {Gradient Picker}, select the
|
||||
\uicontrol {Gradient Picker Dialog} icon in the \uicontrol Properties view.
|
||||
\uicontrol {Gradient Picker Dialog} icon (4).
|
||||
|
||||
\image qtquick-designer-gradient-picker.png "Gradient Picker dialog"
|
||||
|
||||
@@ -273,8 +302,43 @@
|
||||
To save a gradient in the \uicontrol {User Presets} tab, select
|
||||
\uicontrol Save.
|
||||
|
||||
By default, a linear gradient (4) is used, but you can select another
|
||||
supported gradient type in the \uicontrol Properties view.
|
||||
By default, a linear gradient is used, but you can select another
|
||||
supported gradient type in the dropdown menu (5) of the color picker.
|
||||
|
||||
\section2 Color Details
|
||||
|
||||
Further define the colors in your project by modifying the properties in the
|
||||
\uicontrol {Color Details} section of the color picker.
|
||||
|
||||
\image qtquick-designer-color-details.png "Color Details tab"
|
||||
|
||||
Use the \uicontrol Hex property to enter the Hex value of a new color
|
||||
manually. Define exact values for red, green, and blue using the
|
||||
\uicontrol Hex property to create different shades for the colors used in
|
||||
the project.
|
||||
|
||||
The default color value mode is HSVA (hue-saturation-value-alpha). Use the
|
||||
dropdown menu to change the color value mode to RGBA (red-green-blue-alpha)
|
||||
or HSLA (hue-saturation-lightness-alpha). \e Hue is defined in degrees which
|
||||
refer to different colors of the color wheel. \e Saturation modifies the
|
||||
intensity of the color. \e Value determines the brightness of the color. In
|
||||
HSLA \e Lightness signifies the amount of white or black blended with the
|
||||
color.
|
||||
|
||||
\section2 Palette
|
||||
|
||||
\image qtquick-designer-color-palette.png "Color Palette tab"
|
||||
|
||||
Use the dropdown menu in the \uicontrol Palette section of the
|
||||
color picker to change the \uicontrol Palette type. \uicontrol Recent
|
||||
displays the recent colors used in the project, while \uicontrol Favorites
|
||||
shows the colors you have added to your collection of favorite colors. You
|
||||
can add colors to \uicontrol Favorites by right-clicking the color thumbnail
|
||||
for \uicontrol Original, \uicontrol New, or in \uicontrol Palette >
|
||||
\uicontrol Recent colors and selecting \uicontrol {Add to Favorites}.
|
||||
|
||||
Click one of the \uicontrol Palette color thumbnails to select it as
|
||||
the new color.
|
||||
|
||||
\section1 Specifying Developer Properties
|
||||
|
||||
|
@@ -247,12 +247,20 @@ def build_qtcreatorcdbext(args, paths):
|
||||
'--component', 'qtcreatorcdbext'],
|
||||
paths.qtcreatorcdbext_build)
|
||||
|
||||
def zipPatternForApp(paths):
|
||||
# workaround for QTBUG-95845
|
||||
if not common.is_mac_platform():
|
||||
return '*'
|
||||
apps = [d for d in os.listdir(paths.install) if d.endswith('.app')]
|
||||
return apps[0] if apps else '*'
|
||||
|
||||
|
||||
def package_qtcreator(args, paths):
|
||||
if not args.no_zip:
|
||||
if not args.no_qtcreator:
|
||||
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads,
|
||||
os.path.join(paths.result, 'qtcreator' + args.zip_infix + '.7z'),
|
||||
'*'],
|
||||
zipPatternForApp(paths)],
|
||||
paths.install)
|
||||
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads,
|
||||
os.path.join(paths.result, 'qtcreator' + args.zip_infix + '_dev.7z'),
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
@@ -24,30 +24,35 @@
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import QtQuick.Layouts 1.15
|
||||
import HelperWidgets 2.0
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Column {
|
||||
id: column
|
||||
width: parent.width
|
||||
spacing: 10
|
||||
padding: 10
|
||||
|
||||
Label {
|
||||
Text {
|
||||
text: qsTr("This is an instance of a component")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: 300
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
font.pixelSize: StudioTheme.Values.myFontSize
|
||||
}
|
||||
|
||||
StudioControls.AbstractButton {
|
||||
id: testtest
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: 180
|
||||
spacing: 0
|
||||
|
||||
buttonIcon: qsTr("Edit Base Component")
|
||||
iconFont: StudioTheme.Constants.font
|
||||
AbstractButton {
|
||||
implicitWidth: 180
|
||||
buttonIcon: qsTr("Edit Base Component")
|
||||
iconFont: StudioTheme.Constants.font
|
||||
|
||||
onClicked: goIntoComponent()
|
||||
onClicked: goIntoComponent()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -158,13 +158,14 @@ QtObject {
|
||||
readonly property string unpin: "\u0099"
|
||||
readonly property string upDownIcon: "\u009A"
|
||||
readonly property string upDownSquare2: "\u009B"
|
||||
readonly property string visibilityOff: "\u009C"
|
||||
readonly property string visibilityOn: "\u009D"
|
||||
readonly property string wildcard: "\u009E"
|
||||
readonly property string zoomAll: "\u009F"
|
||||
readonly property string zoomIn: "\u00A0"
|
||||
readonly property string zoomOut: "\u00A1"
|
||||
readonly property string zoomSelection: "\u00A2"
|
||||
readonly property string visibilityOffBroken: "\u009C" // visibilityOff
|
||||
readonly property string visibilityOff: "\u009D" // visibilityOff2
|
||||
readonly property string visibilityOn: "\u009E"
|
||||
readonly property string wildcard: "\u009F"
|
||||
readonly property string zoomAll: "\u00A0"
|
||||
readonly property string zoomIn: "\u00A1"
|
||||
readonly property string zoomOut: "\u00A2"
|
||||
readonly property string zoomSelection: "\u00A3"
|
||||
|
||||
readonly property font iconFont: Qt.font({
|
||||
"family": controlIcons.name,
|
||||
|
@@ -155,6 +155,8 @@ void ToolTip::show(
|
||||
{
|
||||
if (content && content->count()) {
|
||||
auto tooltipWidget = new FakeToolTip;
|
||||
// limit the size of the widget to 90% of the screen size to have some context around it
|
||||
tooltipWidget->setMaximumSize(QGuiApplication::screenAt(pos)->availableSize() * 0.9);
|
||||
if (contextHelp.isNull()) {
|
||||
tooltipWidget->setLayout(content);
|
||||
} else {
|
||||
|
@@ -144,8 +144,11 @@ QSize TestResultDelegate::sizeHint(const QStyleOptionViewItem &option, const QMo
|
||||
int fontHeight = fm.height();
|
||||
TestResultFilterModel *resultFilterModel = static_cast<TestResultFilterModel *>(view->model());
|
||||
LayoutPositions positions(opt, resultFilterModel);
|
||||
const int depth = resultFilterModel->itemForIndex(index)->level() + 1;
|
||||
const int indentation = depth * view->style()->pixelMetric(QStyle::PM_TreeViewIndentation, &opt);
|
||||
|
||||
QSize s;
|
||||
s.setWidth(opt.rect.width());
|
||||
s.setWidth(opt.rect.width() - indentation);
|
||||
|
||||
if (selected) {
|
||||
const TestResult *testResult = resultFilterModel->testResult(index);
|
||||
@@ -153,7 +156,7 @@ QSize TestResultDelegate::sizeHint(const QStyleOptionViewItem &option, const QMo
|
||||
QString output = testResult->outputString(selected);
|
||||
limitTextOutput(output);
|
||||
output.replace('\n', QChar::LineSeparator);
|
||||
recalculateTextLayout(index, output, opt.font, positions.textAreaWidth());
|
||||
recalculateTextLayout(index, output, opt.font, positions.textAreaWidth() - indentation);
|
||||
|
||||
s.setHeight(m_lastCalculatedHeight + 3);
|
||||
} else {
|
||||
@@ -174,9 +177,12 @@ void TestResultDelegate::currentChanged(const QModelIndex ¤t, const QModel
|
||||
|
||||
void TestResultDelegate::clearCache()
|
||||
{
|
||||
const QModelIndex current = m_lastProcessedIndex;
|
||||
m_lastProcessedIndex = QModelIndex();
|
||||
m_lastProcessedFont = QFont();
|
||||
m_lastWidth = -1;
|
||||
if (current.isValid())
|
||||
emit sizeHintChanged(current);
|
||||
}
|
||||
|
||||
void TestResultDelegate::limitTextOutput(QString &output) const
|
||||
|
@@ -166,6 +166,7 @@ TestResultsPane::TestResultsPane(QObject *parent) :
|
||||
this, &TestResultsPane::addTestResult);
|
||||
connect(TestRunner::instance(), &TestRunner::hadDisabledTests,
|
||||
m_model, &TestResultModel::raiseDisabledTests);
|
||||
visualOutputWidget->installEventFilter(this);
|
||||
}
|
||||
|
||||
void TestResultsPane::createToolButtons()
|
||||
@@ -576,6 +577,14 @@ void TestResultsPane::filterMenuTriggered(QAction *action)
|
||||
navigateStateChanged();
|
||||
}
|
||||
|
||||
bool TestResultsPane::eventFilter(QObject *object, QEvent *event)
|
||||
{
|
||||
QTC_ASSERT(m_outputWidget, return false);
|
||||
if (event->type() == QEvent::Resize && object->parent() == m_outputWidget)
|
||||
static_cast<TestResultDelegate *>(m_treeView->itemDelegate())->clearCache();
|
||||
return false;
|
||||
}
|
||||
|
||||
void TestResultsPane::onTestRunStarted()
|
||||
{
|
||||
m_testRunning = true;
|
||||
|
@@ -105,6 +105,7 @@ private:
|
||||
void onRunSelectedTriggered();
|
||||
void checkAllFilter(bool checked);
|
||||
void filterMenuTriggered(QAction *action);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
void initializeFilterMenu();
|
||||
void updateSummaryLabel();
|
||||
|
@@ -1372,12 +1372,13 @@ void ClangdClient::findLocalUsages(TextEditor::TextDocument *document, const QTe
|
||||
void ClangdClient::gatherHelpItemForTooltip(const HoverRequest::Response &hoverResponse,
|
||||
const DocumentUri &uri)
|
||||
{
|
||||
// Macros aren't locatable via the AST, so parse the formatted string.
|
||||
if (const Utils::optional<Hover> result = hoverResponse.result()) {
|
||||
const HoverContent content = result->content();
|
||||
const MarkupContent * const markup = Utils::get_if<MarkupContent>(&content);
|
||||
if (markup) {
|
||||
const QString markupString = markup->content();
|
||||
|
||||
// Macros aren't locatable via the AST, so parse the formatted string.
|
||||
static const QString magicMacroPrefix = "### macro `";
|
||||
if (markupString.startsWith(magicMacroPrefix)) {
|
||||
const int nameStart = magicMacroPrefix.length();
|
||||
@@ -1389,6 +1390,19 @@ void ClangdClient::gatherHelpItemForTooltip(const HoverRequest::Response &hoverR
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Is it the file path for an include directive?
|
||||
QString cleanString = markupString;
|
||||
cleanString.remove('`');
|
||||
const QStringList lines = cleanString.trimmed().split('\n');
|
||||
if (!lines.isEmpty()) {
|
||||
const auto filePath = Utils::FilePath::fromUserInput(lines.last().simplified());
|
||||
if (filePath.exists()) {
|
||||
d->setHelpItemForTooltip(hoverResponse.id(), filePath.fileName(),
|
||||
HelpItem::Brief);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -606,8 +606,10 @@ void ClangdTestTooltips::test()
|
||||
QCOMPARE(editor->document(), doc);
|
||||
QVERIFY(editor->editorWidget());
|
||||
|
||||
if (QLatin1String(QTest::currentDataTag()) == QLatin1String("IncludeDirective"))
|
||||
if (client()->versionNumber() < QVersionNumber(14)
|
||||
&& QLatin1String(QTest::currentDataTag()) == QLatin1String("IncludeDirective")) {
|
||||
QSKIP("FIXME: clangd sends empty or no hover data for includes");
|
||||
}
|
||||
|
||||
QTimer timer;
|
||||
timer.setSingleShot(true);
|
||||
@@ -633,7 +635,6 @@ void ClangdTestTooltips::test()
|
||||
QEXPECT_FAIL("TypeName_ResolveTemplateTypeAlias", "typedef already resolved in AST", Abort);
|
||||
QCOMPARE(int(helpItem.category()), expectedCategory);
|
||||
QEXPECT_FAIL("TemplateClassQualified", "Additional look-up needed?", Abort);
|
||||
QEXPECT_FAIL("AutoTypeTemplate", "Additional look-up needed?", Abort);
|
||||
QCOMPARE(helpItem.helpIds(), expectedIds);
|
||||
QCOMPARE(helpItem.docMark(), expectedMark);
|
||||
}
|
||||
|
@@ -43,5 +43,6 @@
|
||||
<file>tooltips/tooltips.pro</file>
|
||||
<file>highlighting/highlighting.cpp</file>
|
||||
<file>highlighting/highlighting.pro</file>
|
||||
<file>tooltips/subdir/tooltipinfo.h</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -0,0 +1,3 @@
|
||||
#define MACRO_FROM_HEADER(x) x + \
|
||||
x + \
|
||||
x
|
@@ -1,3 +1,4 @@
|
||||
TEMPLATE = app
|
||||
CONFIG -= qt
|
||||
SOURCES = tooltips.cpp
|
||||
INCLUDEPATH += subdir
|
||||
|
@@ -559,6 +559,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
|
||||
break;
|
||||
|
||||
case string_open:
|
||||
case raw_string_open:
|
||||
if (!m_currentToken.isStringLiteral()) {
|
||||
leave();
|
||||
continue;
|
||||
@@ -672,14 +673,14 @@ void CodeFormatter::updateLineStateChange(const QTextBlock &block)
|
||||
saveBlockData(&next, BlockData());
|
||||
}
|
||||
|
||||
bool CodeFormatter::isInStringLiteral(const QTextBlock &block) const
|
||||
bool CodeFormatter::isInRawStringLiteral(const QTextBlock &block) const
|
||||
{
|
||||
if (!block.previous().isValid())
|
||||
return false;
|
||||
BlockData blockData;
|
||||
if (!loadBlockData(block.previous(), &blockData))
|
||||
return false;
|
||||
return !blockData.m_endState.isEmpty() && blockData.m_endState.top().type == string_open;
|
||||
return !blockData.m_endState.isEmpty() && blockData.m_endState.top().type == raw_string_open;
|
||||
}
|
||||
|
||||
CodeFormatter::State CodeFormatter::state(int belowTop) const
|
||||
@@ -825,7 +826,7 @@ bool CodeFormatter::tryExpression(bool alsoExpression)
|
||||
}
|
||||
|
||||
if (m_currentToken.isStringLiteral())
|
||||
newState = string_open;
|
||||
newState = m_currentToken.kind() == T_RAW_STRING_LITERAL ? raw_string_open : string_open;
|
||||
|
||||
if (newState != -1) {
|
||||
if (alsoExpression)
|
||||
@@ -1439,6 +1440,7 @@ void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedInd
|
||||
break;
|
||||
|
||||
case string_open:
|
||||
case raw_string_open:
|
||||
*paddingDepth = tokenPosition - *indentDepth;
|
||||
break;
|
||||
}
|
||||
@@ -1481,6 +1483,7 @@ void QtStyleCodeFormatter::adjustIndent(const Tokens &tokens, int lexerState, in
|
||||
}
|
||||
break;
|
||||
case string_open:
|
||||
case raw_string_open:
|
||||
if (!tokenAt(0).isStringLiteral()) {
|
||||
*paddingDepth = topState.savedPaddingDepth;
|
||||
topState = previousState;
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
// calculates the state change introduced by changing a single line
|
||||
void updateLineStateChange(const QTextBlock &block);
|
||||
|
||||
bool isInStringLiteral(const QTextBlock &block) const;
|
||||
bool isInRawStringLiteral(const QTextBlock &block) const;
|
||||
void indentFor(const QTextBlock &block, int *indent, int *padding);
|
||||
void indentForNewLineAfter(const QTextBlock &block, int *indent, int *padding);
|
||||
|
||||
@@ -173,8 +173,8 @@ public: // must be public to make Q_GADGET introspection work
|
||||
lambda_instroducer, // when '=', '&' or ',' occurred within '[]'
|
||||
lambda_declarator, // just after ']' when previous state is lambda_introducer
|
||||
lambda_statement, // just after '{' when previous state is lambda_declarator or lambda_declarator_or_expression
|
||||
string_open
|
||||
|
||||
string_open, // after opening quote of simple string types, like ", L", u8" etc.
|
||||
raw_string_open // after raw string open delimiter, like R"EOF(
|
||||
};
|
||||
Q_ENUM(StateType)
|
||||
|
||||
|
@@ -99,7 +99,7 @@ void CppQtStyleIndenter::indentBlock(const QTextBlock &block,
|
||||
QtStyleCodeFormatter codeFormatter(tabSettings, codeStyleSettings());
|
||||
|
||||
codeFormatter.updateStateUntil(block);
|
||||
if (codeFormatter.isInStringLiteral(block))
|
||||
if (codeFormatter.isInRawStringLiteral(block))
|
||||
return;
|
||||
int indent;
|
||||
int padding;
|
||||
@@ -137,7 +137,7 @@ void CppQtStyleIndenter::indent(const QTextCursor &cursor,
|
||||
QTextCursor tc = cursor;
|
||||
tc.beginEditBlock();
|
||||
do {
|
||||
if (!codeFormatter.isInStringLiteral(block)) {
|
||||
if (!codeFormatter.isInRawStringLiteral(block)) {
|
||||
int indent;
|
||||
int padding;
|
||||
codeFormatter.indentFor(block, &indent, &padding);
|
||||
|
@@ -655,7 +655,7 @@ void Client::documentWillSave(Core::IDocument *document)
|
||||
auto textDocument = qobject_cast<TextEditor::TextDocument *>(document);
|
||||
if (!m_openedDocument.contains(textDocument))
|
||||
return;
|
||||
bool sendMessage = true;
|
||||
bool sendMessage = false;
|
||||
const QString method(WillSaveTextDocumentNotification::methodName);
|
||||
if (Utils::optional<bool> registered = m_dynamicCapabilities.isRegistered(method)) {
|
||||
sendMessage = registered.value();
|
||||
|
@@ -502,11 +502,15 @@ void ToolChainKitAspect::setup(Kit *k)
|
||||
// ID is not found: Might be an ABI string...
|
||||
lockToolchains = false;
|
||||
const QString abi = QString::fromUtf8(id);
|
||||
tc = ToolChainManager::toolChain([abi, l](const ToolChain *t) {
|
||||
return t->targetAbi().toString() == abi && t->language() == l;
|
||||
});
|
||||
if (tc)
|
||||
setToolChain(k, tc);
|
||||
QList<ToolChain *> possibleTcs = ToolChainManager::toolChains(
|
||||
[abi, l](const ToolChain *t) {
|
||||
return t->targetAbi().toString() == abi && t->language() == l;
|
||||
});
|
||||
Utils::sort(possibleTcs, [](const ToolChain *tc1, const ToolChain *tc2) {
|
||||
return tc1->hostPrefersToolchain() && !tc2->hostPrefersToolchain();
|
||||
});
|
||||
if (!possibleTcs.isEmpty())
|
||||
setToolChain(k, possibleTcs.first());
|
||||
else
|
||||
clearToolChain(k, l);
|
||||
}
|
||||
|
@@ -109,6 +109,15 @@ const MsvcPlatform platforms[]
|
||||
|
||||
static QList<const MsvcToolChain *> g_availableMsvcToolchains;
|
||||
|
||||
static const MsvcPlatform *platformEntryFromName(const QString &name)
|
||||
{
|
||||
for (const MsvcPlatform &p : platforms) {
|
||||
if (name == QLatin1String(p.name))
|
||||
return &p;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static const MsvcPlatform *platformEntry(MsvcToolChain::Platform t)
|
||||
{
|
||||
for (const MsvcPlatform &p : platforms) {
|
||||
@@ -125,27 +134,37 @@ static QString platformName(MsvcToolChain::Platform t)
|
||||
return QString();
|
||||
}
|
||||
|
||||
static bool hostSupportsPlatform(MsvcToolChain::Platform platform)
|
||||
static bool hostPrefersPlatform(MsvcToolChain::Platform platform)
|
||||
{
|
||||
switch (Utils::HostOsInfo::hostArchitecture()) {
|
||||
case Utils::HostOsInfo::HostArchitectureAMD64:
|
||||
if (platform == MsvcToolChain::amd64 || platform == MsvcToolChain::amd64_arm
|
||||
|| platform == MsvcToolChain::amd64_x86 || platform == MsvcToolChain::amd64_arm64)
|
||||
return true;
|
||||
Q_FALLTHROUGH(); // all x86 toolchains are also working on an amd64 host
|
||||
case Utils::HostOsInfo::HostArchitectureX86:
|
||||
switch (HostOsInfo::hostArchitecture()) {
|
||||
case HostOsInfo::HostArchitectureAMD64:
|
||||
return platform == MsvcToolChain::amd64 || platform == MsvcToolChain::amd64_arm
|
||||
|| platform == MsvcToolChain::amd64_x86 || platform == MsvcToolChain::amd64_arm64;
|
||||
case HostOsInfo::HostArchitectureX86:
|
||||
return platform == MsvcToolChain::x86 || platform == MsvcToolChain::x86_amd64
|
||||
|| platform == MsvcToolChain::x86_ia64 || platform == MsvcToolChain::x86_arm
|
||||
|| platform == MsvcToolChain::x86_arm64;
|
||||
case Utils::HostOsInfo::HostArchitectureArm:
|
||||
case HostOsInfo::HostArchitectureArm:
|
||||
return platform == MsvcToolChain::arm;
|
||||
case Utils::HostOsInfo::HostArchitectureItanium:
|
||||
case HostOsInfo::HostArchitectureItanium:
|
||||
return platform == MsvcToolChain::ia64;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool hostSupportsPlatform(MsvcToolChain::Platform platform)
|
||||
{
|
||||
if (hostPrefersPlatform(platform))
|
||||
return true;
|
||||
// The x86 host toolchains are not the preferred toolchains on amd64 but they are still
|
||||
// supported by that host
|
||||
return HostOsInfo::hostArchitecture() == HostOsInfo::HostArchitectureAMD64
|
||||
&& (platform == MsvcToolChain::x86 || platform == MsvcToolChain::x86_amd64
|
||||
|| platform == MsvcToolChain::x86_ia64 || platform == MsvcToolChain::x86_arm
|
||||
|| platform == MsvcToolChain::x86_arm64);
|
||||
}
|
||||
|
||||
static QString fixRegistryPath(const QString &path)
|
||||
{
|
||||
QString result = QDir::fromNativeSeparators(path);
|
||||
@@ -985,6 +1004,11 @@ std::unique_ptr<ToolChainConfigWidget> MsvcToolChain::createConfigurationWidget(
|
||||
return std::make_unique<MsvcToolChainConfigWidget>(this);
|
||||
}
|
||||
|
||||
bool MsvcToolChain::hostPrefersToolchain() const
|
||||
{
|
||||
return hostPrefersPlatform(platform());
|
||||
}
|
||||
|
||||
bool static hasFlagEffectOnMacros(const QString &flag)
|
||||
{
|
||||
if (flag.startsWith("-") || flag.startsWith("/")) {
|
||||
@@ -1212,6 +1236,15 @@ void MsvcToolChain::resetVarsBat()
|
||||
m_varsBatArg.clear();
|
||||
}
|
||||
|
||||
MsvcToolChain::Platform MsvcToolChain::platform() const
|
||||
{
|
||||
QStringList args = m_varsBatArg.split(' ');
|
||||
if (const MsvcPlatform *entry = platformEntryFromName(args.value(0)))
|
||||
return entry->platform;
|
||||
return Utils::HostOsInfo::hostArchitecture() == Utils::HostOsInfo::HostArchitectureAMD64 ? amd64
|
||||
: x86;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// MsvcBasedToolChainConfigWidget: Creates a simple GUI without error label
|
||||
// to display name and varsBat. Derived classes should add the error label and
|
||||
|
@@ -74,6 +74,7 @@ public:
|
||||
bool fromMap(const QVariantMap &data) override;
|
||||
|
||||
std::unique_ptr<ToolChainConfigWidget> createConfigurationWidget() override;
|
||||
bool hostPrefersToolchain() const override;
|
||||
|
||||
MacroInspectionRunner createMacroInspectionRunner() const override;
|
||||
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
||||
@@ -91,6 +92,7 @@ public:
|
||||
QString varsBat() const { return m_vcvarsBat; }
|
||||
void setupVarsBat(const Abi &abi, const QString &varsBat, const QString &varsBatArg);
|
||||
void resetVarsBat();
|
||||
Platform platform() const;
|
||||
|
||||
bool operator==(const ToolChain &) const override;
|
||||
|
||||
|
@@ -116,6 +116,7 @@ public:
|
||||
virtual QString originalTargetTriple() const { return QString(); }
|
||||
virtual QStringList extraCodeModelFlags() const { return QStringList(); }
|
||||
virtual Utils::FilePath installDir() const { return Utils::FilePath(); }
|
||||
virtual bool hostPrefersToolchain() const { return true; }
|
||||
|
||||
virtual bool isValid() const;
|
||||
|
||||
|
@@ -28,6 +28,9 @@
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::NoInsert</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "changestyleaction.h"
|
||||
#include "designeractionmanagerview.h"
|
||||
#include "designermcumanager.h"
|
||||
#include "formatoperation.h"
|
||||
#include "modelnodecontextmenu_helper.h"
|
||||
#include "qmldesignerconstants.h"
|
||||
@@ -633,6 +634,11 @@ bool selectionCanBeLayoutedAndQtQuickLayoutPossible(const SelectionContext &cont
|
||||
return selectionCanBeLayouted(context) && context.view()->majorQtQuickVersion() > 1;
|
||||
}
|
||||
|
||||
bool selectionCanBeLayoutedAndQtQuickLayoutPossibleAndNotMCU(const SelectionContext &context)
|
||||
{
|
||||
return selectionCanBeLayoutedAndQtQuickLayoutPossible(context) && !DesignerMcuManager::instance().isMCUProject();
|
||||
}
|
||||
|
||||
bool selectionNotEmptyAndHasZProperty(const SelectionContext &context)
|
||||
{
|
||||
return selectionNotEmpty(context) && selectionHasProperty(context, zProperty);
|
||||
@@ -1360,7 +1366,7 @@ void DesignerActionManager::createDefaultDesignerActions()
|
||||
QKeySequence("shift+g"),
|
||||
60,
|
||||
&layoutGridLayout,
|
||||
&selectionCanBeLayoutedAndQtQuickLayoutPossible));
|
||||
&selectionCanBeLayoutedAndQtQuickLayoutPossibleAndNotMCU));
|
||||
|
||||
addDesignerAction(new SeperatorDesignerAction(layoutCategory, 50));
|
||||
|
||||
|
@@ -325,8 +325,10 @@ void LayoutInGridLayout::calculateGridOffsets()
|
||||
removeSimilarValues(m_yTopOffsets, heightTolerance);
|
||||
|
||||
//The first offset is not important, because it just defines the beginning of the layout
|
||||
m_xTopOffsets.removeFirst();
|
||||
m_yTopOffsets.removeFirst();
|
||||
if (!m_xTopOffsets.isEmpty())
|
||||
m_xTopOffsets.removeFirst();
|
||||
if (!m_yTopOffsets.isEmpty())
|
||||
m_yTopOffsets.removeFirst();
|
||||
}
|
||||
|
||||
void LayoutInGridLayout::removeEmtpyRowsAndColumns()
|
||||
|
@@ -51,7 +51,7 @@
|
||||
#include <componentcore_constants.h>
|
||||
#include <stylesheetmerger.h>
|
||||
|
||||
#include <limits>
|
||||
#include <designermcumanager.h>
|
||||
#include <qmldesignerplugin.h>
|
||||
|
||||
#include <coreplugin/messagebox.h>
|
||||
@@ -88,6 +88,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#include <bindingeditor/signallist.h>
|
||||
|
||||
@@ -187,7 +188,7 @@ void toFront(const SelectionContext &selectionState)
|
||||
if (index != lastIndex)
|
||||
parentProperty.slide(index, lastIndex);
|
||||
}
|
||||
} catch (const RewritingException &e) { //better save then sorry
|
||||
} catch (const RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -208,7 +209,7 @@ void toBack(const SelectionContext &selectionState)
|
||||
parentProperty.slide(index, 0);
|
||||
}
|
||||
|
||||
} catch (const RewritingException &e) { //better save then sorry
|
||||
} catch (const RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -272,7 +273,7 @@ void setVisible(const SelectionContext &selectionState)
|
||||
|
||||
try {
|
||||
selectionState.selectedModelNodes().constFirst().variantProperty("visible").setValue(selectionState.toggled());
|
||||
} catch (const RewritingException &e) { //better save then sorry
|
||||
} catch (const RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -285,7 +286,7 @@ void setFillWidth(const SelectionContext &selectionState)
|
||||
|
||||
try {
|
||||
selectionState.firstSelectedModelNode().variantProperty("Layout.fillWidth").setValue(selectionState.toggled());
|
||||
} catch (const RewritingException &e) { //better save then sorry
|
||||
} catch (const RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -298,7 +299,7 @@ void setFillHeight(const SelectionContext &selectionState)
|
||||
|
||||
try {
|
||||
selectionState.firstSelectedModelNode().variantProperty("Layout.fillHeight").setValue(selectionState.toggled());
|
||||
} catch (const RewritingException &e) { //better save then sorry
|
||||
} catch (const RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -522,9 +523,14 @@ void layoutFlowPositioner(const SelectionContext &selectionContext)
|
||||
void layoutRowLayout(const SelectionContext &selectionContext)
|
||||
{
|
||||
try {
|
||||
LayoutInGridLayout::ensureLayoutImport(selectionContext);
|
||||
layoutHelperFunction(selectionContext, "QtQuick.Layouts.RowLayout", compareByX);
|
||||
} catch (RewritingException &e) { //better save then sorry
|
||||
if (DesignerMcuManager::instance().isMCUProject()) {
|
||||
layoutHelperFunction(selectionContext, "QtQuick.Row", compareByX);
|
||||
}
|
||||
else {
|
||||
LayoutInGridLayout::ensureLayoutImport(selectionContext);
|
||||
layoutHelperFunction(selectionContext, "QtQuick.Layouts.RowLayout", compareByX);
|
||||
}
|
||||
} catch (RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -532,9 +538,14 @@ void layoutRowLayout(const SelectionContext &selectionContext)
|
||||
void layoutColumnLayout(const SelectionContext &selectionContext)
|
||||
{
|
||||
try {
|
||||
LayoutInGridLayout::ensureLayoutImport(selectionContext);
|
||||
layoutHelperFunction(selectionContext, "QtQuick.Layouts.ColumnLayout", compareByY);
|
||||
} catch (RewritingException &e) { //better save then sorry
|
||||
if (DesignerMcuManager::instance().isMCUProject()) {
|
||||
layoutHelperFunction(selectionContext, "QtQuick.Column", compareByX);
|
||||
}
|
||||
else {
|
||||
LayoutInGridLayout::ensureLayoutImport(selectionContext);
|
||||
layoutHelperFunction(selectionContext, "QtQuick.Layouts.ColumnLayout", compareByY);
|
||||
}
|
||||
} catch (RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
@@ -542,9 +553,16 @@ void layoutColumnLayout(const SelectionContext &selectionContext)
|
||||
void layoutGridLayout(const SelectionContext &selectionContext)
|
||||
{
|
||||
try {
|
||||
LayoutInGridLayout::ensureLayoutImport(selectionContext);
|
||||
LayoutInGridLayout::layout(selectionContext);
|
||||
} catch (RewritingException &e) { //better save then sorry
|
||||
Q_ASSERT(!DesignerMcuManager::instance().isMCUProject()); //remove this line when grids are finally supported
|
||||
|
||||
if (DesignerMcuManager::instance().isMCUProject()) {
|
||||
//qt for mcu doesn't support any grids yet
|
||||
}
|
||||
else {
|
||||
LayoutInGridLayout::ensureLayoutImport(selectionContext);
|
||||
LayoutInGridLayout::layout(selectionContext);
|
||||
}
|
||||
} catch (RewritingException &e) { //better safe than sorry
|
||||
e.showException();
|
||||
}
|
||||
}
|
||||
|
@@ -166,7 +166,8 @@ public:
|
||||
unpin,
|
||||
upDownIcon,
|
||||
upDownSquare2,
|
||||
visibilityOff,
|
||||
visibilityOffBroken, // visibilityOff
|
||||
visibilityOff, // visibilityOff2
|
||||
visibilityOn,
|
||||
wildcard,
|
||||
zoomAll,
|
||||
|
@@ -226,7 +226,7 @@ void ItemLibraryAssetsModel::refresh()
|
||||
|
||||
void ItemLibraryAssetsModel::setRootPath(const QString &path)
|
||||
{
|
||||
static const QStringList supportedTopLevelDirs {"images", "sounds", "fonts", "assets", "shaders"};
|
||||
static const QStringList ignoredTopLevelDirs {"imports", "asset_imports"};
|
||||
|
||||
m_fileSystemWatcher->removeDirectories(m_fileSystemWatcher->directories());
|
||||
m_fileSystemWatcher->removeFiles(m_fileSystemWatcher->files());
|
||||
@@ -256,7 +256,7 @@ void ItemLibraryAssetsModel::setRootPath(const QString &path)
|
||||
|
||||
while (itDirs.hasNext()) {
|
||||
QDir subDir = itDirs.next();
|
||||
if (currDepth == 1 && !supportedTopLevelDirs.contains(subDir.dirName()))
|
||||
if (currDepth == 1 && ignoredTopLevelDirs.contains(subDir.dirName()))
|
||||
continue;
|
||||
|
||||
ItemLibraryAssetsDir *assetsDir = new ItemLibraryAssetsDir(subDir.path(), currDepth, loadExpandedState(subDir.path()), currAssetsDir);
|
||||
|
@@ -236,7 +236,11 @@ void QtKitAspect::fix(Kit *k)
|
||||
const QVector<Abi> &qtAbis = version->qtAbis();
|
||||
const bool tc1ExactMatch = qtAbis.contains(tc1->targetAbi());
|
||||
const bool tc2ExactMatch = qtAbis.contains(tc2->targetAbi());
|
||||
return tc1ExactMatch && !tc2ExactMatch;
|
||||
if (tc1ExactMatch && !tc2ExactMatch)
|
||||
return true;
|
||||
if (!tc1ExactMatch && tc2ExactMatch)
|
||||
return false;
|
||||
return tc1->hostPrefersToolchain() && !tc2->hostPrefersToolchain();
|
||||
});
|
||||
|
||||
const QList<ToolChain *> goodTcs = Utils::filtered(possibleTcs,
|
||||
|
@@ -14,6 +14,7 @@ GOOGLEBENCHMARK_DIR = $$(GOOGLEBENCHMARK_DIR)
|
||||
$$GOOGLEBENCHMARK_DIR/src/counter.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/csv_reporter.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/json_reporter.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/perf_counters.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/reporter.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/sleep.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/statistics.cc \
|
||||
@@ -21,5 +22,5 @@ GOOGLEBENCHMARK_DIR = $$(GOOGLEBENCHMARK_DIR)
|
||||
$$GOOGLEBENCHMARK_DIR/src/sysinfo.cc \
|
||||
$$GOOGLEBENCHMARK_DIR/src/timers.cc
|
||||
|
||||
win32:LIBS += -lShlwapi
|
||||
win32:LIBS += -lshlwapi
|
||||
}
|
||||
|