Merge remote-tracking branch 'origin/4.14'
Change-Id: Id4c4c06b086dfe38960f4d68694ae23f3e00109f
22
dist/changes-4.14.0.md
vendored
@@ -20,6 +20,7 @@ Help
|
|||||||
----
|
----
|
||||||
|
|
||||||
* Made `litehtml` rendering backend the default
|
* Made `litehtml` rendering backend the default
|
||||||
|
* Fixed that Qt 5 documentation was not available if Qt 6 is installed
|
||||||
|
|
||||||
Editing
|
Editing
|
||||||
-------
|
-------
|
||||||
@@ -40,7 +41,7 @@ Editing
|
|||||||
* Added highlighting for structured bindings (QTCREATORBUG-24769)
|
* Added highlighting for structured bindings (QTCREATORBUG-24769)
|
||||||
* Restricted completion for second argument of `connect` calls to signals (QTCREATORBUG-13558)
|
* Restricted completion for second argument of `connect` calls to signals (QTCREATORBUG-13558)
|
||||||
* Fixed crash of backend with multiline `Q_PROPERTY` declarations (QTCREATORBUG-24746)
|
* Fixed crash of backend with multiline `Q_PROPERTY` declarations (QTCREATORBUG-24746)
|
||||||
* Fixed duplicate items appearing in include completion (QTCREATORBUG-24515)
|
* Fixed issues with include completion (QTCREATORBUG-21490, QTCREATORBUG-24515)
|
||||||
* Fixed missing namespace when generating getters and setters (QTCREATORBUG-14886)
|
* Fixed missing namespace when generating getters and setters (QTCREATORBUG-14886)
|
||||||
* Fixed missing `inline` when generating method definitions in header files
|
* Fixed missing `inline` when generating method definitions in header files
|
||||||
(QTCREATORBUG-15052)
|
(QTCREATORBUG-15052)
|
||||||
@@ -73,6 +74,7 @@ Editing
|
|||||||
|
|
||||||
* Fixed issues with `Move Component into Separate File` (QTCREATORBUG-21091)
|
* Fixed issues with `Move Component into Separate File` (QTCREATORBUG-21091)
|
||||||
* Fixed crash with malformed `property` (QTCREATORBUG-24587)
|
* Fixed crash with malformed `property` (QTCREATORBUG-24587)
|
||||||
|
* Fixed `qmldir` parsing with Qt 6 (QTCREATORBUG-24772)
|
||||||
|
|
||||||
### GLSL
|
### GLSL
|
||||||
|
|
||||||
@@ -88,6 +90,7 @@ Projects
|
|||||||
* Fixed issue when environment changes after appending or prepending path (QTCREATORBUG-24105)
|
* Fixed issue when environment changes after appending or prepending path (QTCREATORBUG-24105)
|
||||||
* Fixed `Embedding of the UI Class` option for widget applications (QTCREATORBUG-24422)
|
* Fixed `Embedding of the UI Class` option for widget applications (QTCREATORBUG-24422)
|
||||||
* Fixed shell used for console applications (QTCREATORBUG-24659)
|
* Fixed shell used for console applications (QTCREATORBUG-24659)
|
||||||
|
* Fixed issue with auto-scrolling compile output (QTCREATORBUG-24728)
|
||||||
|
|
||||||
### qmake
|
### qmake
|
||||||
|
|
||||||
@@ -102,6 +105,12 @@ Projects
|
|||||||
|
|
||||||
* Added option to unselect multiple configuration variables simultaneously
|
* Added option to unselect multiple configuration variables simultaneously
|
||||||
(QTCREATORBUG-22659)
|
(QTCREATORBUG-22659)
|
||||||
|
* Fixed missing run of CMake when saving `CMakeLists.txt` files in
|
||||||
|
subdirectories
|
||||||
|
* Fixed that changing build directory to existing build ran CMake with initial
|
||||||
|
arguments
|
||||||
|
* Fixed that configuration changes were lost when done before triggering a first
|
||||||
|
build (QTCREATORBUG-24936)
|
||||||
|
|
||||||
### Meson
|
### Meson
|
||||||
|
|
||||||
@@ -110,6 +119,7 @@ Projects
|
|||||||
Debugging
|
Debugging
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* Updated various pretty printers for Qt 6
|
||||||
* Fixed disabling and enabling breakpoints (QTCREATORBUG-24669)
|
* Fixed disabling and enabling breakpoints (QTCREATORBUG-24669)
|
||||||
* Fixed setting source mappings with variables (QTCREATORBUG-24816)
|
* Fixed setting source mappings with variables (QTCREATORBUG-24816)
|
||||||
|
|
||||||
@@ -120,6 +130,7 @@ Debugging
|
|||||||
### CDB
|
### CDB
|
||||||
|
|
||||||
* Fixed debugging when `PYTHONPATH` is set (QTCREATORBUG-24859)
|
* Fixed debugging when `PYTHONPATH` is set (QTCREATORBUG-24859)
|
||||||
|
* Fixed pretty printer of containers with signed chars
|
||||||
|
|
||||||
Analyzer
|
Analyzer
|
||||||
--------
|
--------
|
||||||
@@ -153,6 +164,10 @@ Test Integration
|
|||||||
Platforms
|
Platforms
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
* Fixed initial directory when opening Konsole (QTCREATORBUG-24947)
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
* Fixed type display when debugging with newest LLDB
|
* Fixed type display when debugging with newest LLDB
|
||||||
@@ -164,6 +179,11 @@ Platforms
|
|||||||
* Added support for setting preferred screen orientation
|
* Added support for setting preferred screen orientation
|
||||||
* Added missing Android variables to completion in `.pro` and `.pri` files
|
* Added missing Android variables to completion in `.pro` and `.pri` files
|
||||||
* Fixed passing command line arguments to application (QTCREATORBUG-23712)
|
* Fixed passing command line arguments to application (QTCREATORBUG-23712)
|
||||||
|
* Fixed fetching of logcat output when application crashes
|
||||||
|
|
||||||
|
### iOS
|
||||||
|
|
||||||
|
* Fixed persistence of signing settings (QTCREATORBUG-24586)
|
||||||
|
|
||||||
### MCU
|
### MCU
|
||||||
|
|
||||||
|
4
doc/config/macros-online.qdocconf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
|
||||||
|
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
|
||||||
|
"frameborder=\"0\" allowfullscreen>\n" \
|
||||||
|
"</iframe></div>\n"
|
@@ -55,10 +55,8 @@ macro.emptyspan.HTML = "<span></span>"
|
|||||||
# HTML.extraimages += images/dQw4w9WgXcQ.jpg
|
# HTML.extraimages += images/dQw4w9WgXcQ.jpg
|
||||||
# qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg
|
# qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg
|
||||||
#
|
#
|
||||||
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
|
macro.youtube.HTML = "<div class=\"video\">\n" \
|
||||||
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
|
|
||||||
"frameborder=\"0\" allowfullscreen>\n" \
|
|
||||||
"<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\
|
"<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\
|
||||||
"<img src=\"images/\1.jpg\"" \
|
"<img src=\"images/\1.jpg\"" \
|
||||||
"title=\"Click to play in a browser\" /></a>\n" \
|
"title=\"Click to play in a browser\" /></a>\n" \
|
||||||
"</iframe></div>\n"
|
"</div>\n"
|
||||||
|
@@ -43,8 +43,7 @@ imagedirs = ../images \
|
|||||||
exampledirs = ../examples
|
exampledirs = ../examples
|
||||||
examples.fileextensions += *.qml *.svg
|
examples.fileextensions += *.qml *.svg
|
||||||
|
|
||||||
HTML.extraimages = ../../config/images/commercial.png
|
include(../../qtcreator/images/extraimages/qtcreator-extraimages.qdocconf)
|
||||||
qhp.QtCreator.extraFiles = ../../config/images/commercial.png
|
|
||||||
|
|
||||||
depends += qtandroidextras\
|
depends += qtandroidextras\
|
||||||
qtwidgets \
|
qtwidgets \
|
||||||
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
BIN
doc/qtcreator/images/extraimages/images/RfEYO-5Mw6s.jpg
Normal file
After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
BIN
doc/qtcreator/images/extraimages/images/yOUdg1o2KJM.jpg
Normal file
After Width: | Height: | Size: 9.5 KiB |
@@ -0,0 +1,4 @@
|
|||||||
|
{HTML.extraimages,qhp.QtCreator.extraFiles} += \
|
||||||
|
images/commercial.png \
|
||||||
|
images/RfEYO-5Mw6s.jpg \
|
||||||
|
images/yOUdg1o2KJM.jpg
|
@@ -0,0 +1,8 @@
|
|||||||
|
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += \
|
||||||
|
images/commercial.png \
|
||||||
|
images/SsFWyUeAA_4.jpg \
|
||||||
|
images/9ihYeC0YJ0M.jpg \
|
||||||
|
images/aV6kFxH3Xws.jpg \
|
||||||
|
images/ZzbucmQPU44.jpg \
|
||||||
|
images/RfEYO-5Mw6s.jpg \
|
||||||
|
images/yOUdg1o2KJM.jpg
|
BIN
doc/qtcreator/images/icons/textarea-icon16.png
Normal file
After Width: | Height: | Size: 133 B |
BIN
doc/qtcreator/images/icons/textfield-icon16.png
Normal file
After Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 11 KiB |
BIN
doc/qtcreator/images/qmldesigner-custom-component-properties.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
doc/qtcreator/images/qtquick-designer-text-input-properties.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
doc/qtcreator/images/qtquick-designer-text-properties.png
Normal file
After Width: | Height: | Size: 48 KiB |
@@ -16,5 +16,8 @@ HTML.footer = \
|
|||||||
|
|
||||||
include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)
|
include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)
|
||||||
|
|
||||||
|
# Override macros for online use
|
||||||
|
include(../config/macros-online.qdocconf)
|
||||||
|
|
||||||
# Add an .html file with sidebar content, used in the online style
|
# Add an .html file with sidebar content, used in the online style
|
||||||
HTML.stylesheets += config/style/qt5-sidebar.html
|
HTML.stylesheets += config/style/qt5-sidebar.html
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
\list
|
\list
|
||||||
\li \l{Editing 2D Content}
|
\li \l{Editing 2D Content}
|
||||||
\li \l{Shapes}
|
\li \l{Shapes}
|
||||||
|
\li \l{Text}
|
||||||
\li \l{Images}
|
\li \l{Images}
|
||||||
\li \l{User Interaction Methods}
|
\li \l{User Interaction Methods}
|
||||||
\li \l{Lists and Other Data Models}
|
\li \l{Lists and Other Data Models}
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\page quick-shapes.html
|
\page quick-shapes.html
|
||||||
\previouspage qtquick-form-editor.html
|
\previouspage qtquick-form-editor.html
|
||||||
\nextpage quick-buttons.html
|
\nextpage quick-text.html
|
||||||
|
|
||||||
\title Shapes
|
\title Shapes
|
||||||
|
|
||||||
|
303
doc/qtcreator/src/qtquick/library/qtquick-text.qdoc
Normal file
@@ -0,0 +1,303 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of the Qt Creator documentation.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Free Documentation License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Free
|
||||||
|
** Documentation License version 1.3 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file included in the packaging of
|
||||||
|
** this file. Please review the following information to ensure
|
||||||
|
** the GNU Free Documentation License version 1.3 requirements
|
||||||
|
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page quick-text.html
|
||||||
|
\previouspage quick-shapes.html
|
||||||
|
\nextpage quick-images.html
|
||||||
|
|
||||||
|
\title Text
|
||||||
|
|
||||||
|
You can use several different text types to add read-only or editable text
|
||||||
|
to a UI, such as titles or labels and text input fields with placeholder
|
||||||
|
text. The \l Text type adds formatted text, the \l TextEdit type adds a
|
||||||
|
multiline line edit, and the \l TextInput type adds a single editable line
|
||||||
|
field.
|
||||||
|
|
||||||
|
You can select the font to use and specify extensive properties for each
|
||||||
|
text string, such as size in points or pixels, style name, emphasis,
|
||||||
|
alignment, and spacing.
|
||||||
|
|
||||||
|
For an example of editing the Text type, watch
|
||||||
|
\l{https://www.youtube.com/watch?v=yOUdg1o2KJM}
|
||||||
|
{Qt Design Studio QuickTip: Text Element}.
|
||||||
|
|
||||||
|
To create a label with a background, use the \l Label type from the
|
||||||
|
Qt Quick Controls module.
|
||||||
|
|
||||||
|
\section1 Typography
|
||||||
|
|
||||||
|
For each string that you enter in the \uicontrol Text field, you can
|
||||||
|
select the font to use in the \uicontrol Font field and specify the
|
||||||
|
size, emphasis, aligment, and spacing of the text. Specify the font
|
||||||
|
size in either points or pixels in the \uicontrol Size field.
|
||||||
|
|
||||||
|
\image qtquick-designer-text-properties.png "Text type properties"
|
||||||
|
|
||||||
|
To display custom fonts in the list of available fonts in the
|
||||||
|
\uicontrol Font field, add them in the \uicontrol Assets tab
|
||||||
|
of \uicontrol Library. For more information, see \l {Assets}.
|
||||||
|
|
||||||
|
You can use the buttons in the \uicontrol {Font style} group to emphasize
|
||||||
|
text by making it bold, italic, underlined, or strikethrough.
|
||||||
|
|
||||||
|
Alternatively, select a font variant to use in the \uicontrol {Style name}
|
||||||
|
field, such as \uicontrol Regular or \uicontrol Bold.
|
||||||
|
|
||||||
|
The value of the \uicontrol Word field in the \uicontrol Spacing group
|
||||||
|
changes the default spacing between individual words, whereas the value
|
||||||
|
of the \uicontrol Letter field changes the spacing between individual
|
||||||
|
letters in a word. A positive value increases the spacing by a
|
||||||
|
corresponding amount of pixels, while a negative value decreases it.
|
||||||
|
|
||||||
|
The value of the \uicontrol {Line height} field sets the line height
|
||||||
|
for the text. In the \uicontrol {Line height mode} field, select
|
||||||
|
\uicontrol FixedHeight to set the line height in pixels or
|
||||||
|
\uicontrol ProportionalHeight (default) to set the spacing proportionally
|
||||||
|
to the line (as a multiplier). For example, set to 2 for double spacing.
|
||||||
|
|
||||||
|
\section1 Text Alignment
|
||||||
|
|
||||||
|
You can align text items horizontally and vertically. By default, text is
|
||||||
|
vertically aligned to the top. Horizontal alignment follows the natural
|
||||||
|
alignment of the text. By default, left-to-right text like English is
|
||||||
|
aligned to the left side of the text area, whereas right-to-left text
|
||||||
|
like Arabic is aligned to the right side of the text area.
|
||||||
|
|
||||||
|
You can align text to the left, right, top, or bottom, and center it
|
||||||
|
horizontally or vertically. You can justify horizontal text.
|
||||||
|
|
||||||
|
For a single line of text, the size of the text is the area of the text.
|
||||||
|
In this common case, all alignments are equivalent. To center a text in
|
||||||
|
its parent, use \l{Setting Anchors and Margins}{anchoring} or bind the
|
||||||
|
width of the text item to that of the parent. For more information, see
|
||||||
|
\l{Setting Bindings}.
|
||||||
|
|
||||||
|
\section1 Text and Style Colors
|
||||||
|
|
||||||
|
You can set the color of the text itself and a secondary color used by
|
||||||
|
text styles.
|
||||||
|
|
||||||
|
The color that you pick in the \uicontrol {Style color} field is used as
|
||||||
|
the outline color for outlined text, and as the shadow color for raised
|
||||||
|
or sunken text. You set the font style in the \uicontrol Style field of
|
||||||
|
the \uicontrol Font section.
|
||||||
|
|
||||||
|
For the \uicontrol {Text Edit} and \uicontrol {Text Input} types, you
|
||||||
|
can also set the color of selected text and the text highlight color
|
||||||
|
that is used behind selections in the \uicontrol {Selected text color}
|
||||||
|
and \uicontrol {Selection color} fields.
|
||||||
|
|
||||||
|
For more information about selecting colors, see \l{Picking Colors}. You
|
||||||
|
can only set solid colors for text items.
|
||||||
|
|
||||||
|
\section1 Advanced Text Properties
|
||||||
|
|
||||||
|
The height and width of a text item are determined automatically depending
|
||||||
|
on the values of the properties you set, to accommodate the length of the
|
||||||
|
string that you specify in the \uicontrol Text field and the font size, for
|
||||||
|
example.
|
||||||
|
|
||||||
|
The value of the \uicontrol {Font size mode} field specifies how the font
|
||||||
|
size of the displayed text is determined. Select \uicontrol FixedSize to
|
||||||
|
use the size specified in the \uicontrol Size field in pixels or points.
|
||||||
|
Select \uicontrol HorizontalFit or \uicontrol VerticalFit to use the largest
|
||||||
|
size up to the size specified that fits the width or height of the item.
|
||||||
|
Select \uicontrol Fit to use the largest size up to the size specified that
|
||||||
|
fits within the width and height of the item. The font size of fitted text
|
||||||
|
has a minimum bound specified by the \uicontrol {Minimum size} field and
|
||||||
|
maximum bound specified by the \uicontrol Size field.
|
||||||
|
|
||||||
|
In the \uicontrol {Wrap mode} field, you can wrap the text to the text
|
||||||
|
item's width. The text will only wrap if you set an explicit width for
|
||||||
|
the text item. By default, text is not wrapped. Select \uicontrol WordWrap
|
||||||
|
to restrict wrapping to word boundaries only. Select \uicontrol WrapAnywhere
|
||||||
|
to enable wrapping at any point on a line, even if it occurs in the middle
|
||||||
|
of a word. Select \uicontrol Wrap to wrap at a word boundary, if possible,
|
||||||
|
or at the appropriate point on the line, even in the middle of a word.
|
||||||
|
|
||||||
|
You can use the \uicontrol Elide property with the \uicontrol Wrap
|
||||||
|
option to fit a single line of plain text to a set width. Select
|
||||||
|
\uicontrol ElideRight, and set the \uicontrol {Maximum line count}
|
||||||
|
or the text item height (in the \uicontrol H field). If you set both,
|
||||||
|
the maximum line count will apply unless the lines do not fit in the
|
||||||
|
height allowed.
|
||||||
|
|
||||||
|
If the text is a multi-length string, and you set the \uicontrol Elide
|
||||||
|
property value to something else than \uicontrol ElideNone, the first
|
||||||
|
string that fits will be used, otherwise the last will be elided.
|
||||||
|
|
||||||
|
Multi-length strings are ordered from longest to shortest, separated by the
|
||||||
|
Unicode \e {String Terminator} character \c U009C.
|
||||||
|
|
||||||
|
\section1 Advanced Font Properties
|
||||||
|
|
||||||
|
In the \uicontrol {Font weight} field, you can select the font weight from
|
||||||
|
list predefined values that range between extra-light and extra-bold.
|
||||||
|
|
||||||
|
In the \uicontrol {Font capitalization} field, select \uicontrol MixedCase
|
||||||
|
for normal text rendering where no capitalization changes are applied. You
|
||||||
|
can also set the text in all upper or lower case, or use small caps. The
|
||||||
|
\uicontrol Capitalize option renders the first character of each word as an
|
||||||
|
uppercase character.
|
||||||
|
|
||||||
|
\section1 Developer Text Properties
|
||||||
|
|
||||||
|
Text can be either in plain text or rich text format, depending on the
|
||||||
|
value you set in the \uicontrol Format field. If you select
|
||||||
|
\uicontrol AutoText and the the first line of text contains an HTML tag,
|
||||||
|
the text is treated as rich text. Rich text supports a subset of HTML 4
|
||||||
|
described on the \l {Supported HTML Subset}. Note that plain text offers
|
||||||
|
better performance than rich text.
|
||||||
|
|
||||||
|
In the \uicontrol {Render type} field, you can override the default
|
||||||
|
rendering type for a text item. Select \uicontrol NativeRendering if
|
||||||
|
you prefer text to look native on the target platform and do not
|
||||||
|
require advanced features such as \l {Managing 2D Transformations}
|
||||||
|
{transformation} of the text. Using rotation or scaling in combination
|
||||||
|
with native rendering leads to poor and sometimes pixelated results.
|
||||||
|
|
||||||
|
\section1 Text Input
|
||||||
|
|
||||||
|
You can use the \uicontrol {Text Edit} and \uicontrol {Text Input} types to
|
||||||
|
add text fields where users can enter text.
|
||||||
|
|
||||||
|
The Text Input type displays a single line of editable plain text, whereas
|
||||||
|
the Text Edit type displays a block of editable, formatted text. Both types
|
||||||
|
are used to accept text input.
|
||||||
|
|
||||||
|
\image qtquick-designer-text-input-properties.png "Text input field properties"
|
||||||
|
|
||||||
|
In the \uicontrol {Mouse selection mode} field, you can specify whether
|
||||||
|
individual characters or whole words are selected when selecting text.
|
||||||
|
|
||||||
|
In the \uicontrol {Input mask} field, you can create an input mask that
|
||||||
|
contains mask and meta characters and separators between them. When created
|
||||||
|
or cleared, the text edit or input is filled with a copy of the input mask
|
||||||
|
string, where the meta characters have been removed, and the mask characters
|
||||||
|
have been replaced with the blank character. For example, in an input field
|
||||||
|
for an IP address, you could use the following mask (with the underscore as
|
||||||
|
the blank character): \c {000.000.000.000;_}. For more information about
|
||||||
|
creating input masks, see the documentation for \l QLineEdit::inputMask.
|
||||||
|
|
||||||
|
In the \uicontrol {Echo mode} field, select \uicontrol Password to display
|
||||||
|
platform-dependent password mask characters instead of the actual characters
|
||||||
|
that users enter. Select \uicontrol PasswordEchoOnEdit to display characters
|
||||||
|
as users enter them. The mask character is displayed in the
|
||||||
|
\uicontrol {Pass. char} field.
|
||||||
|
|
||||||
|
In the \uicontrol {Maximum length} field, set the maximum number of
|
||||||
|
characters that users can enter.
|
||||||
|
|
||||||
|
The value of the \uicontrol {Auto scroll} check box determines whether the
|
||||||
|
text edit or input should scroll when the text is longer than the width of
|
||||||
|
the input field.
|
||||||
|
|
||||||
|
If the \uicontrol {Overwrite mode} check box is selected, existing text is
|
||||||
|
overwritten, character-for-character by new text. Otherwise, new text is
|
||||||
|
inserted at the cursor position, displacing existing text. By default, new
|
||||||
|
text does not overwrite existing text.
|
||||||
|
|
||||||
|
To prevent users from changing the text, select the \uicontrol {Read only}
|
||||||
|
check box.
|
||||||
|
|
||||||
|
The value of the \uicontrol {Set active focus on press} check box determines
|
||||||
|
whether the text edit or input should gain active focus on a mouse press.
|
||||||
|
|
||||||
|
By default, the cursor becomes visible when the text edit or input gains
|
||||||
|
active focus, so that other properties can be bound to whether the cursor
|
||||||
|
is currently shown. Because the value of the \uicontrol {Cursor visible}
|
||||||
|
property gets set and unset automatically, any value you set yourself may
|
||||||
|
be overwritten.
|
||||||
|
|
||||||
|
If the \uicontrol {Persistent selection} check box is selected, a text edit
|
||||||
|
or input keeps its selection when active focus moves to another item.
|
||||||
|
|
||||||
|
To use a pointer device for selecting text, select the
|
||||||
|
\uicontrol {Select by mouse} check box.
|
||||||
|
|
||||||
|
\section1 Padding
|
||||||
|
|
||||||
|
The values of the properties in the \uicontrol Padding section specify the
|
||||||
|
padding around the content. The individual padding properties adopt the
|
||||||
|
value of the \uicontrol Padding field, unless you set them explicitly.
|
||||||
|
|
||||||
|
\note If you explicitly set the width or height of a text edit or input,
|
||||||
|
ensure that it is large enough to accommodate the padding values. If the
|
||||||
|
text does not have enough vertical or horizontal space in which to be
|
||||||
|
rendered, it will appear clipped.
|
||||||
|
|
||||||
|
\section1 Summary of Text Components
|
||||||
|
|
||||||
|
The following table lists the QML types that you can use to add text to
|
||||||
|
UIs. The \e Location column contains the tab name where you can find the
|
||||||
|
type in \uicontrol Library. The \e MCU column indicates which types are
|
||||||
|
supported on MCUs.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Icon
|
||||||
|
\li Name
|
||||||
|
\li Location
|
||||||
|
\li MCU
|
||||||
|
\li Purpose
|
||||||
|
\row
|
||||||
|
\li \inlineimage icons/label-icon16.png
|
||||||
|
\li \l [QtQuickControls]{Label}
|
||||||
|
\li Qt Quick - Controls 2
|
||||||
|
\li
|
||||||
|
\li A text label with inherited styling and font.
|
||||||
|
\row
|
||||||
|
\li \inlineimage text-icon16.png
|
||||||
|
\li \l [QtQuick]{Text}
|
||||||
|
\li Qt Quick - Basic
|
||||||
|
\li \inlineimage ok
|
||||||
|
\li Formatted read-only text.
|
||||||
|
\row
|
||||||
|
\li \inlineimage icons/textarea-icon16.png
|
||||||
|
\li \l [QtQuickControls]{TextArea}{Text Area}
|
||||||
|
\li Qt Quick - Controls 2
|
||||||
|
\li
|
||||||
|
\li Multiple lines of editable formatted text.
|
||||||
|
\row
|
||||||
|
\li \inlineimage text-edit-icon16.png
|
||||||
|
\li \l [QtQuick]{TextEdit}{Text Edit}
|
||||||
|
\li Qt Quick - Basic
|
||||||
|
\li
|
||||||
|
\li A single line of editable formatted text that can be validated.
|
||||||
|
\row
|
||||||
|
\li \inlineimage icons/textfield-icon16.png
|
||||||
|
\li \l [QtQuickControls]{TextField}{Text Field}
|
||||||
|
\li Qt Quick - Controls 2
|
||||||
|
\li
|
||||||
|
\li A single line of editable plain text.
|
||||||
|
\row
|
||||||
|
\li \inlineimage text-input-icon16.png
|
||||||
|
\li \l [QtQuick]{TextInput}{Text Input}
|
||||||
|
\li Qt Quick - Basic
|
||||||
|
\li
|
||||||
|
\li A single line of editable plain text that can be validated.
|
||||||
|
\endtable
|
||||||
|
*/
|
@@ -119,37 +119,12 @@
|
|||||||
|
|
||||||
\list
|
\list
|
||||||
\li \l Shapes
|
\li \l Shapes
|
||||||
|
\li \l Text
|
||||||
\li \l Images
|
\li \l Images
|
||||||
\li \l {User Interaction Methods}
|
\li \l {User Interaction Methods}
|
||||||
\li \l {Lists and Other Data Models}
|
\li \l {Lists and Other Data Models}
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Basic QML Types
|
|
||||||
|
|
||||||
You can use the following QML types to create components:
|
|
||||||
|
|
||||||
\list
|
|
||||||
\li \l [QtQuick]{AnimatedImage}{Animated Image} provides a way to play
|
|
||||||
animations stored as images containing a series of frames, such
|
|
||||||
as those stored in GIF files.
|
|
||||||
\li \l [QtQuick]{BorderImage}{Border Image} uses an image as a border or
|
|
||||||
background.
|
|
||||||
\li \l [QtQuick]{Image} adds a bitmap to the scene. You can stretch and
|
|
||||||
tile images.
|
|
||||||
\li \l [QtQuick]{Item} is the most basic of all visual types in QML. Even
|
|
||||||
though it has no visual appearance, it defines all the properties
|
|
||||||
that are common across visual types, such as the x and y position,
|
|
||||||
width and height, anchoring, and key handling.
|
|
||||||
\li \l [QtQuick] {Rectangle} adds a rectangle that is painted with a solid
|
|
||||||
fill color and an optional border. You can use the radius property
|
|
||||||
to create rounded rectangles.
|
|
||||||
\li \l [QtQuick]{Text} adds formatted read-only text.
|
|
||||||
\li \l [QtQuick]{TextEdit}{Text Edit} adds a single line of editable
|
|
||||||
formatted text that can be validated.
|
|
||||||
\li \l [QtQuick]{TextInput}{Text Input} adds a single line of editable
|
|
||||||
plain text that can be validated.
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\include qtquick-animation-types.qdocinc qtquick animation types
|
\include qtquick-animation-types.qdocinc qtquick animation types
|
||||||
|
|
||||||
\if defined(qtdesignstudio)
|
\if defined(qtdesignstudio)
|
||||||
@@ -203,6 +178,14 @@
|
|||||||
|
|
||||||
\section1 Creating Components in Design Mode
|
\section1 Creating Components in Design Mode
|
||||||
|
|
||||||
|
You can either use project wizard templates to create custom components and
|
||||||
|
controls or \l{Moving Components into Separate Files}{move subcomponents
|
||||||
|
into separate files} to make them reusable in other components.
|
||||||
|
|
||||||
|
\section2 Creating Components from Scratch
|
||||||
|
|
||||||
|
To use wizard templates to create custom components:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||||
@@ -224,7 +207,12 @@
|
|||||||
|
|
||||||
\li Edit its properties in \uicontrol Properties.
|
\li Edit its properties in \uicontrol Properties.
|
||||||
|
|
||||||
The available properties depend on the QML type.
|
\image qmldesigner-custom-component-properties.png
|
||||||
|
|
||||||
|
The available properties depend on the QML type. You can
|
||||||
|
\l{Specifying Dynamic Properties}{add properties for
|
||||||
|
components} in the \uicontrol Properties tab of the
|
||||||
|
\uicontrol {Connection View}.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -246,7 +234,7 @@
|
|||||||
\include qtdesignstudio-components.qdocinc creating studio components
|
\include qtdesignstudio-components.qdocinc creating studio components
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
\section1 Moving Components into Separate Files
|
\section2 Moving Components into Separate Files
|
||||||
|
|
||||||
An alternative way of creating reusable components is to move them into
|
An alternative way of creating reusable components is to move them into
|
||||||
separate QML files. Right-click a component in the \uicontrol Navigator
|
separate QML files. Right-click a component in the \uicontrol Navigator
|
||||||
@@ -267,14 +255,24 @@
|
|||||||
|
|
||||||
\section1 Moving Within Components
|
\section1 Moving Within Components
|
||||||
|
|
||||||
Components can consist of several other components. To view the component
|
The QML files that specify components can contain instances of other
|
||||||
hierarchy as a bread crumb path when you edit a component in
|
components specified in separate QML files. You can open the QML file
|
||||||
\uicontrol {Form Editor}, select \uicontrol {Go into Component} or press
|
that specifies a component in different ways from different views:
|
||||||
\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
|
\list
|
||||||
|
\li In \uicontrol {Form Editor} or \uicontrol Navigator,
|
||||||
|
right-click an instance of a component and then select
|
||||||
|
\uicontrol {Go into Component} in the context-menu or
|
||||||
|
press \key F2.
|
||||||
|
\li In \uicontrol Properties, select \uicontrol {Edit Master Component}.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The component hierarchy is displayed as a bread crumb path, where you can
|
||||||
|
click the component names to open the respective files. This enables you
|
||||||
|
to easily navigate back to the top level when you are done editing the
|
||||||
component.
|
component.
|
||||||
|
|
||||||
\image qmldesigner-breadcrumbs.png "Go into Component command"
|
\image qmldesigner-breadcrumbs.png "Component hierarchy"
|
||||||
|
|
||||||
\section1 Merging Files with Templates
|
\section1 Merging Files with Templates
|
||||||
|
|
||||||
|
@@ -108,4 +108,7 @@
|
|||||||
You can move the views anywhere on the screen and save them as
|
You can move the views anywhere on the screen and save them as
|
||||||
\e workspaces, as instructed in \l {Managing Workspaces}.
|
\e workspaces, as instructed in \l {Managing Workspaces}.
|
||||||
|
|
||||||
|
Watch a video about using the Design mode views:
|
||||||
|
|
||||||
|
\youtube RfEYO-5Mw6s
|
||||||
*/
|
*/
|
||||||
|
@@ -446,10 +446,6 @@
|
|||||||
\li \inlineimage icons/groupbox-icon16.png
|
\li \inlineimage icons/groupbox-icon16.png
|
||||||
\li \l [QtQuickControls]{GroupBox}{Group Box}
|
\li \l [QtQuickControls]{GroupBox}{Group Box}
|
||||||
\li A titled visual frame around a group of controls.
|
\li A titled visual frame around a group of controls.
|
||||||
\row
|
|
||||||
\li \inlineimage icons/label-icon16.png
|
|
||||||
\li \l [QtQuickControls]{Label}
|
|
||||||
\li A text label with inherited styling and font.
|
|
||||||
\row
|
\row
|
||||||
\li \inlineimage icons/page-icon16.png
|
\li \inlineimage icons/page-icon16.png
|
||||||
\li \l [QtQuickControls]{Page}
|
\li \l [QtQuickControls]{Page}
|
||||||
|
@@ -39,6 +39,8 @@ imagedirs = ../images \
|
|||||||
../../../src/plugins/qmldesigner/qtquickplugin/images \
|
../../../src/plugins/qmldesigner/qtquickplugin/images \
|
||||||
../../../src/plugins/texteditor/images
|
../../../src/plugins/texteditor/images
|
||||||
|
|
||||||
|
include(../../qtcreator/images/extraimages/qtdesignstudio-extraimages.qdocconf)
|
||||||
|
|
||||||
excludefiles += ../../qtcreator/src/qtcreator.qdoc \
|
excludefiles += ../../qtcreator/src/qtcreator.qdoc \
|
||||||
../../qtcreator/src/qtcreator-toc.qdoc
|
../../qtcreator/src/qtcreator-toc.qdoc
|
||||||
|
|
||||||
@@ -69,13 +71,6 @@ exampledirs = ../examples/ \
|
|||||||
../../qtcreator/examples
|
../../qtcreator/examples
|
||||||
examples.fileextensions += *.qml *.svg *.ts *.qm
|
examples.fileextensions += *.qml *.svg *.ts *.qm
|
||||||
|
|
||||||
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += ../../config/images/commercial.png \
|
|
||||||
../images/videoicons/SsFWyUeAA_4.jpg \
|
|
||||||
../images/videoicons/9ihYeC0YJ0M.jpg \
|
|
||||||
../images/videoicons/aV6kFxH3Xws.jpg \
|
|
||||||
../images/videoicons/ZzbucmQPU44.jpg
|
|
||||||
|
|
||||||
|
|
||||||
depends += qtwidgets \
|
depends += qtwidgets \
|
||||||
qtcore \
|
qtcore \
|
||||||
qtqml \
|
qtqml \
|
||||||
|
@@ -3,6 +3,9 @@ include($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)
|
|||||||
include(config/html-online.qdocconf)
|
include(config/html-online.qdocconf)
|
||||||
include(config/qtdesignstudio.qdocconf)
|
include(config/qtdesignstudio.qdocconf)
|
||||||
|
|
||||||
|
# Override macros for online use
|
||||||
|
include(../config/macros-online.qdocconf)
|
||||||
|
|
||||||
# Add an .html file with sidebar content, used in the online style
|
# Add an .html file with sidebar content, used in the online style
|
||||||
HTML.stylesheets += config/style/qt5-sidebar.html
|
HTML.stylesheets += config/style/qt5-sidebar.html
|
||||||
|
|
||||||
|
@@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
//! [creating studio components]
|
//! [creating studio components]
|
||||||
|
|
||||||
\section1 Creating Custom Controls
|
\section2 Creating Custom Controls
|
||||||
|
|
||||||
You can use the project wizard to create a starting point for a custom
|
You can use project wizard templates to create a starting point for a custom
|
||||||
\l [QtQuickControls2] {Button}, \l [QtQuickControls2] {Pane},
|
\l [QtQuickControls2] {Button}, \l [QtQuickControls2] {Pane},
|
||||||
\l [QtQuickControls2] {StackLayout}{Stacked Layout},
|
\l [QtQuickControls2] {StackLayout}{Stacked Layout},
|
||||||
\l [QtQuickControls2] {SwipeView}{Swipe View}, or
|
\l [QtQuickControls2] {SwipeView}{Swipe View}, or
|
||||||
@@ -43,8 +43,13 @@
|
|||||||
with a capital letter.
|
with a capital letter.
|
||||||
\li Edit component properties in the \uicontrol Properties view.
|
\li Edit component properties in the \uicontrol Properties view.
|
||||||
|
|
||||||
The available properties depend on the QML type.
|
The available properties depend on the QML type. You can
|
||||||
|
\l{Specifying Dynamic Properties}{add properties for components} in
|
||||||
|
the \uicontrol Properties tab of the \uicontrol {Connection View}.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
For an example of using the \uicontrol Button template to create a button,
|
||||||
|
see \l{Creating a Push Button} in the \l{Log In UI - Part 1} tutorial.
|
||||||
|
|
||||||
//! [creating studio components]
|
//! [creating studio components]
|
||||||
*/
|
*/
|
||||||
|
@@ -82,6 +82,7 @@
|
|||||||
\list
|
\list
|
||||||
\li \l{Editing 2D Content}
|
\li \l{Editing 2D Content}
|
||||||
\li \l{Shapes}
|
\li \l{Shapes}
|
||||||
|
\li \l{Text}
|
||||||
\li \l{Images}
|
\li \l{Images}
|
||||||
\li \l{User Interaction Methods}
|
\li \l{User Interaction Methods}
|
||||||
\li \l{Lists and Other Data Models}
|
\li \l{Lists and Other Data Models}
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
\inherits ShapePath
|
\inherits ShapePath
|
||||||
\ingroup qtquickstudio-components
|
\ingroup qtquickstudio-components
|
||||||
|
|
||||||
\brief A border drawn in four segments: left, top right, and bottom.
|
\brief A border drawn in four segments: left, top, right, and bottom.
|
||||||
|
|
||||||
The Border type is used to create borders out of four segments: left,
|
The Border type is used to create borders out of four segments: left,
|
||||||
top, right, and bottom. The \l drawLeft, \l drawTop, \l drawRight, and
|
top, right, and bottom. The \l drawLeft, \l drawTop, \l drawRight, and
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
The \l joinStyle property specifies how to connect two border line segments.
|
The \l joinStyle property specifies how to connect two border line segments.
|
||||||
|
|
||||||
The \l strokeColor, \l strokeWidth, and \l strokeStyle, properties specify
|
The \l strokeColor, \l strokeWidth, and \l strokeStyle properties specify
|
||||||
the appearance of the border line. The \l dashPattern and \l dashOffset
|
the appearance of the border line. The \l dashPattern and \l dashOffset
|
||||||
properties specify the appearance of dashed lines.
|
properties specify the appearance of dashed lines.
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"common": {
|
"common": {
|
||||||
"sdk_tools_url": {
|
"sdk_tools_url": {
|
||||||
"linux": "https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip",
|
"linux": "https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip",
|
||||||
"linux_sha256": "87f6dcf41d4e642e37ba03cb2e387a542aa0bd73cb689a9e7152aad40a6e7a08",
|
"linux_sha256": "89f308315e041c93a37a79e0627c47f21d5c5edbe5e80ea8dc0aac8a649e0e92",
|
||||||
"windows": "https://dl.google.com/android/repository/commandlinetools-win-6858069_latest.zip",
|
"windows": "https://dl.google.com/android/repository/commandlinetools-win-6609375_latest.zip",
|
||||||
"windows_sha256": "d2f6c9bb7db0362995c0b8dd2fd5949ce23c1dccb7f9392350b5e29b6d5fec7d",
|
"windows_sha256": "40bba20275180194bebf89bb58c74d712bb93cc401f36bd2f8f32383acf9826c",
|
||||||
"mac": "https://dl.google.com/android/repository/commandlinetools-mac-6858069_latest.zip",
|
"mac": "https://dl.google.com/android/repository/commandlinetools-mac-6609375_latest.zip",
|
||||||
"mac_sha256": "58a55d9c5bcacd7c42170d2cf2c9ae2889c6797a6128307aaf69100636f54a13"
|
"mac_sha256": "2c3822db1c916655223e5ee8ce0fbf6b73d0b99012045c9dc8eaa6a5736c0c55"
|
||||||
},
|
},
|
||||||
"sdk_essential_packages": {
|
"sdk_essential_packages": {
|
||||||
"default": ["platform-tools", "platforms;android-30", "cmdline-tools;latest"],
|
"default": ["platform-tools", "platforms;android-30", "cmdline-tools;latest"],
|
||||||
|
@@ -556,9 +556,10 @@ class DumperBase():
|
|||||||
return size, limit
|
return size, limit
|
||||||
|
|
||||||
def vectorData(self, value):
|
def vectorData(self, value):
|
||||||
|
if self.qtVersion() >= 0x060000:
|
||||||
|
data, size, alloc = self.qArrayData(value)
|
||||||
|
elif self.qtVersion() >= 0x050000:
|
||||||
vector_data_ptr = self.extractPointer(value)
|
vector_data_ptr = self.extractPointer(value)
|
||||||
# vector_data_ptr is what is e.g. stored in a QVector's d_ptr.
|
|
||||||
if self.qtVersion() >= 0x050000:
|
|
||||||
if self.ptrSize() == 4:
|
if self.ptrSize() == 4:
|
||||||
(ref, size, alloc, offset) = self.split('IIIp', vector_data_ptr)
|
(ref, size, alloc, offset) = self.split('IIIp', vector_data_ptr)
|
||||||
else:
|
else:
|
||||||
@@ -566,6 +567,7 @@ class DumperBase():
|
|||||||
alloc = alloc & 0x7ffffff
|
alloc = alloc & 0x7ffffff
|
||||||
data = vector_data_ptr + offset
|
data = vector_data_ptr + offset
|
||||||
else:
|
else:
|
||||||
|
vector_data_ptr = self.extractPointer(value)
|
||||||
(ref, alloc, size) = self.split('III', vector_data_ptr)
|
(ref, alloc, size) = self.split('III', vector_data_ptr)
|
||||||
data = vector_data_ptr + 16
|
data = vector_data_ptr + 16
|
||||||
self.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
|
self.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
|
||||||
@@ -573,9 +575,9 @@ class DumperBase():
|
|||||||
|
|
||||||
def qArrayData(self, value):
|
def qArrayData(self, value):
|
||||||
if self.qtVersion() >= 0x60000:
|
if self.qtVersion() >= 0x60000:
|
||||||
dd, data, size = self.split('ppi', value)
|
dd, data, size = self.split('ppp', value)
|
||||||
if dd:
|
if dd:
|
||||||
alloc, i, i = self.split('Pii', dd)
|
_, _, alloc = self.split('iip', dd)
|
||||||
else: # fromRawData
|
else: # fromRawData
|
||||||
alloc = size
|
alloc = size
|
||||||
return data, size, alloc
|
return data, size, alloc
|
||||||
@@ -618,18 +620,12 @@ class DumperBase():
|
|||||||
data = self.extractPointer(array_data_ptr + self.ptrSize())
|
data = self.extractPointer(array_data_ptr + self.ptrSize())
|
||||||
return data, size, alloc
|
return data, size, alloc
|
||||||
|
|
||||||
# addr is the begin of a QByteArrayData structure
|
|
||||||
def encodeStringHelper(self, value, limit):
|
def encodeStringHelper(self, value, limit):
|
||||||
addr = self.extractPointer(value)
|
|
||||||
# Should not happen, but we get it with LLDB as result
|
|
||||||
# of inferior calls
|
|
||||||
if addr == 0:
|
|
||||||
return 0, ''
|
|
||||||
data, size, alloc = self.qArrayData(value)
|
data, size, alloc = self.qArrayData(value)
|
||||||
if alloc != 0:
|
if alloc != 0:
|
||||||
self.check(0 <= size and size <= alloc and alloc <= 100 * 1000 * 1000)
|
self.check(0 <= size and size <= alloc and alloc <= 100 * 1000 * 1000)
|
||||||
elided, shown = self.computeLimit(size, limit)
|
elided, shown = self.computeLimit(2 * size, 2 * limit)
|
||||||
return elided, self.readMemory(data, 2 * shown)
|
return elided, self.readMemory(data, shown)
|
||||||
|
|
||||||
def encodeByteArrayHelper(self, value, limit):
|
def encodeByteArrayHelper(self, value, limit):
|
||||||
data, size, alloc = self.qArrayData(value)
|
data, size, alloc = self.qArrayData(value)
|
||||||
@@ -690,14 +686,6 @@ class DumperBase():
|
|||||||
self.putValue(data, 'latin1', elided=elided)
|
self.putValue(data, 'latin1', elided=elided)
|
||||||
|
|
||||||
def encodeString(self, value, limit=0):
|
def encodeString(self, value, limit=0):
|
||||||
if self.qtVersion() >= 0x60000:
|
|
||||||
dd, ptr, size = self.split('ppi', value)
|
|
||||||
if not dd:
|
|
||||||
return ""
|
|
||||||
elided, shown = self.computeLimit(2 * size, 2 * self.displayStringLimit)
|
|
||||||
data = self.readMemory(ptr, shown)
|
|
||||||
return data
|
|
||||||
else:
|
|
||||||
elided, data = self.encodeStringHelper(value, limit)
|
elided, data = self.encodeStringHelper(value, limit)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@@ -744,12 +732,6 @@ class DumperBase():
|
|||||||
return inner
|
return inner
|
||||||
|
|
||||||
def putStringValue(self, value):
|
def putStringValue(self, value):
|
||||||
if self.qtVersion() >= 0x60000:
|
|
||||||
dd, ptr, size = self.split('ppi', value)
|
|
||||||
elided, shown = self.computeLimit(2 * size, 2 * self.displayStringLimit)
|
|
||||||
data = self.readMemory(ptr, shown)
|
|
||||||
self.putValue(data, 'utf16', elided=elided)
|
|
||||||
else:
|
|
||||||
elided, data = self.encodeStringHelper(value, self.displayStringLimit)
|
elided, data = self.encodeStringHelper(value, self.displayStringLimit)
|
||||||
self.putValue(data, 'utf16', elided=elided)
|
self.putValue(data, 'utf16', elided=elided)
|
||||||
|
|
||||||
@@ -1902,7 +1884,7 @@ class DumperBase():
|
|||||||
= self.split('ppppIIp' + 'pppppp', dd)
|
= self.split('ppppIIp' + 'pppppp', dd)
|
||||||
|
|
||||||
if qobjectPtr:
|
if qobjectPtr:
|
||||||
qobjectType = self.createType('QObject')
|
qobjectType = self.createType('@QObject')
|
||||||
with SubItem(self, '[parent]'):
|
with SubItem(self, '[parent]'):
|
||||||
if not self.isCli:
|
if not self.isCli:
|
||||||
self.putSortGroup(9)
|
self.putSortGroup(9)
|
||||||
@@ -2063,8 +2045,8 @@ class DumperBase():
|
|||||||
|
|
||||||
# Dynamic properties.
|
# Dynamic properties.
|
||||||
if extraData:
|
if extraData:
|
||||||
byteArrayType = self.createType('QByteArray')
|
byteArrayType = self.createType('@QByteArray')
|
||||||
variantType = self.createType('QVariant')
|
variantType = self.createType('@QVariant')
|
||||||
if self.qtVersion() >= 0x50600:
|
if self.qtVersion() >= 0x50600:
|
||||||
values = self.vectorChildrenGenerator(
|
values = self.vectorChildrenGenerator(
|
||||||
extraData + 2 * ptrSize, variantType)
|
extraData + 2 * ptrSize, variantType)
|
||||||
|
@@ -1309,7 +1309,11 @@ class Dumper(DumperBase):
|
|||||||
result = 'registers=['
|
result = 'registers=['
|
||||||
for group in frame.GetRegisters():
|
for group in frame.GetRegisters():
|
||||||
for reg in group:
|
for reg in group:
|
||||||
value = ''.join(["%02x" % x for x in reg.GetData().uint8s])
|
data = reg.GetData()
|
||||||
|
if data.GetByteOrder() == lldb.eByteOrderLittle:
|
||||||
|
value = ''.join(["%02x" % x for x in reversed(data.uint8s)])
|
||||||
|
else:
|
||||||
|
value = ''.join(["%02x" % x for x in data.uint8s])
|
||||||
result += '{name="%s"' % reg.GetName()
|
result += '{name="%s"' % reg.GetName()
|
||||||
result += ',value="0x%s"' % value
|
result += ',value="0x%s"' % value
|
||||||
result += ',size="%s"' % reg.GetByteSize()
|
result += ',size="%s"' % reg.GetByteSize()
|
||||||
|
@@ -68,11 +68,8 @@ def qdump__QByteArray(d, value):
|
|||||||
if size > 0:
|
if size > 0:
|
||||||
d.putExpandable()
|
d.putExpandable()
|
||||||
|
|
||||||
if d.qtVersion() >= 0x60000:
|
|
||||||
elided, shown = d.computeLimit(size, d.displayStringLimit)
|
elided, shown = d.computeLimit(size, d.displayStringLimit)
|
||||||
p = d.readMemory(data, shown)
|
p = d.readMemory(data, shown)
|
||||||
else:
|
|
||||||
elided, p = d.encodeByteArrayHelper(value, d.displayStringLimit)
|
|
||||||
|
|
||||||
displayFormat = d.currentItemFormat()
|
displayFormat = d.currentItemFormat()
|
||||||
if displayFormat == DisplayFormat.Automatic or displayFormat == DisplayFormat.Latin1String:
|
if displayFormat == DisplayFormat.Automatic or displayFormat == DisplayFormat.Latin1String:
|
||||||
@@ -246,7 +243,7 @@ def qdump__Qt__ItemDataRole(d, value):
|
|||||||
|
|
||||||
|
|
||||||
def qdump__QStandardItemData(d, value):
|
def qdump__QStandardItemData(d, value):
|
||||||
role, pad, val = value.split('{@Qt::ItemDataRole}@{QVariant}')
|
role, pad, val = value.split('{@Qt::ItemDataRole}@{@QVariant}')
|
||||||
d.putPairContents(role.value(), (role, val), 'role', 'value')
|
d.putPairContents(role.value(), (role, val), 'role', 'value')
|
||||||
|
|
||||||
|
|
||||||
@@ -576,7 +573,7 @@ def qdump__QKeyEvent(d, value):
|
|||||||
# ushort reserved:15;
|
# ushort reserved:15;
|
||||||
(vtable, privateD, t, flags, modState, ts, txt, k, scanCode,
|
(vtable, privateD, t, flags, modState, ts, txt, k, scanCode,
|
||||||
virtualKey, modifiers,
|
virtualKey, modifiers,
|
||||||
c, autor) = value.split("ppHHiQ{QString}{int}IIIHH")
|
c, autor) = value.split("ppHHiQ{@QString}{int}IIIHH")
|
||||||
|
|
||||||
#d.putStringValue(txt)
|
#d.putStringValue(txt)
|
||||||
#data = d.encodeString(txt)
|
#data = d.encodeString(txt)
|
||||||
@@ -826,7 +823,7 @@ def qdump__QHash(d, value):
|
|||||||
|
|
||||||
|
|
||||||
def qdump__QVariantHash(d, value):
|
def qdump__QVariantHash(d, value):
|
||||||
qdumpHelper_QHash(d, value, d.createType('QString'), d.createType('QVariant'))
|
qdumpHelper_QHash(d, value, d.createType('@QString'), d.createType('@QVariant'))
|
||||||
|
|
||||||
|
|
||||||
def qdumpHelper_QHash(d, value, keyType, valueType):
|
def qdumpHelper_QHash(d, value, keyType, valueType):
|
||||||
@@ -888,6 +885,10 @@ def qdumpHelper_QHash_5(d, value, keyType, valueType):
|
|||||||
|
|
||||||
def qdumpHelper_QHash_6(d, value, keyType, valueType):
|
def qdumpHelper_QHash_6(d, value, keyType, valueType):
|
||||||
dptr = d.extractPointer(value)
|
dptr = d.extractPointer(value)
|
||||||
|
if dptr == 0:
|
||||||
|
d.putItemCount(0)
|
||||||
|
return
|
||||||
|
|
||||||
ref, _, size, buckets, seed, spans = d.split('i@qqqp', dptr)
|
ref, _, size, buckets, seed, spans = d.split('i@qqqp', dptr)
|
||||||
|
|
||||||
d.check(0 <= size and size <= 100 * 1000 * 1000)
|
d.check(0 <= size and size <= 100 * 1000 * 1000)
|
||||||
@@ -972,29 +973,29 @@ def qdump__QHostAddress(d, value):
|
|||||||
if tiVersion is not None:
|
if tiVersion is not None:
|
||||||
if tiVersion >= 16:
|
if tiVersion >= 16:
|
||||||
# After a6cdfacf
|
# After a6cdfacf
|
||||||
p, scopeId, a6, a4, protocol = d.split('p{QString}16s{quint32}B', dd)
|
p, scopeId, a6, a4, protocol = d.split('p{@QString}16s{@quint32}B', dd)
|
||||||
mayNeedParse = False
|
mayNeedParse = False
|
||||||
elif tiVersion >= 5:
|
elif tiVersion >= 5:
|
||||||
# Branch 5.8.0 at f70b4a13 TI: 15
|
# Branch 5.8.0 at f70b4a13 TI: 15
|
||||||
# Branch 5.7.0 at b6cf0418 TI: 5
|
# Branch 5.7.0 at b6cf0418 TI: 5
|
||||||
(ipString, scopeId, a6, a4, protocol, isParsed) \
|
(ipString, scopeId, a6, a4, protocol, isParsed) \
|
||||||
= d.split('{QString}{QString}16s{quint32}B{bool}', dd)
|
= d.split('{@QString}{@QString}16s{@quint32}B{bool}', dd)
|
||||||
else:
|
else:
|
||||||
(ipString, scopeId, a4, pad, a6, protocol, isParsed) \
|
(ipString, scopeId, a4, pad, a6, protocol, isParsed) \
|
||||||
= d.split('{QString}{QString}{quint32}I16sI{bool}', dd)
|
= d.split('{@QString}{@QString}{@quint32}I16sI{bool}', dd)
|
||||||
elif qtVersion >= 0x050600: # 5.6.0 at f3aabb42
|
elif qtVersion >= 0x050600: # 5.6.0 at f3aabb42
|
||||||
if d.ptrSize() == 8 or d.isWindowsTarget():
|
if d.ptrSize() == 8 or d.isWindowsTarget():
|
||||||
(ipString, scopeId, a4, pad, a6, protocol, isParsed) \
|
(ipString, scopeId, a4, pad, a6, protocol, isParsed) \
|
||||||
= d.split('{QString}{QString}{quint32}I16sI{bool}', dd)
|
= d.split('{@QString}{@QString}{@quint32}I16sI{bool}', dd)
|
||||||
else:
|
else:
|
||||||
(ipString, scopeId, a4, a6, protocol, isParsed) \
|
(ipString, scopeId, a4, a6, protocol, isParsed) \
|
||||||
= d.split('{QString}{QString}{quint32}16sI{bool}', dd)
|
= d.split('{@QString}{@QString}{@quint32}16sI{bool}', dd)
|
||||||
elif qtVersion >= 0x050000: # 5.2.0 at 62feb088
|
elif qtVersion >= 0x050000: # 5.2.0 at 62feb088
|
||||||
(ipString, scopeId, a4, a6, protocol, isParsed) \
|
(ipString, scopeId, a4, a6, protocol, isParsed) \
|
||||||
= d.split('{QString}{QString}{quint32}16sI{bool}', dd)
|
= d.split('{@QString}{@QString}{@quint32}16sI{bool}', dd)
|
||||||
else: # 4.8.7 at b05d05f
|
else: # 4.8.7 at b05d05f
|
||||||
(a4, a6, protocol, pad, ipString, isParsed, pad, scopeId) \
|
(a4, a6, protocol, pad, ipString, isParsed, pad, scopeId) \
|
||||||
= d.split('{quint32}16sB@{QString}{bool}@{QString}', dd)
|
= d.split('{@quint32}16sB@{@QString}{bool}@{@QString}', dd)
|
||||||
|
|
||||||
if mayNeedParse:
|
if mayNeedParse:
|
||||||
ipStringData, ipStringSize, ipStringAlloc = d.stringData(ipString)
|
ipStringData, ipStringSize, ipStringAlloc = d.stringData(ipString)
|
||||||
@@ -1047,7 +1048,7 @@ def qdump__QList(d, value):
|
|||||||
|
|
||||||
|
|
||||||
def qdump__QVariantList(d, value):
|
def qdump__QVariantList(d, value):
|
||||||
qdumpHelper_QList(d, value, d.createType('QVariant'))
|
qdumpHelper_QList(d, value, d.createType('@QVariant'))
|
||||||
|
|
||||||
|
|
||||||
def qdumpHelper_QList(d, value, innerType):
|
def qdumpHelper_QList(d, value, innerType):
|
||||||
@@ -1189,8 +1190,8 @@ def qdump__QLocale(d, value):
|
|||||||
decimal, group, listt, percent, zero,
|
decimal, group, listt, percent, zero,
|
||||||
minus, plus, exponential) \
|
minus, plus, exponential) \
|
||||||
= d.split('2s{short}2s'
|
= d.split('2s{short}2s'
|
||||||
+ '{QChar}{QChar}{short}{QChar}{QChar}'
|
+ '{@QChar}{@QChar}{short}{@QChar}{@QChar}'
|
||||||
+ '{QChar}{QChar}{QChar}', data)
|
+ '{@QChar}{@QChar}{@QChar}', data)
|
||||||
try:
|
try:
|
||||||
d.putStringValue(d.call('const char *', value, 'name'))
|
d.putStringValue(d.call('const char *', value, 'name'))
|
||||||
except:
|
except:
|
||||||
@@ -1328,7 +1329,7 @@ def qform__QVariantMap():
|
|||||||
|
|
||||||
|
|
||||||
def qdump__QVariantMap(d, value):
|
def qdump__QVariantMap(d, value):
|
||||||
qdumpHelper_QMap(d, value, d.createType('QString'), d.createType('QVariant'))
|
qdumpHelper_QMap(d, value, d.createType('@QString'), d.createType('@QVariant'))
|
||||||
|
|
||||||
|
|
||||||
def qdump__QMetaMethod(d, value):
|
def qdump__QMetaMethod(d, value):
|
||||||
@@ -1431,7 +1432,7 @@ def qdump__QRectF(d, value):
|
|||||||
def qdump__QRegExp(d, value):
|
def qdump__QRegExp(d, value):
|
||||||
# value.priv.engineKey.pattern
|
# value.priv.engineKey.pattern
|
||||||
privAddress = d.extractPointer(value)
|
privAddress = d.extractPointer(value)
|
||||||
(eng, pattern) = d.split('p{QString}', privAddress)
|
(eng, pattern) = d.split('p{@QString}', privAddress)
|
||||||
d.putStringValue(pattern)
|
d.putStringValue(pattern)
|
||||||
d.putExpandable()
|
d.putExpandable()
|
||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
@@ -1442,7 +1443,7 @@ def qdump__QRegExp(d, value):
|
|||||||
# Might fail (LLDB, Core files, ...), still cache might be warm.
|
# Might fail (LLDB, Core files, ...), still cache might be warm.
|
||||||
pass
|
pass
|
||||||
(patternSyntax, caseSensitive, minimal, pad, t, captures) \
|
(patternSyntax, caseSensitive, minimal, pad, t, captures) \
|
||||||
= d.split('{int}{int}B@{QString}{QStringList}', privAddress + 2 * d.ptrSize())
|
= d.split('{int}{int}B@{@QString}{@QStringList}', privAddress + 2 * d.ptrSize())
|
||||||
d.putSubItem('syntax', patternSyntax.cast(d.qtNamespace() + 'QRegExp::PatternSyntax'))
|
d.putSubItem('syntax', patternSyntax.cast(d.qtNamespace() + 'QRegExp::PatternSyntax'))
|
||||||
d.putSubItem('captures', captures)
|
d.putSubItem('captures', captures)
|
||||||
|
|
||||||
@@ -1455,15 +1456,15 @@ def qdump__QRegion(d, value):
|
|||||||
if d.qtVersion() >= 0x060000:
|
if d.qtVersion() >= 0x060000:
|
||||||
ref, _, rgn = d.split('i@p', d_ptr)
|
ref, _, rgn = d.split('i@p', d_ptr)
|
||||||
numRects, innerArea, rects, extents, innerRect = \
|
numRects, innerArea, rects, extents, innerRect = \
|
||||||
d.split('ii{QList<QRect>}{QRect}{QRect}', rgn)
|
d.split('ii{@QList<@QRect>}{@QRect}{@QRect}', rgn)
|
||||||
elif d.qtVersion() >= 0x050400: # Padding removed in ee324e4ed
|
elif d.qtVersion() >= 0x050400: # Padding removed in ee324e4ed
|
||||||
ref, _, rgn = d.split('i@p', d_ptr)
|
ref, _, rgn = d.split('i@p', d_ptr)
|
||||||
numRects, innerArea, rects, extents, innerRect = \
|
numRects, innerArea, rects, extents, innerRect = \
|
||||||
d.split('ii{QVector<QRect>}{QRect}{QRect}', rgn)
|
d.split('ii{@QVector<@QRect>}{@QRect}{@QRect}', rgn)
|
||||||
elif d.qtVersion() >= 0x050000:
|
elif d.qtVersion() >= 0x050000:
|
||||||
ref, _, rgn = d.split('i@p', d_ptr)
|
ref, _, rgn = d.split('i@p', d_ptr)
|
||||||
numRects, _, rects, extents, innerRect, innerArea = \
|
numRects, _, rects, extents, innerRect, innerArea = \
|
||||||
d.split('i@{QVector<QRect>}{QRect}{QRect}i', rgn)
|
d.split('i@{@QVector<@QRect>}{@QRect}{@QRect}i', rgn)
|
||||||
else:
|
else:
|
||||||
if d.isWindowsTarget():
|
if d.isWindowsTarget():
|
||||||
ref, _, rgn = d.split('i@p', d_ptr)
|
ref, _, rgn = d.split('i@p', d_ptr)
|
||||||
@@ -1473,7 +1474,7 @@ def qdump__QRegion(d, value):
|
|||||||
numRects = 0
|
numRects = 0
|
||||||
else:
|
else:
|
||||||
numRects, _, rects, extents, innerRect, innerArea = \
|
numRects, _, rects, extents, innerRect, innerArea = \
|
||||||
d.split('i@{QVector<QRect>}{QRect}{QRect}i', rgn)
|
d.split('i@{@QVector<@QRect>}{@QRect}{@QRect}i', rgn)
|
||||||
|
|
||||||
d.putItemCount(numRects)
|
d.putItemCount(numRects)
|
||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
@@ -1622,13 +1623,13 @@ def qdump__QStack(d, value):
|
|||||||
def qdump__QPolygonF(d, value):
|
def qdump__QPolygonF(d, value):
|
||||||
data, size, _ = d.vectorData(value)
|
data, size, _ = d.vectorData(value)
|
||||||
d.putItemCount(size)
|
d.putItemCount(size)
|
||||||
d.putPlotData(data, size, d.createType('QPointF'))
|
d.putPlotData(data, size, d.createType('@QPointF'))
|
||||||
|
|
||||||
|
|
||||||
def qdump__QPolygon(d, value):
|
def qdump__QPolygon(d, value):
|
||||||
data, size, _ = d.vectorData(value)
|
data, size, _ = d.vectorData(value)
|
||||||
d.putItemCount(size)
|
d.putItemCount(size)
|
||||||
d.putPlotData(data, size, d.createType('QPoint'))
|
d.putPlotData(data, size, d.createType('@QPoint'))
|
||||||
|
|
||||||
|
|
||||||
def qdump__QGraphicsPolygonItem(d, value):
|
def qdump__QGraphicsPolygonItem(d, value):
|
||||||
@@ -1642,7 +1643,7 @@ def qdump__QGraphicsPolygonItem(d, value):
|
|||||||
offset = 308
|
offset = 308
|
||||||
data, size, alloc = d.vectorData(dptr + offset)
|
data, size, alloc = d.vectorData(dptr + offset)
|
||||||
d.putItemCount(size)
|
d.putItemCount(size)
|
||||||
d.putPlotData(data, size, d.createType('QPointF'))
|
d.putPlotData(data, size, d.createType('@QPointF'))
|
||||||
|
|
||||||
|
|
||||||
def qedit__QString(d, value, data):
|
def qedit__QString(d, value, data):
|
||||||
@@ -1664,7 +1665,7 @@ def qdump__QString(d, value):
|
|||||||
if (size > 0):
|
if (size > 0):
|
||||||
d.putExpandable()
|
d.putExpandable()
|
||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
d.putArrayData(data, size, d.createType('QChar'))
|
d.putArrayData(data, size, d.createType('@QChar'))
|
||||||
|
|
||||||
|
|
||||||
def qdump__QStaticStringData(d, value):
|
def qdump__QStaticStringData(d, value):
|
||||||
@@ -1704,13 +1705,13 @@ def qdump__QStringRef(d, value):
|
|||||||
if stringptr == 0:
|
if stringptr == 0:
|
||||||
d.putValue('(null)')
|
d.putValue('(null)')
|
||||||
return
|
return
|
||||||
(data, ssize, alloc) = d.stringData(d.createValue(stringptr, 'QString'))
|
data, ssize, alloc = d.stringData(d.createValue(stringptr, '@QString'))
|
||||||
d.putValue(d.readMemory(data + 2 * pos, 2 * size), 'utf16')
|
d.putValue(d.readMemory(data + 2 * pos, 2 * size), 'utf16')
|
||||||
d.putPlainChildren(value)
|
d.putPlainChildren(value)
|
||||||
|
|
||||||
|
|
||||||
def qdump__QStringList(d, value):
|
def qdump__QStringList(d, value):
|
||||||
qdumpHelper_QList(d, value, d.createType('QString'))
|
qdumpHelper_QList(d, value, d.createType('@QString'))
|
||||||
d.putBetterType(value.type)
|
d.putBetterType(value.type)
|
||||||
|
|
||||||
|
|
||||||
@@ -1773,8 +1774,8 @@ def qdump__QUrl(d, value):
|
|||||||
if d.qtVersion() < 0x050000:
|
if d.qtVersion() < 0x050000:
|
||||||
d.call('void', value, 'port') # Warm up internal cache.
|
d.call('void', value, 'port') # Warm up internal cache.
|
||||||
d.call('void', value, 'path')
|
d.call('void', value, 'path')
|
||||||
st = '{QString}'
|
st = '{@QString}'
|
||||||
ba = '{QByteArray}'
|
ba = '{@QByteArray}'
|
||||||
(ref, dummy,
|
(ref, dummy,
|
||||||
scheme, userName, password, host, path, # QString
|
scheme, userName, password, host, path, # QString
|
||||||
query, # QByteArray
|
query, # QByteArray
|
||||||
@@ -1785,7 +1786,7 @@ def qdump__QUrl(d, value):
|
|||||||
= d.split('i@' + st * 5 + ba + st + ba * 5 + 'i', privAddress)
|
= d.split('i@' + st * 5 + ba + st + ba * 5 + 'i', privAddress)
|
||||||
else:
|
else:
|
||||||
(ref, port, scheme, userName, password, host, path, query, fragment) \
|
(ref, port, scheme, userName, password, host, path, query, fragment) \
|
||||||
= d.split('ii' + '{QString}' * 7, privAddress)
|
= d.split('ii' + '{@QString}' * 7, privAddress)
|
||||||
|
|
||||||
userNameEnc = d.encodeString(userName)
|
userNameEnc = d.encodeString(userName)
|
||||||
hostEnc = d.encodeString(host)
|
hostEnc = d.encodeString(host)
|
||||||
@@ -2000,7 +2001,49 @@ qdumpHelper_QVariants_F = [
|
|||||||
|
|
||||||
|
|
||||||
def qdump__QVariant(d, value):
|
def qdump__QVariant(d, value):
|
||||||
(data, typeStuff) = d.split('8sI', value)
|
if d.qtVersion() >= 0x060000:
|
||||||
|
qdumpHelper__QVariant6(d, value)
|
||||||
|
else:
|
||||||
|
qdumpHelper__QVariant45(d, value)
|
||||||
|
|
||||||
|
def qdumpHelper__QVariant6(d, value):
|
||||||
|
data, typeStuff = d.split('24sp', value)
|
||||||
|
packedType = typeStuff >> 2
|
||||||
|
metaTypeInterface = typeStuff - (typeStuff & 3)
|
||||||
|
|
||||||
|
if metaTypeInterface == 0:
|
||||||
|
qdumpHelper_QVariant_0(d, value)
|
||||||
|
return
|
||||||
|
|
||||||
|
revision, alignment, size, flags, variantType, metaObjectPtr, name = \
|
||||||
|
d.split('HHIIIpp', metaTypeInterface)
|
||||||
|
|
||||||
|
# Well-known simple type.
|
||||||
|
if variantType <= 6:
|
||||||
|
qdumpHelper_QVariants_A[variantType](d, value)
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Extended Core type (Qt 5+)
|
||||||
|
if variantType >= 31 and variantType <= 38:
|
||||||
|
qdumpHelper_QVariants_D[variantType - 31](d, value)
|
||||||
|
return None
|
||||||
|
|
||||||
|
typeName = d.extractCString(name).decode('utf8')
|
||||||
|
isShared = bool(typeStuff & 0x1)
|
||||||
|
|
||||||
|
if isShared:
|
||||||
|
# indirectly stored items (QRectF, ...)
|
||||||
|
ptr = d.extractPointer(value)
|
||||||
|
_, data = d.split('8s{%s}' % typeName, ptr)
|
||||||
|
d.putItem(data)
|
||||||
|
else:
|
||||||
|
d.putItem(d.createValue(data, typeName))
|
||||||
|
|
||||||
|
d.putBetterType('%sQVariant (%s)' % (d.qtNamespace(), typeName))
|
||||||
|
|
||||||
|
|
||||||
|
def qdumpHelper__QVariant45(d, value):
|
||||||
|
data, typeStuff = d.split('8sI', value)
|
||||||
variantType = typeStuff & 0x3fffffff
|
variantType = typeStuff & 0x3fffffff
|
||||||
isShared = bool(typeStuff & 0x40000000)
|
isShared = bool(typeStuff & 0x40000000)
|
||||||
|
|
||||||
@@ -2192,7 +2235,7 @@ def qdump__QXmlAttributes__Attribute(d, value):
|
|||||||
d.putExpandable()
|
d.putExpandable()
|
||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
with Children(d):
|
with Children(d):
|
||||||
(qname, uri, localname, val) = value.split('{QString}' * 4)
|
(qname, uri, localname, val) = value.split('{@QString}' * 4)
|
||||||
d.putSubItem('qname', qname)
|
d.putSubItem('qname', qname)
|
||||||
d.putSubItem('uri', uri)
|
d.putSubItem('uri', uri)
|
||||||
d.putSubItem('localname', localname)
|
d.putSubItem('localname', localname)
|
||||||
@@ -2200,8 +2243,8 @@ def qdump__QXmlAttributes__Attribute(d, value):
|
|||||||
|
|
||||||
|
|
||||||
def qdump__QXmlAttributes(d, value):
|
def qdump__QXmlAttributes(d, value):
|
||||||
vptr, atts = value.split('p{QList<QXmlAttributes::Attribute>}')
|
vptr, atts = value.split('p{@QList<@QXmlAttributes::Attribute>}')
|
||||||
_, att_size, _ = d.describeStruct('{QString}' * 4)
|
_, att_size, _ = d.describeStruct('{@QString}' * 4)
|
||||||
innerType = d.createType(d.qtNamespace() + 'QXmlAttributes::Attribute',
|
innerType = d.createType(d.qtNamespace() + 'QXmlAttributes::Attribute',
|
||||||
att_size)
|
att_size)
|
||||||
qdumpHelper_QList(d, atts, innerType)
|
qdumpHelper_QList(d, atts, innerType)
|
||||||
@@ -2265,7 +2308,7 @@ def qdump__QV4__Heap__String(d, value):
|
|||||||
# Note: There's also the 'Identifier' case. And the largestSubLength != 0 case.
|
# Note: There's also the 'Identifier' case. And the largestSubLength != 0 case.
|
||||||
(baseClass, textOrLeft, idOrRight, subtype, stringHash, largestSub, length, mm) \
|
(baseClass, textOrLeft, idOrRight, subtype, stringHash, largestSub, length, mm) \
|
||||||
= value.split('QppIIIIp')
|
= value.split('QppIIIIp')
|
||||||
textPtr = d.split('{QStringDataPtr}', textOrLeft)[0]
|
textPtr = d.split('{@QStringDataPtr}', textOrLeft)[0]
|
||||||
qdump__QStringData(d, d.createValue(textOrLeft, d.qtNamespace() + 'QStringData'))
|
qdump__QStringData(d, d.createValue(textOrLeft, d.qtNamespace() + 'QStringData'))
|
||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
with Children(d):
|
with Children(d):
|
||||||
@@ -3066,7 +3109,7 @@ def qdump__QJsonValue(d, value):
|
|||||||
return
|
return
|
||||||
if t == 3:
|
if t == 3:
|
||||||
d.putType('QJsonValue (String)')
|
d.putType('QJsonValue (String)')
|
||||||
string = value.split('{QString}')[0]
|
string = value.split('{@QString}')[0]
|
||||||
elided, base = d.encodeString(string, d.displayStringLimit)
|
elided, base = d.encodeString(string, d.displayStringLimit)
|
||||||
d.putValue(base, 'utf16', elided=elided)
|
d.putValue(base, 'utf16', elided=elided)
|
||||||
return
|
return
|
||||||
@@ -3121,14 +3164,14 @@ def qdump__QSqlResultPrivate(d, value):
|
|||||||
error1, error2, error3, \
|
error1, error2, error3, \
|
||||||
forwardOnly, pad, precisionPolicy, bindCount, \
|
forwardOnly, pad, precisionPolicy, bindCount, \
|
||||||
binds, executedQuery, types, values, indexes, holders = \
|
binds, executedQuery, types, values, indexes, holders = \
|
||||||
value.split('ppppi@{QString}bb@pppb@iiii{QString}ppp')
|
value.split('ppppi@{@QString}bb@pppb@iiii{@QString}ppp')
|
||||||
|
|
||||||
d.putStringValue(sql)
|
d.putStringValue(sql)
|
||||||
d.putPlainChildren(value)
|
d.putPlainChildren(value)
|
||||||
|
|
||||||
|
|
||||||
def qdump__QSqlField(d, value):
|
def qdump__QSqlField(d, value):
|
||||||
val, dptr = value.split('{QVariant}p')
|
val, dptr = value.split('{@QVariant}p')
|
||||||
qdump__QVariant(d, val)
|
qdump__QVariant(d, val)
|
||||||
d.putBetterType(d.currentType.value.replace('QVariant', 'QSqlField'))
|
d.putBetterType(d.currentType.value.replace('QVariant', 'QSqlField'))
|
||||||
d.putPlainChildren(value)
|
d.putPlainChildren(value)
|
||||||
@@ -3166,7 +3209,7 @@ def qdump__qfloat16(d, value):
|
|||||||
|
|
||||||
|
|
||||||
def qdumpHelper_QCbor_string(d, container_ptr, element_index, is_bytes):
|
def qdumpHelper_QCbor_string(d, container_ptr, element_index, is_bytes):
|
||||||
# d.split('i@{QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
|
# d.split('i@{@QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
|
||||||
# so be explicit:
|
# so be explicit:
|
||||||
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
|
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
|
||||||
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
|
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
|
||||||
@@ -3202,7 +3245,7 @@ def qdumpHelper_QCbor_array(d, container_ptr, is_cbor):
|
|||||||
if not container_ptr:
|
if not container_ptr:
|
||||||
d.putItemCount(0)
|
d.putItemCount(0)
|
||||||
return
|
return
|
||||||
# d.split('i@{QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
|
# d.split('i@{@QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
|
||||||
# so be explicit:
|
# so be explicit:
|
||||||
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
|
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
|
||||||
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
|
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
|
||||||
@@ -3223,7 +3266,7 @@ def qdumpHelper_QCbor_map(d, container_ptr, is_cbor):
|
|||||||
if not container_ptr:
|
if not container_ptr:
|
||||||
d.putItemCount(0)
|
d.putItemCount(0)
|
||||||
return
|
return
|
||||||
# d.split('i@{QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
|
# d.split('i@{@QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
|
||||||
# so be explicit:
|
# so be explicit:
|
||||||
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
|
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
|
||||||
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
|
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
|
||||||
|
@@ -700,7 +700,13 @@ void Qt5InformationNodeInstanceServer::doRenderModelNode3DImageView()
|
|||||||
renderImage = m_modelNodePreviewImageCache[m_modelNodePreviewImageCommand.componentPath()];
|
renderImage = m_modelNodePreviewImageCache[m_modelNodePreviewImageCommand.componentPath()];
|
||||||
} else {
|
} else {
|
||||||
QObject *instanceObj = nullptr;
|
QObject *instanceObj = nullptr;
|
||||||
if (!m_modelNodePreviewImageCommand.componentPath().isEmpty()) {
|
bool createdFromComponent = false;
|
||||||
|
ServerNodeInstance instance = instanceForId(m_modelNodePreviewImageCommand.instanceId());
|
||||||
|
if (!m_modelNodePreviewImageCommand.componentPath().isEmpty()
|
||||||
|
&& instance.isSubclassOf("QQuick3DNode")) {
|
||||||
|
// Create a new instance for Node components, as using Nodes in multiple
|
||||||
|
// import scenes simultaneously isn't supported. And even if it was, we still
|
||||||
|
// wouldn't want the children of the Node to appear in the preview.
|
||||||
QQmlComponent component(engine());
|
QQmlComponent component(engine());
|
||||||
component.loadUrl(QUrl::fromLocalFile(m_modelNodePreviewImageCommand.componentPath()));
|
component.loadUrl(QUrl::fromLocalFile(m_modelNodePreviewImageCommand.componentPath()));
|
||||||
instanceObj = qobject_cast<QQuick3DObject *>(component.create());
|
instanceObj = qobject_cast<QQuick3DObject *>(component.create());
|
||||||
@@ -708,8 +714,8 @@ void Qt5InformationNodeInstanceServer::doRenderModelNode3DImageView()
|
|||||||
qWarning() << "Could not create preview component: " << component.errors();
|
qWarning() << "Could not create preview component: " << component.errors();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
createdFromComponent = true;
|
||||||
} else {
|
} else {
|
||||||
ServerNodeInstance instance = instanceForId(m_modelNodePreviewImageCommand.instanceId());
|
|
||||||
instanceObj = instance.internalObject();
|
instanceObj = instance.internalObject();
|
||||||
}
|
}
|
||||||
QSize renderSize = m_modelNodePreviewImageCommand.size();
|
QSize renderSize = m_modelNodePreviewImageCommand.size();
|
||||||
@@ -758,7 +764,7 @@ void Qt5InformationNodeInstanceServer::doRenderModelNode3DImageView()
|
|||||||
ready = QQmlProperty::read(m_modelNode3DImageViewData.rootItem, "ready").value<bool>();
|
ready = QQmlProperty::read(m_modelNode3DImageViewData.rootItem, "ready").value<bool>();
|
||||||
}
|
}
|
||||||
QMetaObject::invokeMethod(m_modelNode3DImageViewData.rootItem, "destroyView");
|
QMetaObject::invokeMethod(m_modelNode3DImageViewData.rootItem, "destroyView");
|
||||||
if (!m_modelNodePreviewImageCommand.componentPath().isEmpty()) {
|
if (createdFromComponent) {
|
||||||
// If component changes, puppet will need a reset anyway, so we can cache the image
|
// If component changes, puppet will need a reset anyway, so we can cache the image
|
||||||
m_modelNodePreviewImageCache.insert(m_modelNodePreviewImageCommand.componentPath(), renderImage);
|
m_modelNodePreviewImageCache.insert(m_modelNodePreviewImageCommand.componentPath(), renderImage);
|
||||||
delete instanceObj;
|
delete instanceObj;
|
||||||
|
@@ -259,6 +259,8 @@ bool Qt5NodeInstanceServer::initRhi(RenderViewData &viewData)
|
|||||||
|
|
||||||
// redirect Qt Quick rendering into our texture
|
// redirect Qt Quick rendering into our texture
|
||||||
viewData.window->setRenderTarget(QQuickRenderTarget::fromRhiRenderTarget(viewData.texTarget));
|
viewData.window->setRenderTarget(QQuickRenderTarget::fromRhiRenderTarget(viewData.texTarget));
|
||||||
|
#else
|
||||||
|
Q_UNUSED(viewData)
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -294,6 +296,8 @@ QImage Qt5NodeInstanceServer::grabRenderControl(RenderViewData &viewData)
|
|||||||
rd->cb->resourceUpdate(readbackBatch);
|
rd->cb->resourceUpdate(readbackBatch);
|
||||||
|
|
||||||
viewData.renderControl->endFrame();
|
viewData.renderControl->endFrame();
|
||||||
|
#else
|
||||||
|
Q_UNUSED(viewData)
|
||||||
#endif
|
#endif
|
||||||
return renderImage;
|
return renderImage;
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,7 @@ Column {
|
|||||||
StandardTextSection {
|
StandardTextSection {
|
||||||
showVerticalAlignment: true
|
showVerticalAlignment: true
|
||||||
showFormatProperty: true
|
showFormatProperty: true
|
||||||
|
richTextEditorAvailable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
|
@@ -37,6 +37,7 @@ Column {
|
|||||||
showElide: true
|
showElide: true
|
||||||
showFontSizeMode: true
|
showFontSizeMode: true
|
||||||
showLineHeight: true
|
showLineHeight: true
|
||||||
|
richTextEditorAvailable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
|
@@ -40,6 +40,8 @@ Section {
|
|||||||
property bool showFormatProperty: false
|
property bool showFormatProperty: false
|
||||||
property bool showFontSizeMode: false
|
property bool showFontSizeMode: false
|
||||||
property bool showLineHeight: false
|
property bool showLineHeight: false
|
||||||
|
property bool richTextEditorAvailable: false
|
||||||
|
id: root
|
||||||
|
|
||||||
|
|
||||||
SectionLayout {
|
SectionLayout {
|
||||||
@@ -61,9 +63,10 @@ Section {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
richTextDialogLoader.show()
|
richTextDialogLoader.show()
|
||||||
}
|
}
|
||||||
|
visible: root.richTextEditorAvailable
|
||||||
}
|
}
|
||||||
|
|
||||||
RichTextEditor{
|
RichTextEditor {
|
||||||
onRejected: {
|
onRejected: {
|
||||||
hideWidget()
|
hideWidget()
|
||||||
}
|
}
|
||||||
|
@@ -160,7 +160,7 @@
|
|||||||
"type": "ComboBox",
|
"type": "ComboBox",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"index": 0,
|
"index": 1,
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@@ -178,7 +178,7 @@
|
|||||||
"type": "ComboBox",
|
"type": "ComboBox",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"index": 0,
|
"index": 1,
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@@ -178,7 +178,7 @@
|
|||||||
"type": "ComboBox",
|
"type": "ComboBox",
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"index": 0,
|
"index": 1,
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@@ -402,8 +402,11 @@ Usage::Type FindUsages::getType(int line, int column, int tokenIndex)
|
|||||||
}
|
}
|
||||||
if (const auto declarator = (*it)->asDeclarator()) {
|
if (const auto declarator = (*it)->asDeclarator()) {
|
||||||
if (containsToken(declarator->core_declarator)) {
|
if (containsToken(declarator->core_declarator)) {
|
||||||
if (declarator->initializer)
|
if (declarator->initializer && (!declarator->postfix_declarator_list
|
||||||
|
|| !declarator->postfix_declarator_list->value
|
||||||
|
|| !declarator->postfix_declarator_list->value->asFunctionDeclarator())) {
|
||||||
return Usage::Type::Initialization;
|
return Usage::Type::Initialization;
|
||||||
|
}
|
||||||
return Usage::Type::Declaration;
|
return Usage::Type::Declaration;
|
||||||
}
|
}
|
||||||
if (const auto decl = (*(it + 1))->asSimpleDeclaration()) {
|
if (const auto decl = (*(it + 1))->asSimpleDeclaration()) {
|
||||||
|
@@ -492,8 +492,11 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
|
|||||||
for (const auto &toImport : libraryInfo.imports()) {
|
for (const auto &toImport : libraryInfo.imports()) {
|
||||||
QString importName = toImport.module;
|
QString importName = toImport.module;
|
||||||
ComponentVersion vNow = toImport.version;
|
ComponentVersion vNow = toImport.version;
|
||||||
// there was a period in which no version == auto, should we add || !vNow.isValid() to the if?
|
/* There was a period in which no version == auto
|
||||||
if (toImport.flags & QmlDirParser::Import::Auto)
|
* Required for QtQuick imports less than 2.15
|
||||||
|
*/
|
||||||
|
if ((toImport.flags & QmlDirParser::Import::Auto)
|
||||||
|
|| !vNow.isValid())
|
||||||
vNow = version;
|
vNow = version;
|
||||||
Import subImport;
|
Import subImport;
|
||||||
subImport.valid = true;
|
subImport.valid = true;
|
||||||
|
@@ -180,9 +180,8 @@ void SftpTransfer::doStart()
|
|||||||
+ QtcProcess::quoteArgUnix(sourceFileOrLinkTarget).toLocal8Bit() + ' '
|
+ QtcProcess::quoteArgUnix(sourceFileOrLinkTarget).toLocal8Bit() + ' '
|
||||||
+ QtcProcess::quoteArgUnix(f.targetFile).toLocal8Bit() + '\n');
|
+ QtcProcess::quoteArgUnix(f.targetFile).toLocal8Bit() + '\n');
|
||||||
}
|
}
|
||||||
d->sftpProc.start(sftpBinary.toString(),
|
d->sftpProc.setStandardInputFile(batchFile.fileName());
|
||||||
QStringList{"-b", QDir::toNativeSeparators(batchFile.fileName())}
|
d->sftpProc.start(sftpBinary.toString(), d->connectionArgs);
|
||||||
<< d->connectionArgs);
|
|
||||||
emit started();
|
emit started();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -177,7 +177,7 @@ CrumblePath::CrumblePath(QWidget *parent) : QWidget(parent)
|
|||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
setStyleSheet("QPushButton { margin: 12; }");
|
setStyleSheet("QPushButton { padding-left: 12; padding-right: 12; }");
|
||||||
}
|
}
|
||||||
|
|
||||||
CrumblePath::~CrumblePath()
|
CrumblePath::~CrumblePath()
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@@ -803,7 +804,11 @@ QString SynchronousProcess::locateBinary(const QString &path, const QString &bin
|
|||||||
QString SynchronousProcess::normalizeNewlines(const QString &text)
|
QString SynchronousProcess::normalizeNewlines(const QString &text)
|
||||||
{
|
{
|
||||||
QString res = text;
|
QString res = text;
|
||||||
res.replace(QLatin1String("\r\n"), QLatin1String("\n"));
|
const auto newEnd = std::unique(res.begin(), res.end(), [](const QChar &c1, const QChar &c2) {
|
||||||
|
return c1 == '\r' && c2 == '\r'; // QTCREATORBUG-24556
|
||||||
|
});
|
||||||
|
res.chop(std::distance(newEnd, res.end()));
|
||||||
|
res.replace("\r\n", "\n");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -627,7 +627,7 @@ private:
|
|||||||
void Internal::CorePlugin::testOutputFormatter()
|
void Internal::CorePlugin::testOutputFormatter()
|
||||||
{
|
{
|
||||||
const QString input =
|
const QString input =
|
||||||
"B to be handled by B\r\n"
|
"B to be handled by B\r\r\n"
|
||||||
"not to be handled\n\n\n\n"
|
"not to be handled\n\n\n\n"
|
||||||
"A to be handled by A\n"
|
"A to be handled by A\n"
|
||||||
"continuation for A\r\n"
|
"continuation for A\r\n"
|
||||||
|
@@ -198,6 +198,9 @@ QString GdbMi::parseCString(const QChar *&from, const QChar *to)
|
|||||||
|
|
||||||
void GdbMi::parseValue(const QChar *&from, const QChar *to)
|
void GdbMi::parseValue(const QChar *&from, const QChar *to)
|
||||||
{
|
{
|
||||||
|
if (from == to)
|
||||||
|
return;
|
||||||
|
|
||||||
//qDebug() << "parseValue: " << QString(from, to - from);
|
//qDebug() << "parseValue: " << QString(from, to - from);
|
||||||
switch (from->unicode()) {
|
switch (from->unicode()) {
|
||||||
case '{':
|
case '{':
|
||||||
|
@@ -568,12 +568,8 @@ void LineEditField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
|
|
||||||
bool LineEditField::validate(MacroExpander *expander, QString *message)
|
bool LineEditField::validate(MacroExpander *expander, QString *message)
|
||||||
{
|
{
|
||||||
if (!JsonFieldPage::Field::validate(expander, message))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (m_isValidating)
|
if (m_isValidating)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
m_isValidating = true;
|
m_isValidating = true;
|
||||||
|
|
||||||
auto w = qobject_cast<FancyLineEdit *>(widget());
|
auto w = qobject_cast<FancyLineEdit *>(widget());
|
||||||
@@ -594,9 +590,9 @@ bool LineEditField::validate(MacroExpander *expander, QString *message)
|
|||||||
m_currentText = w->text();
|
m_currentText = w->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool baseValid = JsonFieldPage::Field::validate(expander, message);
|
||||||
m_isValidating = false;
|
m_isValidating = false;
|
||||||
|
return baseValid && !w->text().isEmpty();
|
||||||
return !w->text().isEmpty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineEditField::initializeData(MacroExpander *expander)
|
void LineEditField::initializeData(MacroExpander *expander)
|
||||||
|
@@ -113,14 +113,9 @@ double ZoomAction::setPreviousZoomFactor(double zoom)
|
|||||||
return zoom;
|
return zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool parentIsFormEditor(QWidget *parent)
|
bool parentIsToolBar(QWidget *parent)
|
||||||
{
|
{
|
||||||
while (parent) {
|
return qobject_cast<QToolBar *>(parent) != nullptr;
|
||||||
if (qobject_cast<FormEditorWidget *>(parent))
|
|
||||||
return true;
|
|
||||||
parent = qobject_cast<QWidget *>(parent->parent());
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QComboBox *createZoomComboBox(QWidget *parent)
|
QComboBox *createZoomComboBox(QWidget *parent)
|
||||||
@@ -135,7 +130,7 @@ QComboBox *createZoomComboBox(QWidget *parent)
|
|||||||
|
|
||||||
QWidget *ZoomAction::createWidget(QWidget *parent)
|
QWidget *ZoomAction::createWidget(QWidget *parent)
|
||||||
{
|
{
|
||||||
if (!m_combo && parentIsFormEditor(parent)) {
|
if (!m_combo && parentIsToolBar(parent)) {
|
||||||
m_combo = createZoomComboBox(parent);
|
m_combo = createZoomComboBox(parent);
|
||||||
m_combo->setProperty("hideborder", true);
|
m_combo->setProperty("hideborder", true);
|
||||||
m_combo->setCurrentIndex(indexOf(1.0));
|
m_combo->setCurrentIndex(indexOf(1.0));
|
||||||
|
@@ -101,6 +101,7 @@ void BindingModel::bindingRemoved(const BindingProperty &bindingProperty)
|
|||||||
|
|
||||||
void BindingModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
void BindingModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(selectedNodes)
|
||||||
m_handleDataChanged = false;
|
m_handleDataChanged = false;
|
||||||
resetModel();
|
resetModel();
|
||||||
m_handleDataChanged = true;
|
m_handleDataChanged = true;
|
||||||
|
@@ -512,8 +512,13 @@ QPicture FormEditorWidget::renderToPicture() const
|
|||||||
QPainter painter{&picture};
|
QPainter painter{&picture};
|
||||||
|
|
||||||
const QTransform viewportTransform = m_graphicsView->viewportTransform();
|
const QTransform viewportTransform = m_graphicsView->viewportTransform();
|
||||||
const QRectF boundingRect = rootItemRect();
|
auto items = m_formEditorView->scene()->allFormEditorItems();
|
||||||
|
|
||||||
|
QRectF boundingRect;
|
||||||
|
for (auto &item : items)
|
||||||
|
boundingRect |= item->childrenBoundingRect();
|
||||||
|
|
||||||
|
picture.setBoundingRect(boundingRect.toRect());
|
||||||
m_graphicsView->render(&painter, boundingRect, viewportTransform.mapRect(boundingRect.toRect()));
|
m_graphicsView->render(&painter, boundingRect, viewportTransform.mapRect(boundingRect.toRect()));
|
||||||
|
|
||||||
return picture;
|
return picture;
|
||||||
|
@@ -38,6 +38,7 @@ void BaseConnectionManager::setUp(NodeInstanceServerInterface *nodeInstanceServe
|
|||||||
ProjectExplorer::Target *,
|
ProjectExplorer::Target *,
|
||||||
AbstractView *view)
|
AbstractView *view)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(view)
|
||||||
m_nodeInstanceServer = nodeInstanceServer;
|
m_nodeInstanceServer = nodeInstanceServer;
|
||||||
m_isActive = true;
|
m_isActive = true;
|
||||||
}
|
}
|
||||||
|
@@ -258,6 +258,9 @@ bool QmlDesignerPlugin::delayedInitialize()
|
|||||||
d->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::PathTool);
|
d->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::PathTool);
|
||||||
d->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::TransitionTool);
|
d->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::TransitionTool);
|
||||||
|
|
||||||
|
if (DesignerSettings::getValue(DesignerSettingsKey::STANDALONE_MODE).toBool())
|
||||||
|
emitUsageStatistics("StandaloneMode");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -131,11 +131,6 @@ defineReplace(extractWarnings) {
|
|||||||
return($$result)
|
return($$result)
|
||||||
}
|
}
|
||||||
|
|
||||||
CLANGTOOLING_LIBS=-lclangTooling -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
|
||||||
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
|
||||||
-lclangASTMatchers -lclangToolingCore -lclangAST -lclangLex -lclangBasic
|
|
||||||
win32:CLANGTOOLING_LIBS += -lversion
|
|
||||||
|
|
||||||
BIN_EXTENSION =
|
BIN_EXTENSION =
|
||||||
win32: BIN_EXTENSION = .exe
|
win32: BIN_EXTENSION = .exe
|
||||||
|
|
||||||
@@ -208,12 +203,17 @@ isEmpty(LLVM_VERSION) {
|
|||||||
isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) {
|
isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) {
|
||||||
CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h
|
CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h
|
||||||
exists($$CLANGFORMAT_MAIN_HEADER) {
|
exists($$CLANGFORMAT_MAIN_HEADER) {
|
||||||
|
exists($$LLVM_LIBDIR/*clangBasic*) {
|
||||||
CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
|
CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
|
||||||
ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
|
ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
|
||||||
-lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
-lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
||||||
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
||||||
-lclangASTMatchers -lclangAST -lclangLex -lclangBasic
|
-lclangASTMatchers -lclangAST -lclangLex -lclangBasic
|
||||||
win32:CLANGFORMAT_LIBS += -lversion
|
win32:CLANGFORMAT_LIBS += -lversion
|
||||||
|
} else {
|
||||||
|
CLANGFORMAT_LIBS = -lclang-cpp
|
||||||
|
ALL_CLANG_LIBS = -lclang-cpp
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
win32:ALL_CLANG_LIBS += -lversion
|
win32:ALL_CLANG_LIBS += -lversion
|
||||||
@@ -240,6 +240,14 @@ isEmpty(LLVM_VERSION) {
|
|||||||
isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) {
|
isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) {
|
||||||
QTC_ENABLE_CLANG_REFACTORING=$$(QTC_ENABLE_CLANG_REFACTORING)
|
QTC_ENABLE_CLANG_REFACTORING=$$(QTC_ENABLE_CLANG_REFACTORING)
|
||||||
!isEmpty(QTC_ENABLE_CLANG_REFACTORING) {
|
!isEmpty(QTC_ENABLE_CLANG_REFACTORING) {
|
||||||
|
exists($$LLVM_LIBDIR/*clangBasic*) {
|
||||||
|
CLANGTOOLING_LIBS=-lclangTooling -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
||||||
|
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
||||||
|
-lclangASTMatchers -lclangToolingCore -lclangAST -lclangLex -lclangBasic
|
||||||
|
win32:CLANGTOOLING_LIBS += -lversion
|
||||||
|
} else {
|
||||||
|
CLANGTOOLING_LIBS = -lclang-cpp
|
||||||
|
}
|
||||||
!contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LIBTOOLING_LIBS = -L$${LLVM_LIBDIR}
|
!contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LIBTOOLING_LIBS = -L$${LLVM_LIBDIR}
|
||||||
LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS
|
LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS
|
||||||
}
|
}
|
||||||
|
@@ -2033,6 +2033,8 @@ struct S {
|
|||||||
void nonConstFunc();
|
void nonConstFunc();
|
||||||
static void staticFunc1() {}
|
static void staticFunc1() {}
|
||||||
static void staticFunc2();
|
static void staticFunc2();
|
||||||
|
virtual void pureVirtual() = 0;
|
||||||
|
virtual void pureVirtual2() = 0 {}
|
||||||
};
|
};
|
||||||
void func1(int &);
|
void func1(int &);
|
||||||
void func2(const int &);
|
void func2(const int &);
|
||||||
@@ -2112,7 +2114,7 @@ int main()
|
|||||||
Class * const structS = doc->globalSymbolAt(0)->asClass();
|
Class * const structS = doc->globalSymbolAt(0)->asClass();
|
||||||
QVERIFY(structS);
|
QVERIFY(structS);
|
||||||
QCOMPARE(structS->name()->identifier()->chars(), "S");
|
QCOMPARE(structS->name()->identifier()->chars(), "S");
|
||||||
QCOMPARE(structS->memberCount(), 11);
|
QCOMPARE(structS->memberCount(), 13);
|
||||||
|
|
||||||
Declaration * const sv = structS->memberAt(1)->asDeclaration();
|
Declaration * const sv = structS->memberAt(1)->asDeclaration();
|
||||||
QVERIFY(sv);
|
QVERIFY(sv);
|
||||||
@@ -2164,6 +2166,20 @@ int main()
|
|||||||
QCOMPARE(find.usages().at(0).type, Usage::Type::Write);
|
QCOMPARE(find.usages().at(0).type, Usage::Type::Write);
|
||||||
QCOMPARE(find.usages().at(1).type, Usage::Type::Declaration);
|
QCOMPARE(find.usages().at(1).type, Usage::Type::Declaration);
|
||||||
|
|
||||||
|
// Make sure that pure virtual declaration is not mistaken for an assignment.
|
||||||
|
Declaration * const pureVirtual = structS->memberAt(11)->asDeclaration();
|
||||||
|
QVERIFY(pureVirtual);
|
||||||
|
QCOMPARE(pureVirtual->name()->identifier()->chars(), "pureVirtual");
|
||||||
|
find(pureVirtual);
|
||||||
|
QCOMPARE(find.usages().size(), 1);
|
||||||
|
QCOMPARE(find.usages().at(0).type, Usage::Type::Declaration);
|
||||||
|
Function * const pureVirtual2 = structS->memberAt(12)->asFunction();
|
||||||
|
QVERIFY(pureVirtual2);
|
||||||
|
QCOMPARE(pureVirtual2->name()->identifier()->chars(), "pureVirtual2");
|
||||||
|
find(pureVirtual2);
|
||||||
|
QCOMPARE(find.usages().size(), 1);
|
||||||
|
QCOMPARE(find.usages().at(0).type, Usage::Type::Declaration);
|
||||||
|
|
||||||
Function * const main = doc->globalSymbolAt(6)->asFunction();
|
Function * const main = doc->globalSymbolAt(6)->asFunction();
|
||||||
QVERIFY(main);
|
QVERIFY(main);
|
||||||
QCOMPARE(main->memberCount(), 1);
|
QCOMPARE(main->memberCount(), 1);
|
||||||
|
@@ -2864,21 +2864,21 @@ void tst_Dumpers::dumper_data()
|
|||||||
|
|
||||||
+ CoreProfile()
|
+ CoreProfile()
|
||||||
|
|
||||||
+ Check("m0", "<0 items>", "@QMap<unsigned int, @QList<QString>>")
|
+ Check("m0", "<0 items>", "@QMap<unsigned int, @QList<@QString>>")
|
||||||
|
|
||||||
+ Check("m1", "<2 items>", "@QMap<unsigned int, @QList<QString>>")
|
+ Check("m1", "<2 items>", "@QMap<unsigned int, @QList<@QString>>")
|
||||||
+ CheckPairish("m1.0.key", "11", "unsigned int")
|
+ CheckPairish("m1.0.key", "11", "unsigned int")
|
||||||
+ CheckPairish("m1.0.value", "<1 items>", "@QList<QString>")
|
+ CheckPairish("m1.0.value", "<1 items>", "@QList<@QString>")
|
||||||
+ CheckPairish("m1.0.value.0", "[0]", "\"11\"", "@QString")
|
+ CheckPairish("m1.0.value.0", "[0]", "\"11\"", "@QString")
|
||||||
+ CheckPairish("m1.1.key", "22", "unsigned int")
|
+ CheckPairish("m1.1.key", "22", "unsigned int")
|
||||||
+ CheckPairish("m1.1.value", "<1 items>", "@QList<QString>")
|
+ CheckPairish("m1.1.value", "<1 items>", "@QList<@QString>")
|
||||||
+ CheckPairish("m1.1.value.0", "[0]", "\"22\"", "@QString")
|
+ CheckPairish("m1.1.value.0", "[0]", "\"22\"", "@QString")
|
||||||
|
|
||||||
+ Check("m2", "<2 items>", "@QMap<unsigned int, float>")
|
+ Check("m2", "<2 items>", "@QMap<unsigned int, float>")
|
||||||
+ Check("m2.0", "[0] 11", FloatValue("31.0"), "")
|
+ Check("m2.0", "[0] 11", FloatValue("31.0"), "")
|
||||||
+ Check("m2.1", "[1] 22", FloatValue("32.0"), "")
|
+ Check("m2.1", "[1] 22", FloatValue("32.0"), "")
|
||||||
|
|
||||||
+ Check("m3", "<2 items>", TypeDef("@QMap<unsigned int,@QList<QString>>", "T"))
|
+ Check("m3", "<2 items>", TypeDef("@QMap<unsigned int,@QList<@QString>>", "T"))
|
||||||
|
|
||||||
+ Check("m4", "<1 items>", "@QMap<@QString, float>")
|
+ Check("m4", "<1 items>", "@QMap<@QString, float>")
|
||||||
+ CheckPairish("m4.0.key", "\"22.0\"", "@QString")
|
+ CheckPairish("m4.0.key", "\"22.0\"", "@QString")
|
||||||
@@ -4003,7 +4003,7 @@ void tst_Dumpers::dumper_data()
|
|||||||
//+ Check("this.@1.@1", "[@QObject]", "\"This is thread #3\"", "@QObject");
|
//+ Check("this.@1.@1", "[@QObject]", "\"This is thread #3\"", "@QObject");
|
||||||
|
|
||||||
|
|
||||||
QTest::newRow("QVariant")
|
QTest::newRow("QVariant1")
|
||||||
<< Data("#include <QMap>\n"
|
<< Data("#include <QMap>\n"
|
||||||
"#include <QStringList>\n"
|
"#include <QStringList>\n"
|
||||||
"#include <QVariant>\n"
|
"#include <QVariant>\n"
|
||||||
@@ -4017,9 +4017,7 @@ void tst_Dumpers::dumper_data()
|
|||||||
|
|
||||||
"QVariant v0;\n\n"
|
"QVariant v0;\n\n"
|
||||||
|
|
||||||
"QVariant::Type t1 = QVariant::String;\n"
|
"QVariant v1 = QVariant(QString(\"A string\"));\n"
|
||||||
"QVariant v1 = QVariant(t1, (void*)0);\n"
|
|
||||||
//"*(QString*)v1.data() = QString(\"Some string\");\n\n"
|
|
||||||
|
|
||||||
"MyType my;\n"
|
"MyType my;\n"
|
||||||
"my[1] = (QStringList() << \"Hello\");\n"
|
"my[1] = (QStringList() << \"Hello\");\n"
|
||||||
@@ -4033,7 +4031,7 @@ void tst_Dumpers::dumper_data()
|
|||||||
"list << 1 << 2 << 3;\n"
|
"list << 1 << 2 << 3;\n"
|
||||||
"QVariant v3 = QVariant::fromValue(list);",
|
"QVariant v3 = QVariant::fromValue(list);",
|
||||||
|
|
||||||
"&my, &v0, &v1, &v2, &t, &s, &list, &v3, &t1")
|
"&my, &v0, &v1, &v2, &t, &s, &list, &v3")
|
||||||
|
|
||||||
+ CoreProfile()
|
+ CoreProfile()
|
||||||
|
|
||||||
@@ -7444,6 +7442,8 @@ void tst_Dumpers::dumper_data()
|
|||||||
|
|
||||||
"QApplication app(argc, argv);\n"
|
"QApplication app(argc, argv);\n"
|
||||||
"QGraphicsScene sc;\n"
|
"QGraphicsScene sc;\n"
|
||||||
|
"QPolygon p0;\n"
|
||||||
|
"QPolygonF p1;\n"
|
||||||
"QPolygonF pol;\n"
|
"QPolygonF pol;\n"
|
||||||
"pol.append(QPointF(1, 2));\n"
|
"pol.append(QPointF(1, 2));\n"
|
||||||
"pol.append(QPointF(2, 2));\n"
|
"pol.append(QPointF(2, 2));\n"
|
||||||
@@ -7456,6 +7456,8 @@ void tst_Dumpers::dumper_data()
|
|||||||
|
|
||||||
+ GuiProfile()
|
+ GuiProfile()
|
||||||
|
|
||||||
|
+ Check("p0", "<0 items>", "@QPolygon")
|
||||||
|
+ Check("p1", "<0 items>", "@QPolygonF")
|
||||||
+ Check("pol", "<5 items>", "@QPolygonF")
|
+ Check("pol", "<5 items>", "@QPolygonF")
|
||||||
+ Check("p", "<5 items>", "@QGraphicsPolygonItem");
|
+ Check("p", "<5 items>", "@QGraphicsPolygonItem");
|
||||||
|
|
||||||
|
@@ -269,7 +269,7 @@ void MainWindow::on_actionDumperBP_triggered()
|
|||||||
QStringList sl;
|
QStringList sl;
|
||||||
QString s = "hallo";
|
QString s = "hallo";
|
||||||
for (int c = 'a'; c < 'c'; c++) {
|
for (int c = 'a'; c < 'c'; c++) {
|
||||||
s += c + 23;
|
s += char(c + 23);
|
||||||
stdS += c;
|
stdS += c;
|
||||||
sl.push_back(s);
|
sl.push_back(s);
|
||||||
stdStringList.push_back(std::string(1, c));
|
stdStringList.push_back(std::string(1, c));
|
||||||
|
@@ -4017,12 +4017,14 @@ namespace qstring {
|
|||||||
|
|
||||||
void testQStringRef()
|
void testQStringRef()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
QString str = "Hello";
|
QString str = "Hello";
|
||||||
QStringRef ref(&str, 1, 2);
|
QStringRef ref(&str, 1, 2);
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// Check ref "el" QStringRef.
|
// Check ref "el" QStringRef.
|
||||||
// Continue.
|
// Continue.
|
||||||
dummyStatement(&str, &ref);
|
dummyStatement(&str, &ref);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void testQString()
|
void testQString()
|
||||||
@@ -4067,10 +4069,7 @@ namespace formats {
|
|||||||
{
|
{
|
||||||
const wchar_t *w = L"aöa";
|
const wchar_t *w = L"aöa";
|
||||||
QString u;
|
QString u;
|
||||||
if (sizeof(wchar_t) == 4)
|
u = QString::fromWCharArray(w);
|
||||||
u = QString::fromUcs4((uint *)w);
|
|
||||||
else
|
|
||||||
u = QString::fromUtf16((ushort *)w);
|
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// Check u "aöa" QString.
|
// Check u "aöa" QString.
|
||||||
// CheckType w wchar_t *.
|
// CheckType w wchar_t *.
|
||||||
@@ -4270,12 +4269,9 @@ namespace qvariant {
|
|||||||
void testQVariant1()
|
void testQVariant1()
|
||||||
{
|
{
|
||||||
QVariant value;
|
QVariant value;
|
||||||
QVariant::Type t = QVariant::String;
|
value = QVariant(QString("Some string"));
|
||||||
value = QVariant(t, (void*)0);
|
|
||||||
*(QString*)value.data() = QString("Some string");
|
|
||||||
int i = 1;
|
int i = 1;
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// Check t QVariant::String (10) QVariant::Type.
|
|
||||||
// Check value "Some string" QVariant (QString).
|
// Check value "Some string" QVariant (QString).
|
||||||
// Continue.
|
// Continue.
|
||||||
|
|
||||||
@@ -5360,10 +5356,7 @@ namespace basic {
|
|||||||
// Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
|
// Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
|
||||||
// Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
|
// Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
|
||||||
|
|
||||||
if (sizeof(wchar_t) == 4)
|
u = QString::fromWCharArray(w);
|
||||||
u = QString::fromUcs4((uint *)w);
|
|
||||||
else
|
|
||||||
u = QString::fromUtf16((ushort *)w);
|
|
||||||
|
|
||||||
// Make sure to undo "Change Format".
|
// Make sure to undo "Change Format".
|
||||||
dummyStatement(s, w, &ww, &cw, &cc, &cs);
|
dummyStatement(s, w, &ww, &cw, &cc, &cs);
|
||||||
|
@@ -6,9 +6,13 @@ DESTDIR = .
|
|||||||
|
|
||||||
SOURCES += simple_test_app.cpp
|
SOURCES += simple_test_app.cpp
|
||||||
|
|
||||||
QT += network xml
|
QT += network
|
||||||
!isEmpty(QT.script.name): QT += script
|
!isEmpty(QT.script.name): QT += script
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
|
||||||
|
else: QT += xml
|
||||||
|
|
||||||
|
|
||||||
osx {
|
osx {
|
||||||
DEFINES += USE_CXX11
|
DEFINES += USE_CXX11
|
||||||
QMAKE_CXXFLAGS += -stdlib=libc++
|
QMAKE_CXXFLAGS += -stdlib=libc++
|
||||||
|
@@ -582,7 +582,8 @@ TEST_F(CompilerOptionsBuilder, AddDefineFunctionMacrosMsvc)
|
|||||||
|
|
||||||
compilerOptionsBuilder.addDefineFunctionMacrosMsvc();
|
compilerOptionsBuilder.addDefineFunctionMacrosMsvc();
|
||||||
|
|
||||||
ASSERT_THAT(compilerOptionsBuilder.options(), Contains(QString{"-D__FUNCTION__=\"\""}));
|
ASSERT_THAT(compilerOptionsBuilder.options(),
|
||||||
|
Contains(QString{"-D__FUNCTION__=\"someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580\""}));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(CompilerOptionsBuilder, AddProjectConfigFileInclude)
|
TEST_F(CompilerOptionsBuilder, AddProjectConfigFileInclude)
|
||||||
@@ -683,9 +684,9 @@ TEST_F(CompilerOptionsBuilder, BuildAllOptionsCl)
|
|||||||
"/std:c++17",
|
"/std:c++17",
|
||||||
"-fms-compatibility-version=19.00",
|
"-fms-compatibility-version=19.00",
|
||||||
"-DprojectFoo=projectBar",
|
"-DprojectFoo=projectBar",
|
||||||
"-D__FUNCSIG__=\"\"",
|
"-D__FUNCSIG__=\"void __cdecl someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580(void)\"",
|
||||||
"-D__FUNCTION__=\"\"",
|
"-D__FUNCTION__=\"someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580\"",
|
||||||
"-D__FUNCDNAME__=\"\"",
|
"-D__FUNCDNAME__=\"?someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580@@YAXXZ\"",
|
||||||
"-I", IsPartOfHeader("wrappedQtHeaders"),
|
"-I", IsPartOfHeader("wrappedQtHeaders"),
|
||||||
"-I", IsPartOfHeader(toNative("wrappedQtHeaders/QtCore").toStdString()),
|
"-I", IsPartOfHeader(toNative("wrappedQtHeaders/QtCore").toStdString()),
|
||||||
"-I", toNative("/tmp/path"),
|
"-I", toNative("/tmp/path"),
|
||||||
@@ -723,9 +724,9 @@ TEST_F(CompilerOptionsBuilder, BuildAllOptionsClWithExceptions)
|
|||||||
"-fexceptions",
|
"-fexceptions",
|
||||||
"-fms-compatibility-version=19.00",
|
"-fms-compatibility-version=19.00",
|
||||||
"-DprojectFoo=projectBar",
|
"-DprojectFoo=projectBar",
|
||||||
"-D__FUNCSIG__=\"\"",
|
"-D__FUNCSIG__=\"void __cdecl someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580(void)\"",
|
||||||
"-D__FUNCTION__=\"\"",
|
"-D__FUNCTION__=\"someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580\"",
|
||||||
"-D__FUNCDNAME__=\"\"",
|
"-D__FUNCDNAME__=\"?someLegalAndLongishFunctionNameThatWorksAroundQTCREATORBUG-24580@@YAXXZ\"",
|
||||||
"-I", IsPartOfHeader("wrappedQtHeaders"),
|
"-I", IsPartOfHeader("wrappedQtHeaders"),
|
||||||
"-I", IsPartOfHeader(toNative("wrappedQtHeaders/QtCore").toStdString()),
|
"-I", IsPartOfHeader(toNative("wrappedQtHeaders/QtCore").toStdString()),
|
||||||
"-I", toNative("/tmp/path"),
|
"-I", toNative("/tmp/path"),
|
||||||
|