Merge remote-tracking branch 'origin/4.14'

Conflicts:
	doc/qtdesignstudio/examples/loginui1/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui2/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui3/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui4/qtquickcontrols2.conf
	share/qtcreator/debugger/dumper.py
	share/qtcreator/debugger/qttypes.py

Change-Id: Id44a67cdeeb0889ff96eddcdf409d20ca7cbdd0b
This commit is contained in:
Eike Ziller
2020-12-10 13:02:02 +01:00
97 changed files with 1053 additions and 449 deletions

View File

@@ -13,14 +13,39 @@ elseif (TARGET clang-cpp)
set(CLANG_TOOLING_LIBS libclang clang-cpp)
endif()
SET(QTC_CLANG_BUILDMODE_MATCH ON)
if (WIN32 AND TARGET libclang)
string(TOLOWER ${CMAKE_BUILD_TYPE} _type)
get_target_property(_llvmConfigs libclang IMPORTED_CONFIGURATIONS)
string(TOLOWER ${_llvmConfigs} _llvm_configs)
list(FIND _llvm_configs ${_type} _build_type_found)
if (_build_type_found LESS 0)
set(QTC_CLANG_BUILDMODE_MATCH OFF)
message("Build mode mismatch (debug vs release): limiting clangTooling")
endif()
if (WIN32 AND TARGET clangTooling)
# check that we can compile against clangTooling
# which requires the build modes to be compatible
# (debug vs release on Windows)
include(CheckCxxSourceCompiles)
set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
set(CMAKE_REQUIRED_INCLUDES ${CLANG_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES clangTooling)
check_cxx_source_compiles([=[
#include <clang/Tooling/CommonOptionsParser.h>
#include <clang/Tooling/Tooling.h>
using namespace clang;
using namespace clang::tooling;
llvm::cl::OptionCategory CheckToolCategory("check tool options");
int main(int argc, const char **argv)
{
CommonOptionsParser OptionsParser(argc, argv, CheckToolCategory);
ClangTool Tool(OptionsParser.getCompilations(),
OptionsParser.getSourcePathList());
return 0;
}
]=] QTC_CLANG_BUILDMODE_MATCH
)
unset(CMAKE_TRY_COMPILE_CONFIGURATION)
unset(CMAKE_REQUIRED_INCLUDES)
unset(CMAKE_REQUIRED_LIBRARIES)
else()
set(QTC_CLANG_BUILDMODE_MATCH ON)
endif()
if (NOT QTC_CLANG_BUILDMODE_MATCH)
message("Clang build mode mismatch (debug vs release): limiting clangTooling")
endif()

View File

@@ -68,7 +68,8 @@ depends += qtandroidextras\
qttestlib \
qtuitools \
qtxml \
qtlocation
qtlocation \
qtvirtualkeyboard
include(../../config/macros.qdocconf)
include(../../config/qt-cpp-ignore.qdocconf)

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,4 +1,8 @@
{HTML.extraimages,qhp.QtCreator.extraFiles} += \
images/commercial.png \
images/RfEYO-5Mw6s.jpg \
images/yOUdg1o2KJM.jpg
images/yOUdg1o2KJM.jpg \
images/DVWd_xMMgvg.jpg \
images/Ed8WS03C-Vk.jpg \
images/UfvA04CIXv0.jpg \
images/FzmLuRHQXaw.jpg

View File

@@ -5,4 +5,9 @@
images/aV6kFxH3Xws.jpg \
images/ZzbucmQPU44.jpg \
images/RfEYO-5Mw6s.jpg \
images/yOUdg1o2KJM.jpg
images/yOUdg1o2KJM.jpg \
images/DVWd_xMMgvg.jpg \
images/Ed8WS03C-Vk.jpg \
images/UfvA04CIXv0.jpg \
images/FzmLuRHQXaw.jpg \
images/w1yhDl93YI0.jpg

View File

@@ -34,7 +34,7 @@
\endif
\title Managing Data Collection Settings
\if defined (qtcreator)
When you install \QC as a part of Qt installation, you are asked whether
you allow it to collect pseudonymous information about your system and \QC
use. If you decline, the plugin is not installed and no analytics data is
@@ -44,6 +44,14 @@
you. You can change the settings for collecting and transmitting data any
time. By default, no data is collected and you have to select a telemetry
mode for data collection to begin.
\else
To enable the use of the telemetry plugin, you need to select \uicontrol
{Enable Usage Statistics} in the splash screen that appears when you first
launch \QDS. If the splash screen does not appear, you can enable the
telemetry plugin by selecting \uicontrol Help > \uicontrol {About Plugins} >
\uicontrol Utilities > \uicontrol UsageStatistics.
\image studio-usage-statistics.png "Enabling Usage Statistics"
\endif
\section1 Principles of Data Collection
@@ -58,7 +66,7 @@
\section1 Collecting Usage Statistics
The Telemetry plugin uses the
The telemetry plugin uses the
\l{https://api.kde.org/frameworks/kuserfeedback/html/index.html}
{KUserFeedback} framework to collect the usage data. The library
has been designed from the user data privacy point of view and
@@ -75,10 +83,10 @@
\list 1
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Telemetry
> \uicontrol {Usage Statistics}.
\image qtcreator-telemetry-settings.png
\image qtcreator-telemetry-settings.png "Telemetry settings"
\li In the \uicontrol {Telemetry mode} list, select the mode that
determines what kind of data is collected.
\li In the \uicontrol {Data} list, select entries to view
\li In the \uicontrol {Data sources} list, select entries to view
exactly what data is collected. Deselect check boxes for data
that you do not want to transmit to the backend storage.
\endlist
@@ -104,5 +112,12 @@
(\uicontrol {Qt Design Studio} > \uicontrol Preferences > \uicontrol
Environment > \uicontrol System on \macos), and then select
\uicontrol {Enable crash reporting}.
Since crash reports take up disk space, you may wish to remove them when
they are no longer needed. Select \uicontrol {Clear local crash reports} to
remove the crash report data.
\image studio-crashpad-checkbox.png "Checkbox for enabling crash reporting"
\endif
*/

View File

@@ -47,9 +47,9 @@
\row
\li View examples of what you can do with Qt
\li \l{https://doc.qt.io/qt-5/all-examples.html}{List of Qt Examples}
\li \l{https://doc.qt.io/qt/all-examples.html}{List of Qt Examples}
\l{https://doc.qt.io/qt-5/qtquick-codesamples.html}
\l{https://doc.qt.io/qt/qtquick-codesamples.html}
{List of Qt Quick Examples}
\row

View File

@@ -138,7 +138,7 @@
\li \l{Adding 3D Views}
\li \l{Using 3D Components}
\list
\li \l{Setting Node Properties}
\li \l{Setting Group Properties}
\li \l{Adding Models}
\li \l{Using Materials and Shaders}
\li \l{Attaching Textures to Materials}

View File

@@ -52,18 +52,15 @@
target platforms.
\li \uicontrol {Qt Quick Application - Scroll} uses the
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-scrollview.html}
{ScrollView} type to implement a scrollable list view
\l{ScrollView} type to implement a scrollable list view
(requires Qt 5.9 or later).
\li \uicontrol {Qt Quick Application - Stack} uses the
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-stackview.html}
{StackView} type to implement a set of pages with a stack-based
\l{StackView} type to implement a set of pages with a stack-based
navigation model (requires Qt 5.7 or later).
\li \uicontrol {Qt Quick Application - Swipe} uses the
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-swipeview.html}
{SwipeWiew} type to implement a set of pages with a swipe-based
\l{SwipeView} type to implement a set of pages with a swipe-based
navigation model (requires Qt 5.7 or later).
\endlist
@@ -138,8 +135,7 @@
that are used in the QML files.
\li Select the \uicontrol {Use Qt Virtual Keyboard} check box to add
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
{Qt Virtual Keyboard} to the application.
support for \l{Qt Virtual Keyboard} to the application.
\note If you have not installed the Qt Virtual Keyboard module when
you installed Qt, an error message will appear when you try to open
@@ -236,8 +232,7 @@
since Qt 5.1).
\li Select the \uicontrol {Use Qt Virtual Keyboard} check box to add
support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html}
{Qt Virtual Keyboard} to the application.
support for \l{Qt Virtual Keyboard} to the application.
\note If you have not installed the Qt Virtual Keyboard module when
you installed Qt, an error message will appear when you try to open

View File

@@ -553,6 +553,10 @@
You can set slider orientation to horizontal or vertical in the
\uicontrol Orientation field.
For more information, watch the following video:
\youtube Ed8WS03C-Vk
A dial supports circular, horizontal, and vertical input modes. For
applications where fast input is important, the circular input mode is
useful, as clicking the dial will move it directly to that position.

View File

@@ -26,7 +26,11 @@
/*!
\page quick-data-models.html
\previouspage quick-controls.html
\if defined(qtdesignstudio)
\nextpage quick-2d-effects.html
\else
\nextpage quick-buttons.html
\endif
\title Lists and Other Data Models

View File

@@ -192,6 +192,10 @@
If the image data comes from a sequential device (such as a socket),
Animated Image can only loop if caching is enabled.
For more information, watch the following video:
\youtube DVWd_xMMgvg
\section1 Summary of Images
The following table lists the QML types that you can use to add images.

View File

@@ -40,9 +40,9 @@
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}.
For more information, watch the following video:
\youtube yOUdg1o2KJM
To create a label with a background, use the \l Label type from the
Qt Quick Controls module.

View File

@@ -30,8 +30,12 @@
// **********************************************************************
/*!
\previouspage quick-data-models.html
\page quick-buttons.html
\if defined(qtdesignstudio)
\previouspage quick-2d-effects.html
\else
\previouspage quick-data-models.html
\endif
\nextpage quick-scalable-image.html
\title Creating Buttons

View File

@@ -123,14 +123,13 @@
\li \l Images
\li \l {User Interaction Methods}
\li \l {Lists and Other Data Models}
\if defined(qtdesignstudio)
\li \l {2D Effects}
\endif
\endlist
\include qtquick-animation-types.qdocinc qtquick animation types
\if defined(qtdesignstudio)
\include qtdesignstudio-visual-effects.qdocinc qml visual effects
\endif
\include qtquick-mcu-support.qdocinc mcu qtquick components
\section1 Styling Controls

View File

@@ -72,6 +72,10 @@
\image qmldesigner-binding-editor.png "Binding Editor"
For more information, watch the following video:
\youtube UfvA04CIXv0
\include creator-logical-operators.qdocinc logical operators
*/

View File

@@ -80,7 +80,7 @@
\uicontrol {Text Editor}. For more information, see
\l {Specifying Item Properties}.
\li \uicontrol Connections (5) enables you to create connections
\li \uicontrol {Connection View} (5) enables you to create connections
between objects, signals, and object properties. For more
information, see \l{Adding Connections}.
@@ -99,10 +99,20 @@
the UI controls, their properties and behavior and the available
actions. For more information, see \l{Adding States}.
\li \uicontrol {Transition Editor} enables you to make movement between
states smooth by animating the changes between states. For more
information, see \l{Animating Transitions Between States}.
\li \uicontrol Timeline (7) provides a timeline and keyframe based
editor that enables you to animate the properties of UI components.
For more information, see \l{Creating Animations}.
\li \uicontrol {Curve Editor} enables you to view and modify the whole
animation curve by inserting keyframes to the curve and dragging
them and the point handlers to modify the curve. You can modify the
appearance of the curve in the style editor. For more information,
see \l {Editing Animation Curves}.
\endlist
You can move the views anywhere on the screen and save them as

View File

@@ -46,7 +46,7 @@
\endlist
For more information about integrating QML and C++, see
\l{https://doc.qt.io/qt-5/qtqml-cppintegration-overview.html}
\l{https://doc.qt.io/qt/qtqml-cppintegration-overview.html}
{Overview - QML and C++ Integration}.
You can use a Qt Creator wizard template to create a Qt Quick application
@@ -59,7 +59,7 @@
The wizard automatically adds the \c QML_IMPORT_PATH option to the project
file for specifying the required
\l{https://doc.qt.io/qt-5/qtqml-syntax-imports.html#qml-import-path}
\l{https://doc.qt.io/qt/qtqml-syntax-imports.html#qml-import-path}
{QML import path}. The path is only needed if more than one subdirectory
contains QML files.

View File

@@ -63,6 +63,12 @@
\section1 Creating States
To open the \uicontrol States view, select \uicontrol View >
\uicontrol Views > \uicontrol States. To collapse or expand
the open view, select \uicontrol {Toggle States} or press
\key {Ctr+Alt+S}. You can also right-click the view and select
\uicontrol Collapse or \uicontrol Expand.
The \uicontrol States view displays the different \l{State}{states}
of a UI, beginning with a \e {base state}.
@@ -87,6 +93,10 @@
and you attempt to remove states where you change the values of its
properties, you are prompted to confirm the removal.
For more information, watch the following video:
\youtube FzmLuRHQXaw
\section1 Setting the Default State
To determine the startup state of the application,

View File

@@ -112,7 +112,7 @@
In addition, all functions of the \c Math and \c Date objects are supported.
For more information, see
\l{https://doc.qt.io/qt-5/qtqml-javascript-functionlist.html}
\l{https://doc.qt.io/qt/qtqml-javascript-functionlist.html}
{List of JavaScript Objects and Functions}.
\section2 Qt QML Methods
@@ -159,7 +159,7 @@
\endlist
For more information about using the methods, see
\l{https://doc.qt.io/qt-5/qml-qtqml-qt.html}{Qt QML Methods}.
\l{https://doc.qt.io/qt/qml-qtqml-qt.html}{Qt QML Methods}.
\section1 Using Qt Quick UI Forms

View File

@@ -79,7 +79,7 @@
that rely on external files, like the generic highlighter. You can still
add \l{https://doc.qt.io/qtcreator/creator-project-wizards.html}{wizard
templates} this way, by adding the
\l{https://doc.qt.io/qt-5/resources.html#using-resources-in-the-application}
\l{https://doc.qt.io/qt/resources.html#using-resources-in-the-application}
{path to the resource directory} into your QRC file with
ProjectExplorer::JsonWizardFactory::addWizardPath(). Registering
documentation and translations can be done in similar ways.

View File

@@ -345,7 +345,7 @@
You can use number icons in screenshots to highlight parts of the screenshot
(instead of using red arrows or borders, or something similar). You can then
refer to the numbers in text. For and example, see the
\l{http://doc.qt.io/qt-5/topics-app-development.html}{Development Tools}
\l{https://doc.qt.io/qt/topics-app-development.html}{Development Tools}
topic in the Qt reference documentation.
This improves the consistency of the look and feel of Qt documentation,
@@ -424,10 +424,10 @@
docs show a thumbnail of the video with a play button.
The support for the macro is defined in the
\c {qtcreator\doc\config\macros.qdocconf} file. To use the
macro, you need to save a thumbnail of the video in
\c {qtcreator\doc\qtcreator\images\videoicons} or
\c {qtcreator\doc\qtdesignstudio\images\videoicons}.
\c {qtcreator\doc\config\macros.qdocconf} and
\c {qtcreator\doc\config\macros-online.qdocconf} files. To
use the macro, you need to save a thumbnail of the video in
\c {qtcreator\doc\qtcreator\images\extraimages\images}.
You can use the following URL to open the thumbnail image in a browser:
\c {https://img.youtube.com/vi/<ID>/0.jpg}. The \e {<ID>} is the ID of
@@ -436,24 +436,21 @@
the ID is \c 9ihYeC0YJ0M. Save the image file as \c {9ihYeC0YJ0M.jpg}.
You must add the filename of the thumbnail file to
\c {\qtcreator\doc\qtcreator\config\qtcreator-project.qdocconf} and
\c {\qtcreator\doc\qtdesignstudio\config\qtdesignstudio.qdocconf}
to the value of the \c {HTML.extraimages,qhp.qtcreator.extraFiles}
or \c {HTML.extraimages,qhp.qtdesignstudio.extraFiles} option.
\c {qtcreator-extraimages.qdocconf} and \c {qtdesignstudio-extraimages.qdocconf}
files in the \c {\qtcreator\doc\qtcreator\images\extraimages} folder.
If you'll only link to the video from the \QC Manual or the \QDS Manual,
you'll only need to add the thumbnail filename to the \c .qdocconf file
for that project.
you'll only need to add the thumbnail filename to the \c extraimages.qdocconf
file for that project.
For example, to enable linking to a video with the thumbnail filename
\c 9ihYeC0YJ0M.jpg in the \QDS Manual, the \c {qtdesignstudio.qdocconf}
file should contain the following entry:
\c 9ihYeC0YJ0M.jpg in the \QDS Manual, the \c {qtdesignstudio-extraimages.qdocconf}
file should contain the filename:
\code
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += ../../config/images/commercial.png \
../images/videoicons/9ihYeC0YJ0M.jpg \
../images/videoicons/aV6kFxH3Xws.jpg \
../images/videoicons/ZzbucmQPU44.jpg
{HTML.extraimages,qhp.qtdesignstudio.extraFiles} += \
images/commercial.png \
images/9ihYeC0YJ0M.jpg
\endcode
To add a link to the video in text, you would write:

View File

@@ -1,6 +1,3 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
[Controls]
Style=Default
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html

View File

@@ -71,8 +71,9 @@
\list 1
\li Open \e {Screen01.ui.qml} for editing in the
\uicontrol {Form Editor} view.
\li Select \e logo in \uicontrol Navigator.
\li Select the \inlineimage icons/anchor-top.png
\li Select \e logo in the \uicontrol Navigator view.
\li In the \uicontrol Properties view, \uicontrol Layout tab,
select the \inlineimage icons/anchor-top.png
(\uicontrol Top) and \inlineimage icons/anchor-left.png
(\uicontrol Left) anchor buttons to anchor \e logo to the top left
corner of its parent with 10-pixel margins.

View File

@@ -231,5 +231,5 @@
alias to be able to switch the image inside the stack.
For more information about the available Qt graphical effects, see
\l {Applying Visual Effects}.
\l {2D Effects}.
*/

View File

@@ -1,6 +1,3 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
[Controls]
Style=Basic
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html

View File

@@ -1,6 +1,3 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
[Controls]
Style=Basic
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html

View File

@@ -1,6 +1,3 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
[Controls]
Style=Basic
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html

View File

@@ -1,6 +1,3 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
[Controls]
Style=Basic
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -89,9 +89,16 @@
tools.
\li \l{Managing Data Collection Settings}
\if defined (qtcreator)
You can enable \QC to report crashes automatically. If you agreed to
pseudonymous user statistics collection during the \QC installation,
you can turn it on and determine what type of data is collected and
transmitted to the backend storage.
\else
You can enable \QDS to report crashes automatically. If you enable
the telemetry plugin, you can turn on the pseudonymous user
statistics collection and determine what type of data is collected
and transmitted to the backend storage.
\endif
\endlist
*/

View File

@@ -86,6 +86,7 @@
\li \l{Images}
\li \l{User Interaction Methods}
\li \l{Lists and Other Data Models}
\li \l{2D Effects}
\li \l{Creating Buttons}
\li \l{Creating Scalable Buttons and Borders}
\endlist
@@ -114,7 +115,7 @@
\li \l{Adding 3D Views}
\li \l{Using 3D Components}
\list
\li \l{Setting Node Properties}
\li \l{Setting Group Properties}
\li \l{Adding Models}
\li \l{Using Materials and Shaders}
\li \l{Attaching Textures to Materials}

View File

@@ -1,117 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio 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.
**
****************************************************************************/
/*!
//! [qml visual effects]
\section1 Applying Visual Effects
\QDS provides a set of Qt Quick Studio effects that inherit the types in the
\l {Qt Graphical Effects} module. To apply a visual effect to a component,
drag-and-drop it from \uicontrol Library > \uicontrol Effects to the
component in \uicontrol Navigator.
The following table summarizes the available effects and contains links to
the documentation of the inherited QML type.
\table
\header
\li Icon
\li Qt Quick Studio Effect
\li Description
\row
\li \inlineimage icons/blend-mode-16px.png
\li \l [QML] {Blend}
\li Merges two source components by using a blend mode.
The default mode is \c subtract, where the pixel value from the
component that is going to be blended over the source component
is subtracted from the source and written.
For a list of possible values and examples of their use, see
\l{Blend::mode}{Blend.mode}.
\row
\li \inlineimage icons/fast-blur-16px.png
\li \l {FastBlur}{Blur}
\li Applies a fast blur effect to one or more source components.
\row
\li \inlineimage icons/brightness-contrast-16px.png
\li \l {BrightnessContrast}{Brightness Contrast}
\li Adjusts brightness and contrast.
\row
\li \inlineimage icons/colourize-16px.png
\li \l {ColorOverlay}{Color Overlay}
\li Alters the colors of the source component by applying an overlay
color.
\row
\li \inlineimage icons/colourize-16px.png
\li \l Colorize
\li Sets the color in the HSL color space.
\row
\li \inlineimage icons/directional-blur-16px.png
\li \l {DirectionalBlur}{Directional Blur}
\li Applies blur effect to the specified direction.
\row
\li \inlineimage icons/drop-shadow-16px.png
\li \l {DropShadow}{Drop Shadow}
\li Generates a soft shadow behind the source component.
\row
\li \inlineimage icons/glow-16px.png
\li \l [QML] {Glow}
\li Generates a halo-like glow around the source component.
\row
\li \inlineimage icons/hue-saturation-16px.png
\li \l {HueSaturation}{Hue Saturation}
\li Alters the source component colors in the HSL color space.
\row
\li \inlineimage icons/opacity-mask-16px.png
\li \l {OpacityMask}{Mask}
\li Masks the source component with another component.
\row
\li \inlineimage icons/mask-blur-16px.png
\li \l {MaskedBlur}{Masked Blur}
\li Applies a blur effect with a varying intesity.
The \l GradientStop type is used to specify the color used at a
given position in a gradient, as represented by a gradient stop.
The default positions for the stops are 0.20, 0.50, 0.80, and 1.00.
The default color is black.
\row
\li \inlineimage icons/radial-blur-16px.png
\li \l {RadialBlur}{Radial Blur}
\li Applies directional blur in a circular direction around the
component's center point.
\row
\li \inlineimage icons/desaturation-16px.png
\li \l {Desaturate}{Saturation}
\li Reduces the saturation of the colors.
\row
\li \inlineimage icons/zoom-blur-16px.png
\li \l {ZoomBlur}{Zoom Blur}
\li Applies directional blur effect towards source component's center
point.
\endtable
//! [qml visual effects]
*/

View File

@@ -94,4 +94,8 @@
the same location as the FBX file.
\li Select \uicontrol {Export All} to export files.
\endlist
For more information, watch the following video:
\youtube w1yhDl93YI0
*/

View File

@@ -43,7 +43,7 @@
view.
\list
\li \l {Setting Node Properties}
\li \l {Setting Group Properties}
You can set the opacity, visibility, and transform properties
of all 3D components.

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
@@ -76,6 +76,10 @@
For more information, see \l {Creating Animations}.
\endlist
For more information, watch the following video:
\youtube w1yhDl93YI0
For more information on other views, see
\l {Editing QML Files in Design Mode}.
*/

View File

@@ -28,12 +28,17 @@
\page studio-3d-node.html
\nextpage studio-3d-model.html
\title Setting Node Properties
\title Setting Group Properties
You can set the opacity, visibility, and transform properties of a 3D
component in the \uicontrol Properties view.
The \uicontrol Group component is a \uicontrol Node type that can be used to
wrap other objects for the purpose of grouping them. This allows you to
transform and set the opacity and visibility of multiple 3D components in
the \uicontrol Properties view simultaneously. To add a \uicontrol Group
component to your scene, drag-and-drop it from \uicontrol Library >
\uicontrol {QML Types} > \uicontrol {Qt Quick 3D} to the \uicontrol
{3D Editor} view or to a \uicontrol Scene component in \uicontrol Navigator.
\section1 Setting Component Opacity and Visibility
\section1 Setting Node Opacity and Visibility
All components have an \uicontrol Opacity value applied to them. The opacity
of 100 makes a component fully opaque, while the opacity of 0 prevents a

View File

@@ -35,7 +35,7 @@
like a card. The front and back sides are specified by using any two types
inside the Flipable type. The type with the higher z-order is the front
side. The \l opacityFront and \l opacityBack properties are used to hide
and show either the front or back side of the flipable item at a time.
and show either the front or back side of the item at a time.
The \l flipAngle property is used to animate the angle of the type to
produce the flipping effect. The \l xAxis or \l yAxis property is set
@@ -43,8 +43,8 @@
\section2 Example Usage
You can use the Flipable component in \QDS to create a flipable item. In
this example, the two sides of the flipable show ISO 7000 icons.
You can use the Flipable component in \QDS to create an item that can be
flipped. In this example, the two sides of the item show ISO 7000 icons.
\image studio-flipable.png
@@ -85,19 +85,19 @@
/*!
\qmlproperty real Flipable::opacityBack
The opacity of the back side of the flipable type.
The opacity of the back side of the type.
The opacity can be set between 0 and 1 to hide or show the items on the
back side of the flipable type.
back side of the type.
*/
/*!
\qmlproperty real Flipable::opacityFront
The opacity of the front side of the flipable type.
The opacity of the front side of the type.
The opacity can be set between 0 and 1 to hide or show the items on the
front side of the flipable type.
front side of the type.
*/
/*!
@@ -105,7 +105,7 @@
Whether the type is rotated around the x-axis.
This property is set to 1 to rotate the flipable type around the x-axis.
This property is set to 1 to rotate the type around the x-axis.
*/
/*!
@@ -113,13 +113,13 @@
Whether the type is rotated around the y-axis.
This property is set to 1 to rotate the flipable type around the y-axis.
This property is set to 1 to rotate the type around the y-axis.
*/
/*!
\qmlproperty bool Flipable::flipped
Whether the flipable type has been flipped.
Whether the type has been flipped.
This property is set to \c true when the type is flipped.
*/

View File

@@ -41,7 +41,7 @@
\l ShapeGradient subtypes and set using the \l gradient property.
If both a color and a gradient are specified, the gradient is used.
The \l strokeColor, \l strokeWidth, and \l strokeStyle, properties specify
The \l strokeColor, \l strokeWidth, and \l strokeStyle properties specify
the appearance of the pie outline. The \l dashPattern and \l dashOffset
properties specify the appearance of dashed lines.

View File

@@ -34,8 +34,8 @@
The Triangle type can be used to draw triangles with different dimensions
and shapes. The type is enclosed in an invisible \l Rectangle type. The size
of the triagle is determined by the size of the bounding rectangle. The
dimensions of the triangle can be changed to make it elongated or squatter
of the triangle is determined by the size of the bounding rectangle. The
dimensions of the triangle can be changed to make it elongated or squat
with space around it by using the \l leftMargin, \l topMargin,
\l rightMargin, and \l bottomMargin properties. The margins are set between
the triangle and the edges of the parent rectangle.

View File

@@ -0,0 +1,376 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio 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-2d-effects.html
\previouspage quick-data-models.html
\nextpage quick-buttons.html
\title 2D Effects
\QDS provides a set of Qt Quick Studio effects that inherit the types in the
\l {Qt Graphical Effects} module. To apply a visual effect to a component,
drag-and-drop it from \uicontrol Library > \uicontrol Effects to the
component in \uicontrol Navigator.
\image studio-2d-effects.png "Effects tab in Library"
Effects have one or more source properties for specifying the visual input
for which the effect is applied to an item. The altered visual output is
then presented in the effect item itself. The source can be another, often
hidden, item in the QML scene. More complex effects can have multiple
sources. The source item type can be any QML type, even video or another
effect. Pipelining multiple effects together is a simple way to create
even more impressive output.
Each effect has a set of properties that can be used to configure the effect
output. Properties can be animated just like any other QML properties. The
QML type documentation contains property descriptions and basic usage
examples.
In addition to the effects described in this topic, you can set linear,
radial, and conical gradients. For more information, see
\l{Picking Gradients}.
\section1 Caching and Borders
The \uicontrol Cached property allows the effect output pixels to be cached
in order to improve the rendering performance. Every time the source or
effect properties are changed, the pixels in the cache must be updated.
Memory consumption is increased, because an extra buffer of memory is
required for storing the effect output. We recommend that you disable the
cache when the source or the effect properties are animated.
The \uicontrol {Transparent border} property determines the blur behavior
near the edges of the item, where the pixel blurring is affected by
the pixels outside the source edges.
If the property is set to \c true, the pixels outside the source are
interpreted as being transparent, which is similar to OpenGL clamp-to-border
extension. The blur is expanded slightly outside the effect item area.
If the property is set to \c false, the pixels outside the source are
interpreted as containing the same color as the pixels at the edge of
the item, which is similar to OpenGL clamp-to-edge behavior. The blur
does not expand outside the effect item area.
\section1 Summary of 2D Effects
The following table summarizes the available effects and contains links to
the documentation of the inherited QML type.
\note The effects are available when running with OpenGL.
\table
\header
\li Icon
\li Qt Quick Studio Effect
\li Description
\row
\li \inlineimage icons/blend-mode-16px.png
\li \l [QML] {Blend}
\li Merges two source components by using a blend mode.
The default \uicontrol Mode is \c subtract, where the pixel value
from the component specified in the \uicontrol {Foreground source}
field, which is going to be blended over the source component,
is subtracted from the source and written over it.
For a list of possible \uicontrol Mode values and examples of their
use, see \l{Blend::mode}{Blend.mode}.
\row
\li \inlineimage icons/brightness-contrast-16px.png
\li \l {BrightnessContrast}{Brightness Contrast}
\li Adjusts \uicontrol Brightness and \uicontrol Contrast.
\row
\li \inlineimage icons/colourize-16px.png
\li \l {ColorOverlay}{Color Overlay}
\li Alters the colors of the source component by applying an
\uicontrol {Overlay Color}. You can use the color picker
to \l{Picking Colors}{select the color}.
\row
\li \inlineimage icons/colourize-16px.png
\li \l Colorize
\li Sets the color in the HSL color space by specifying \uicontrol Hue,
\uicontrol Lightness, and \uicontrol Saturation values.
\row
\li \inlineimage icons/desaturation-16px.png
\li \l {Desaturate}{Desaturation}
\li Reduces the saturation of the colors by the value set in the
\uicontrol Desaturation field. The value ranges from \c 0.0
(no change) to \c 1.0 (desaturated). Desaturated pixel values are
calculated as averages of the original RGB component values
of the source item.
\row
\li \inlineimage icons/directional-blur-16px.png
\li \l {DirectionalBlur}{Directional Blur}
\li Applies a blur effect to the specified direction. The value of the
\uicontrol Angle field, defines the direction of the blur. This
effect makes the source item appear to be moving in the direction of
the blur. Blur is applied to both sides of each pixel, and therefore
setting the direction to \c 0 and \c 180 provides the same result.
The value of the \uicontrol Length field specifies the perceived
amount of movement for each pixel. The movement is divided evenly
to both sides of each pixel.
The quality of the blur depends on the value of the
\uicontrol Samples field. If the \uicontrol Length value is large,
more samples are needed to preserve high visual quality.
\row
\li \inlineimage icons/displace-16px.png
\li \l Displace
\li Moves the pixels of the source item according to the displacement
map specified in the \uicontrol {Displacement source} field.
The value of the \uicontrol Displacement field specifies the
scale for the displacement. The larger the scale, the larger the
displacement of the pixels. The value set to \c 0.0 causes no
displacement. The value of \c -1.0 sets the inverted maximum shift
according to the displacement source value, while \c 1.0 sets the
maximum shift.
\row
\li \inlineimage icons/drop-shadow-16px.png
\li \l {DropShadow}{Drop Shadow}
\li Generates a soft shadow behind the source component using a
gaussian blur. This effect blurs the alpha channel of the input and
colorizes the result, which it then places behind the source object
to create a soft shadow. You can set the shadow's color in the
\uicontrol {Drop Shadow Color} field and change its location in the
\uicontrol {Horizontal offset} and \uicontrol {Vertical offset}
fields.
The value of the \uicontrol Radius field specifies the softness of
the shadow. A larger radius causes the edges of the shadow to appear
more blurry. The ideal blur is achieved by setting the value of the
\uicontrol Samples field to twice as large as the highest required
radius value plus one (\c {samples = 1 + radius * 2}).
The soft shadow is created by blurring the image live using a
gaussian blur, which is a costly operation. Fullscreen gaussian
blur with even a moderate number of samples will only run at 60
FPS on high-end graphics hardware.
\row
\li \inlineimage icons/fast-blur-16px.png
\li \l {FastBlur}{Fast Blur}
\li Applies a fast blur effect to one or more source components.
\uicontrol {Fast Blur} offers lower blur quality than
\uicontrol {Gaussian Blur}, but it is faster to render.
This effect softens the source content by blurring it with
an algorithm that uses source content downscaling and
bilinear filtering. Use this effect if the source content
is rapidly changing and the highest possible blur quality
is not needed.
The value of the \uicontrol Radius field specifies the distance of
the neighboring pixels that affect the blurring of an individual
pixel. A larger radius increases the blur effect. The fast blur
algorithm may internally reduce the accuracy of the radius in order
to provide good rendering performance.
\row
\li \inlineimage icons/gamma-adjust-16px.png
\li \l [QML] {GammaAdjust}{Gamma Adjust}
\li Alters the luminance of the source item. This effect is applied
to each pixel according to the curve that is pre-defined as a
power-law expression, where the value of the \uicontrol Gamma
field is used as the reciprocal scaling exponent.
\row
\li \inlineimage icons/gaussian-blur-16px.png
\li \l [QML] {GaussianBlur}{Gaussian Blur}
\li Applies a gaussian blur effect to one or more source components.
The effect softens the image by blurring it with an algorithm that
uses the gaussian function to calculate the effect. The effect
produces higher quality than \uicontrol {Fast Blur}, but is slower
to render. Performing blur live is a costly operation. Fullscreen
gaussian blur with even a moderate number of \uicontrol Samples
will only run at 60 FPS on high-end graphics hardware.
The value of the \uicontrol Radius field specifies the distance of
the neighboring pixels that affect the blurring of an individual
pixel. The value of the \uicontrol Distance field is a parameter to
the gaussian function that is used when calculating neighboring
pixel weights for the blurring. A larger deviation causes an image
to appear more blurry, but it also reduces the quality of the blur.
A very large deviation value causes the effect to look a bit similar
to what, for exmple, a box blur algorithm produces. A too small
deviation value makes the effect insignificant for the pixels near
the radius.
\row
\li \inlineimage icons/glow-16px.png
\li \l [QML] {Glow}
\li Generates a halo-like glow around the source component. This effect
blurs the alpha channel of the source and colorizes it with
\uicontrol {Glow color}. It then places the alpha channel behind the
source, resulting in a halo or glow around the object. The quality
of the blurred edge can be controlled by using the values of the
\uicontrol Samples and \uicontrol Radius and the strength of the
glow can be changed using the value of the \uicontrol Spread field.
\row
\li \inlineimage icons/hue-saturation-16px.png
\li \l {HueSaturation}{Hue Saturation}
\li Alters the source component colors in the HSL color space.
This effect is similar to the \uicontrol Colorize effect, but
the \uicontrol Hue and \uicontrol Saturation values are handled
differently. This effect always shifts these values, as well as
the \uicontrol Lightness value from the original, instead of
setting them.
\row
\li \inlineimage icons/inner-shadow-16px.png
\li \l {InnerShadow}{Inner Shadow}
\li Generates a colorized and blurred shadow inside the source using
the color that you specify in the \uicontrol {Inner Shadow Color}
field.
The quality of the shadow can be controlled by the values of the
\uicontrol Samples and \uicontrol Radius fields. Ideally, the
sample value should be twice as large as the highest required
radius value. For example, if the radius is animated between
\c 0.0 and \c 4.0, samples should be set to \c 8.
The value of the \uicontrol Spread field specifies how large a part
of the shadow color is strengthened near the source edges.
The effect produces a high quality shadow image, and therefore the
rendering speed of the shadow might not be the highest possible.
The rendering speed is reduced especially if the shadow edges are
heavily softened. For use cases that require faster rendering speed
at the cost of high visual quality, select the \uicontrol Fast
check box.
\row
\li \inlineimage icons/levels-16px.png
\li \l {LevelAdjust}{Level Adjust}
\li Adjusts color levels in the RGBA color space. This effect adjusts
the source item colors separately for each color channel. Source
item contrast can be adjusted and color balance altered.
The value of the \uicontrol Gamma field specifies the change factor
for how the value of each pixel color channel is altered according
to the equation. Setting the gamma values under
\c QtVector3d(1.0, 1.0, 1.0) makes the image darker, whereas the
values above \c QtVector3d(1.0, 1.0, 1.0) lighten it. The value
ranges from \c QtVector3d(0.0, 0.0, 0.0) (darkest) to \c inf
(lightest).
You can specify the maximum and minimum input and output levels for
each color channel. \uicontrol {Maximum input} sets the white-point,
which means that all pixels with a higher value are rendered as
white (per color channel). Decreasing this value lightens the light
areas. To darken the light areas and to increase the contrast,
decrease the value of the \uicontrol {Maximum output} field.
The value of the \uicontrol {Minimum input} field sets the minimum
input level for each color channel. It sets the black-point, which
means that all pixels with a lower value are rendered as black
(per color channel). Increasing this value darkens the dark areas.
To lighten the dark areas and to reduce the contrast, increase the
value of the \uicontrol {Minimum output} field.
\row
\li \inlineimage icons/mask-blur-16px.png
\li \l {MaskedBlur}{Masked Blur}
\li Softens the image by blurring it. The intensity of the blur can be
controlled for each pixel by specifying a \uicontrol {Mask source},
so that some parts of the source are blurred more than others.
The value of the \uicontrol Radius field specifies the distance of
the neighboring pixels that affect the blurring of an individual
pixel.
The value of the \uicontrol Samples field specifies, how many
samples are taken per pixel when blur calculation is done. Larger
samples produce better quality, but are slower to render.
\row
\li \inlineimage icons/opacity-mask-16px.png
\li \l {OpacityMask}{Opacity Mask}
\li Masks the source component with another component specified in the
\uicontrol {Mask source} field. The mask item gets rendered into an
intermediate pixel buffer and the alpha values from the result are
used to determine the visibility of the source item's pixels in the
display.
Select the \uicontrol Invert check box to specify that the
resulting opacity is the source alpha multiplied with the
inverse of the mask alpha: \c {As * (1 - Am)}. When this property
is \c false, the resulting opacity is the source alpha multiplied
with the mask alpha: \c {As * Am}.
\row
\li \inlineimage icons/radial-blur-16px.png
\li \l {RadialBlur}{Radial Blur}
\li Applies a directional blur effect in a circular direction around the
component's center point. This effect makes the source item appear
to be rotating into the direction of the blur. Other available
motionblur effects are \uicontrol {Zoom Blur} and
\uicontrol {Directional Blur}.
The value of the \uicontrol Angle field specifies both the direction
of the blur and the level of blurring. The larger the angle, the
more blurred the result. The quality of the blur depends on the
value or the \uicontrol Samples field. If the angle is large, more
samples are needed to preserve high visual quality.
\row
\li \inlineimage icons/recursive-blur-16px.png
\li \l {RecursiveBlur}{Recursive Blur}
\li Blurs repeatedly, providing a strong blur effect. This effect
softens the image by blurring it with an algorithm that uses a
recursive feedback loop to blur the source as many times as
set in the \uicontrol Loops field.
The value of the \uicontrol Radius field specifies the distance of
the neighboring pixels that affect the blurring of an individual
pixel.
The effect may produce more blurred results than
\uicontrol {Fast Blur} or \uicontrol {Gaussian Blur},
but the result is produced asynchronously and takes more time.
\row
\li \inlineimage icons/threshold-16px.png
\li \l {ThresholdMask}{Threshold Mask}
\li Masks the source item with another item specified by
\uicontrol {Mask source}. The value of the \uicontrol Spread
field determines the smoothness of the mask edges near the
\uicontrol Threshold alpha value. Setting spread to \c 0.0 uses
the mask with the specified threshold. Setting higher spread values
softens the transition from the transparent mask pixels towards
opaque mask pixels by adding interpolated values between them.
\row
\li \inlineimage icons/zoom-blur-16px.png
\li \l {ZoomBlur}{Zoom Blur}
\li Applies a directional blur effect towards source component's
center point. This effect makes the source item appear to be
moving towards the center point in Z-direction or the camera
appear to be zooming rapidly.
The value of the \uicontrol Length field specifies the maximum
perceived amount of movement for each pixel. The amount is smaller
near the center specified by the \uicontrol {Horizontal offset} and
\uicontrol {Vertical offset} fields and reaches the specified value
at the edges.
The quality of the blur depends on the value of the
\uicontrol Samples field. If the length value is large,
more samples are needed to preserve high visual quality.
Other available motion blur effects are
\uicontrol {Directional Blur} and \uicontrol {Radial Blur}.
\endtable
*/

View File

@@ -31,7 +31,8 @@
The Qt Quick Studio Components module provides sets of components and
effects enhanced for creating animated UIs. The components inherit
\l {Qt Quick Shapes QML Types}. The effects inherit the types in the
\l {Qt Graphical Effects} module.
\l {Qt Graphical Effects} module. For more information about the effects,
see \l{2D Effects}.
\section1 Using Studio Components
@@ -46,6 +47,4 @@
\annotatedlist qtquickstudio-components
\include qtdesignstudio-visual-effects.qdocinc qml visual effects
*/

View File

@@ -113,7 +113,7 @@ def is_debug(fpath):
try:
output = subprocess.check_output(['dumpbin', '/imports', fpath])
return coredebug.search(output.decode(encoding)) != None
except FileNotFoundError:
except OSError:
# dumpbin is not there, maybe MinGW ? Just ship all .dlls.
return debug_build
@@ -238,16 +238,10 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
os.makedirs(clanglibdirtarget)
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'libclang.dll'),
os.path.join(install_dir, 'bin')))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clang.exe'),
clangbindirtarget))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clang-cl.exe'),
clangbindirtarget))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clangd.exe'),
clangbindirtarget))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clang-tidy.exe'),
clangbindirtarget))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clazy-standalone.exe'),
clangbindirtarget))
for binary in ['clang', 'clang-cl', 'clangd', 'clang-tidy', 'clazy-standalone']:
binary_filepath = os.path.join(llvm_install_dir, 'bin', 'clang.exe')
if os.path.exists(binary_filepath):
deployinfo.append((binary_filepath, clangbindirtarget))
resourcetarget = os.path.join(clanglibdirtarget, 'clang')
else:
# libclang -> Qt Creator libraries
@@ -260,6 +254,7 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
os.makedirs(clangbinary_targetdir)
for binary in ['clang', 'clangd', 'clang-tidy', 'clazy-standalone']:
binary_filepath = os.path.join(llvm_install_dir, 'bin', binary)
if os.path.exists(binary_filepath):
deployinfo.append((binary_filepath, clangbinary_targetdir))
# add link target if binary is actually a symlink (to a binary in the same directory)
if os.path.islink(binary_filepath):

View File

@@ -571,7 +571,7 @@ class DumperBase():
(ref, alloc, size) = self.split('III', vector_data_ptr)
data = vector_data_ptr + 16
self.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
return data, size, alloc
return data, size
def qArrayData(self, value):
if self.qtVersion() >= 0x60000:
@@ -1722,23 +1722,26 @@ class DumperBase():
addr += 1
return result
def listChildrenGenerator(self, addr, innerType):
base = self.extractPointer(addr)
def listData(self, value, check=True):
if self.qtVersion() >= 0x60000:
dd, data, size = self.split('ppi', value)
return data, size
base = self.extractPointer(value)
(ref, alloc, begin, end) = self.split('IIII', base)
array = base + 16
if self.qtVersion() < 0x50000:
array += self.ptrSize()
size = end - begin
if check:
self.check(begin >= 0 and end >= 0 and end <= 1000 * 1000 * 1000)
size = end - begin
self.check(size >= 0)
stepSize = self.ptrSize()
data = array + begin * stepSize
for i in range(size):
yield self.createValue(data + i * stepSize, innerType)
#yield self.createValue(data + i * stepSize, 'void*')
def vectorChildrenGenerator(self, value, innerType):
data, size, _ = self.vectorData(value)
for i in range(size):
yield self.createValue(data + i * innerType.size(), innerType)
return data, size
def putTypedPointer(self, name, addr, typeName):
""" Prints a typed pointer, expandable if the type can be resolved,
@@ -1798,6 +1801,9 @@ class DumperBase():
metaObjectPtr, handle = value.split('pI')
if metaObjectPtr != 0:
if self.qtVersion() >= 0x060000:
if handle == 0:
self.putEmptyValue()
return
revision = 9
name, alias, flags, keyCount, data = self.split('IIIII', handle)
index = name
@@ -1830,7 +1836,6 @@ class DumperBase():
# handle is what's store in QMetaMethod etc, pass -1 for QObject/QMetaObject
# itself metaObjectPtr needs to point to a valid QMetaObject.
def putQObjectGutsHelper(self, qobject, qobjectPtr, handle, metaObjectPtr, origType):
intSize = 4
ptrSize = self.ptrSize()
def putt(name, value, typeName=' '):
@@ -1871,50 +1876,29 @@ class DumperBase():
if qobjectPtr:
dd = self.extractPointer(qobjectPtr + ptrSize)
if self.qtVersion() >= 0x50000:
(dvtablePtr, qptr, parentPtr, childrenDPtr, flags, postedEvents,
(dvtablePtr, qptr, parent, children, flags, postedEvents,
dynMetaObjectPtr, # Up to here QObjectData.
extraData, threadDataPtr, connectionListsPtr,
sendersPtr, currentSenderPtr) \
= self.split('ppppIIp' + 'ppppp', dd)
= self.split('pp{@QObject*}{@QList<@QObject *>}IIp' + 'ppppp', dd)
else:
(dvtablePtr, qptr, parentPtr, childrenDPtr, flags, postedEvents,
(dvtablePtr, qptr, parent, children, flags, postedEvents,
dynMetaObjectPtr, # Up to here QObjectData
objectName, extraData, threadDataPtr, connectionListsPtr,
sendersPtr, currentSenderPtr) \
= self.split('ppppIIp' + 'pppppp', dd)
= self.split('pp{@QObject*}{@QList<@QObject *>}IIp' + 'pppppp', dd)
if qobjectPtr:
qobjectType = self.createType('@QObject')
with SubItem(self, '[parent]'):
if not self.isCli:
self.putSortGroup(9)
if parentPtr:
self.putItem(self.createValue(parentPtr, qobjectType))
else:
self.putValue('0x0')
self.putType('QObject *')
self.putItem(parent)
with SubItem(self, '[children]'):
if not self.isCli:
self.putSortGroup(8)
base = self.extractPointer(dd + 3 * ptrSize) # It's a QList<QObject *>
begin = self.extractInt(base + 8)
end = self.extractInt(base + 12)
array = base + 16
if self.qtVersion() < 0x50000:
array += ptrSize
self.check(begin >= 0 and end >= 0 and end <= 1000 * 1000 * 1000)
size = end - begin
self.check(size >= 0)
self.putItemCount(size)
if size > 0:
self.putExpandable()
if self.isExpanded():
addrBase = array + begin * ptrSize
with Children(self, size):
for i in self.childRange():
with SubItem(self, i):
childPtr = self.extractPointer(addrBase + i * ptrSize)
self.putItem(self.createValue(childPtr, qobjectType))
dvtablePtr, qptr, parentPtr, children = self.split('ppp{QList<QObject *>}', dd)
self.putItem(children)
if isQMetaObject:
with SubItem(self, '[strings]'):
@@ -2016,6 +2000,9 @@ class DumperBase():
with Children(self):
# Static properties.
for i in range(propertyCount):
if self.qtVersion() >= 0x60000:
t = self.split('IIIII', dataPtr + properties * 4 + 20 * i)
else:
t = self.split('III', dataPtr + properties * 4 + 12 * i)
name = self.metaString(metaObjectPtr, t[0], revision)
if qobject and self.qtPropertyFunc:
@@ -2045,19 +2032,38 @@ class DumperBase():
# Dynamic properties.
if extraData:
def list6Generator(addr, innerType):
data, size = self.listData(addr)
for i in range(size):
yield self.createValue(data + i * innerType.size(), innerType)
def list5Generator(addr, innerType):
data, size = self.listData(addr)
for i in range(size):
yield self.createValue(data + i * ptrSize, innerType)
def vectorGenerator(addr, innerType):
data, size = self.vectorData(addr)
for i in range(size):
yield self.createValue(data + i * innerType.size(), innerType)
byteArrayType = self.createType('@QByteArray')
variantType = self.createType('@QVariant')
if self.qtVersion() >= 0x50600:
values = self.vectorChildrenGenerator(
extraData + 2 * ptrSize, variantType)
if self.qtVersion() >= 0x60000:
values = vectorGenerator(extraData + 3 * ptrSize, variantType)
elif self.qtVersion() >= 0x50600:
values = vectorGenerator(extraData + 2 * ptrSize, variantType)
elif self.qtVersion() >= 0x50000:
values = self.listChildrenGenerator(
extraData + 2 * ptrSize, variantType)
values = list5Generator(extraData + 2 * ptrSize, variantType)
else:
values = self.listChildrenGenerator(
extraData + 2 * ptrSize, variantType.pointer())
names = self.listChildrenGenerator(
extraData + ptrSize, byteArrayType)
values = list5Generator(extraData + 2 * ptrSize,
variantType.pointer())
if self.qtVersion() >= 0x60000:
names = list6Generator(extraData, byteArrayType)
else:
names = list5Generator(extraData + ptrSize, byteArrayType)
for (k, v) in zip(names, values):
with SubItem(self, propertyCount + dynamicPropertyCount):
if not self.isCli:
@@ -2163,7 +2169,7 @@ class DumperBase():
with Children(self):
innerType = connections.type[0]
# Should check: innerType == ns::QObjectPrivate::ConnectionList
data, size, _ = self.vectorData(connections)
data, size = self.vectorData(connections)
connectionType = self.createType('@QObjectPrivate::Connection')
for i in range(size):
first = self.extractPointer(data + i * 2 * ptrSize)
@@ -3853,7 +3859,12 @@ class DumperBase():
def createType(self, typish, size=None):
if isinstance(typish, self.Type):
#typish.check()
if hasattr(typish, 'lbitsize') and typish.lbitsize is not None and typish.lbitsize > 0:
return typish
# Size 0 is sometimes reported by GDB but doesn't help at all.
# Force using the fallback:
typish = typish.name
if isinstance(typish, str):
ns = self.qtNamespace()
typish = typish.replace('@', ns)
@@ -3868,6 +3879,8 @@ class DumperBase():
tdata = self.typeData.get(typish, None)
if tdata is not None:
if tdata.lbitsize is not None:
if tdata.lbitsize > 0:
return self.Type(self, typish)
knownType = self.lookupType(typish)
@@ -3881,9 +3894,13 @@ class DumperBase():
tdata.name = typish
tdata.typeId = typish
tdata.templateArguments = self.listTemplateParameters(typish)
if size is not None:
tdata.lbitsize = 8 * size
if typish.endswith('*'):
tdata.code = TypeCode.Pointer
tdata.lbitsize = 8 * self.ptrSize()
tdata.ltarget = self.createType(typish[:-1].strip())
self.registerType(typish, tdata)
typeobj = self.Type(self, typish)
#DumperBase.warn('CREATE TYPE: %s' % typeobj.stringify())
@@ -3918,27 +3935,6 @@ class DumperBase():
val.ldata = proxy_data
return val
def createContainerItem(self, data, innerTypish, container):
innerType = self.createType(innerTypish)
name = self.qtNamespace() + '%s<%s>' % (container, innerType.name)
typeId = name
tdata = self.TypeData(self)
tdata.typeId = typeId
tdata.name = name
tdata.templateArguments = [innerType]
tdata.lbitsize = 8 * self.ptrSize()
self.registerType(typeId, tdata)
val = self.Value(self)
val.ldata = data
val.type = self.Type(self, typeId)
return val
def createListItem(self, data, innerTypish):
return self.createContainerItem(data, innerTypish, 'QList')
def createVectorItem(self, data, innerTypish):
return self.createContainerItem(data, innerTypish, 'QVector')
class StructBuilder():
def __init__(self, dumper):
self.dumper = dumper

View File

@@ -252,21 +252,26 @@ def qdump__QStandardItem(d, value):
d.createType('@QStandardItemData') # warm up cache
d.createType('@QStandardItem')
d.createType('@QStandardItem*')
vtable, dptr = value.split('pp')
if d.qtVersion() >= 0x060000:
model, parent, values, children, rows, cols, item = \
d.split('pp{@QList<@QStandardItemData>}{@QList<@QStandardItem*>}IIp', dptr)
else:
# There used to be a virtual destructor that got removed in
# 88b6abcebf29b455438 on Apr 18 17:01:22 2017
if d.qtVersion() >= 0x050900 or d.isMsvcTarget():
model, parent, values, children, rows, cols, item = d.split('ppPPIIp', dptr)
else:
vtable1, model, parent, values, children, rows, cols, item = d.split('pppPPIIp', dptr)
if d.qtVersion() < 0x050900 and not d.isMsvcTarget():
dptr += d.ptrSize();
model, parent, values, children, rows, cols, item = \
d.split('pp{@QVector<@QStandardItemData>}{@QVector<@QStandardItem*>}IIp', dptr)
d.putEmptyValue()
d.putExpandable()
if d.isExpanded():
with Children(d):
d.putSubItem('[model]', d.createValue(model, '@QStandardItemModel'))
d.putSubItem('[values]', d.createVectorItem(values, '@QStandardItemData'))
d.putSubItem('[children]', d.createVectorItem(children,
d.createPointerType(value.type)))
d.putSubItem('[values]', values)
d.putSubItem('[children]', children)
def qdump__QDate(d, value):
@@ -651,7 +656,18 @@ def qdump__QFile(d, value):
# 9fc0965 and a373ffcd change the layout of the private structure
qtVersion = d.qtVersion()
is32bit = d.ptrSize() == 4
if qtVersion >= 0x050600 and d.qtTypeInfoVersion() >= 17:
if qtVersion >= 0x060000:
# FIXME: values 0 are wrong. As the file name is the
# only direct member of QFilePrivate, the offsets are
# equal to sizeof(QFileDevicePrivate), the base class.
if d.isWindowsTarget():
if d.isMsvcTarget():
offset = 0 if is32bit else 304
else:
offset = 0 if is32bit else 304
else:
offset = 0 if is32bit else 304
elif qtVersion >= 0x050600 and d.qtTypeInfoVersion() >= 17:
# Some QRingBuffer member got removed in 8f92baf5c9
if d.isWindowsTarget():
if d.isMsvcTarget():
@@ -1047,8 +1063,7 @@ def qform__QList():
def qdump__QList(d, value):
inner_type = value.type.ltarget[0] if value.type.code == TypeCode.Typedef else value.type[0]
return qdumpHelper_QList(d, value, value.type[0])
return qdumpHelper_QList(d, value, d.createType(value.type[0]))
def qdump__QVariantList(d, value):
@@ -1056,25 +1071,16 @@ def qdump__QVariantList(d, value):
def qdumpHelper_QList(d, value, innerType):
if d.qtVersion() >= 0x60000:
dd, data, size = d.split('ppi', value)
data, size = d.listData(value, check=True)
d.putItemCount(size)
if d.qtVersion() >= 0x60000:
d.putPlotData(data, size, innerType)
return
base = d.extractPointer(value)
_, _, begin, end = d.split('IIII', base)
array = base + 16
if d.qtVersion() < 0x50000:
array += d.ptrSize()
d.check(begin >= 0 and end >= 0 and end <= 1000 * 1000 * 1000)
size = end - begin
d.check(size >= 0)
d.putItemCount(size)
if d.isExpanded():
innerSize = innerType.size()
stepSize = d.ptrSize()
addr = array + begin * stepSize
# The exact condition here is:
# QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic
# but this data is available neither in the compiled binary nor
@@ -1089,17 +1095,17 @@ def qdumpHelper_QList(d, value, innerType):
isInternal = innerSize <= stepSize and innerType.isMovableType()
if isInternal:
if innerSize == stepSize:
d.putArrayData(addr, size, innerType)
d.putArrayData(data, size, innerType)
else:
with Children(d, size, childType=innerType):
for i in d.childRange():
p = d.createValue(addr + i * stepSize, innerType)
p = d.createValue(data + i * stepSize, innerType)
d.putSubItem(i, p)
else:
# about 0.5s / 1000 items
with Children(d, size, maxNumChild=2000, childType=innerType):
for i in d.childRange():
p = d.extractPointer(addr + i * stepSize)
p = d.extractPointer(data + i * stepSize)
x = d.createValue(p, innerType)
d.putSubItem(i, x)
@@ -1661,27 +1667,34 @@ def qdump__QStack(d, value):
def qdump__QPolygonF(d, value):
data, size, _ = d.vectorData(value)
data, size = d.vectorData(value)
d.putItemCount(size)
d.putPlotData(data, size, d.createType('@QPointF'))
def qdump__QPolygon(d, value):
data, size, _ = d.vectorData(value)
data, size = d.vectorData(value)
d.putItemCount(size)
d.putPlotData(data, size, d.createType('@QPoint'))
def qdump__QGraphicsPolygonItem(d, value):
(vtbl, dptr) = value.split('pp')
# Assume sizeof(QGraphicsPolygonItemPrivate) == 400
if d.qtVersion() >= 0x060000:
if d.ptrSize() == 8:
offset = 424 # sizeof(QGraphicsPolygonItemPrivate), the base
else:
# Chicken out. Not worth maintaining.
d.putPlainChildren(value)
return
else:
if d.ptrSize() == 8:
offset = 384
elif d.isWindowsTarget():
offset = 328 if d.isMsvcTarget() else 320
else:
offset = 308
data, size, alloc = d.vectorData(dptr + offset)
data, size = d.vectorData(dptr + offset)
d.putItemCount(size)
d.putPlotData(data, size, d.createType('@QPointF'))
@@ -2184,7 +2197,7 @@ def qdumpHelper__QVariant45(d, value):
def qedit__QVector(d, value, data):
values = data.split(',')
d.call('void', value, 'resize', str(len(values)))
base, vsize, valloc = d.vectorData(value)
base, vsize = d.vectorData(value)
d.setValues(base, value.type[0].name, values)
@@ -2194,24 +2207,22 @@ def qform__QVector():
def qdump__QVector(d, value):
if d.qtVersion() >= 0x060000:
dd, data, size = value.split('ppi')
data, size = d.listData(value)
d.putItemCount(size)
d.putPlotData(data, size, value.type.ltarget[0])
d.putPlotData(data, size, d.createType(value.type.ltarget[0]))
# g++ 9.3 does not add the template parameter list to the debug info.
# Fake it for the common case:
if value.type.name == d.qtNamespace() + "QVector":
d.putBetterType(value.type.name + '<' + value.type.ltarget[0].name + '>')
else:
data, size, alloc = d.vectorData(value)
d.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
data, size = d.vectorData(value)
d.putItemCount(size)
d.putPlotData(data, size, value.type[0])
d.putPlotData(data, size, d.createType(value.type[0]))
if False:
def qdump__QObjectConnectionList(d, value):
data, size, alloc = d.vectorData(value)
d.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
data, size = d.vectorData(value)
d.putItemCount(size)
d.putPlotData(data, size, d.createType('@QObjectPrivate::ConnectionList'))
@@ -2756,7 +2767,10 @@ def qdump__QJSValue(d, value):
if d.ptrSize() == 4:
qdump_32__QJSValue(d, value)
else:
qdump_64__QJSValue(d, value)
if d.qtVersion() >= 0x60000:
qdump_64__QJSValue_6(d, value)
else:
qdump_64__QJSValue_5(d, value)
def qdump_32__QJSValue(d, value):
@@ -2782,8 +2796,55 @@ def qdump_32__QJSValue(d, value):
d.putType(' ')
d.putFields(value)
def qdump_64__QJSValue_6(d, value):
dd = value.split('Q')[0]
typ = dd >> 47
def qdump_64__QJSValue(d, value):
if dd == 0:
d.putValue('(undefined)')
d.putType(value.type.name + ' (undefined)')
elif typ == 5:
d.putValue('(null)')
d.putType(value.type.name + ' (null)')
elif typ == 6:
d.putValue('true' if dd & 1 else 'false')
d.putType(value.type.name + ' (bool)')
elif typ == 7:
d.putValue(dd & 0xfffffffff)
d.putType(value.type.name + ' (int)')
elif typ > 7:
val = d.Value(d)
val.ldata = struct.pack('q', dd ^ 0xfffc000000000000)
val.type = d.createType('double')
d.putItem(val)
d.putType(value.type.name + ' (double)')
elif typ <= 3: # Heap
if dd & 1: # String
val = d.Value(d)
val.ldata = struct.pack('q', dd & ~1)
val.type = d.createType('@QString*')
d.putItem(val)
d.putType(value.type.name + ' (QString)')
else:
# FIXME: Arrays, Objects missing.
val = d.split('{@QV4::Managed*}', value)[0]
d.putItem(val)
d.putItemCount(1)
else:
d.putEmptyValue()
d.putItemCount(1)
d.putPlainChildren(value)
return
if d.isExpanded():
with Children(d):
with SubItem(d, '[raw]'):
d.putValue('[0x%x]' % dd)
d.putType(' ')
d.putFields(value)
def qdump_64__QJSValue_5(d, value):
ns = d.qtNamespace()
dd = value.split('Q')[0]
if dd == 0:
@@ -3163,20 +3224,30 @@ def qdump__QJsonValue(d, value):
def qdump__QJsonArray(d, value):
if d.qtVersion() >= 0x050f00:
if d.qtVersion() >= 0x060000:
dptr = d.extractPointer(value)
if not dptr:
d.putItemCount(0)
else:
qdumpHelper_QCbor_array(d, dptr, False)
elif d.qtVersion() >= 0x050f00:
_, container_ptr = value.split('pp')
qdumpHelper_QCbor_array(d, container_ptr, False)
return
else:
qdumpHelper_QJsonArray(d, value['d'].pointer(), value['a'].pointer())
def qdump__QJsonObject(d, value):
if d.qtVersion() >= 0x050f00:
if d.qtVersion() >= 0x060000:
dptr = d.extractPointer(value)
if not dptr:
d.putItemCount(0)
else:
qdumpHelper_QCbor_map(d, dptr, False)
elif d.qtVersion() >= 0x050f00:
_, container_ptr = value.split('pp')
qdumpHelper_QCbor_map(d, container_ptr, False)
return
else:
qdumpHelper_QJsonObject(d, value['d'].pointer(), value['o'].pointer())
@@ -3248,12 +3319,13 @@ def qdump__qfloat16(d, value):
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,
# so be explicit:
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
element_at_n_addr = elements_data_ptr + element_index * 16 # sizeof(QtCbor::Element) == 15
data_pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
elements_pos = data_pos + (3 * d.ptrSize() if d.qtVersion() >= 0x060000 else d.ptrSize())
elements_data_ptr, elements_size = d.vectorData(elements_pos)
element_at_n_addr = elements_data_ptr + element_index * 16 # sizeof(QtCbor::Element) == 16
element_value, _, element_flags = d.split('qII', element_at_n_addr)
enc = 'latin1' if is_bytes or (element_flags & 8) else 'utf16'
bytedata, _, _ = d.qArrayData(pos)
bytedata, _, _ = d.qArrayData(data_pos)
bytedata += element_value
if d.qtVersion() >= 0x060000:
bytedata_len = d.extractInt64(bytedata)
@@ -3284,11 +3356,12 @@ def qdumpHelper_QCbor_array(d, container_ptr, is_cbor):
return
# d.split('i@{@QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
# so be explicit:
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
data_pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
elements_pos = data_pos + (3 * d.ptrSize() if d.qtVersion() >= 0x060000 else d.ptrSize())
elements_data_ptr, elements_size = d.vectorData(elements_pos)
d.putItemCount(elements_size)
if d.isExpanded():
bytedata, _, _ = d.qArrayData(pos)
bytedata, _, _ = d.qArrayData(data_pos)
with Children(d, maxNumChild=1000):
for i in range(elements_size):
d.putSubItem(i, qdumpHelper_QCborArray_valueAt(d, container_ptr, elements_data_ptr, i, bytedata, is_cbor))
@@ -3305,12 +3378,13 @@ def qdumpHelper_QCbor_map(d, container_ptr, is_cbor):
return
# d.split('i@{@QByteArray::size_type}pp', container_ptr) doesn't work with CDB,
# so be explicit:
pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
elements_data_ptr, elements_size, _ = d.vectorData(pos + d.ptrSize())
data_pos = container_ptr + (2 * d.ptrSize() if d.qtVersion() >= 0x060000 else 8)
elements_pos = data_pos + (3 * d.ptrSize() if d.qtVersion() >= 0x060000 else d.ptrSize())
elements_data_ptr, elements_size = d.vectorData(elements_pos)
elements_size = int(elements_size / 2)
d.putItemCount(elements_size)
if d.isExpanded():
bytedata, _, _ = d.qArrayDataHelper(pos)
bytedata, _, _ = d.qArrayDataHelper(data_pos)
with Children(d, maxNumChild=1000):
for i in range(elements_size):
key = qdumpHelper_QCborArray_valueAt(d, container_ptr, elements_data_ptr, 2 * i, bytedata, is_cbor)
@@ -3326,6 +3400,7 @@ def qdump__QCborMap(d, value):
def qdump__QCborValue(d, value):
item_data, container_ptr, item_type = value.split('qpi')
d.putItem(d.createProxyValue((item_data, container_ptr, item_type, True), 'QCborValue_proxy'))
d.putPlainChildren(value)
def qdump__QCborValue_proxy(d, value):
item_data, container_ptr, item_type, is_cbor = value.data()

View File

@@ -2,6 +2,7 @@ QT += core gui widgets qml quick network
QT += core-private qml-private quick-private gui-private
CONFIG += c++17
win32: QMAKE_CXXFLAGS += /std:c++17
DEFINES -= QT_CREATOR

View File

@@ -125,6 +125,7 @@ Column {
Label {
text: qsTr("Horizontal tile mode")
disabledState: !backendValues.horizontalTileMode.isAvailable
}
SecondColumnLayout {
@@ -134,11 +135,13 @@ Column {
implicitWidth: 180
Layout.fillWidth: true
scope: "BorderImage"
enabled: backendValue.isAvailable
}
}
Label {
text: qsTr("Vertical tile mode")
disabledState: !backendValues.verticalTileMode.isAvailable
}
SecondColumnLayout {
@@ -148,37 +151,42 @@ Column {
implicitWidth: 180
Layout.fillWidth: true
scope: "BorderImage"
enabled: backendValue.isAvailable
}
}
Label {
text: qsTr("Source size")
disabledState: !backendValues.sourceSize.isAvailable
}
SecondColumnLayout {
Label {
text: "W"
width: 12
disabledStateSoft: !backendValues.sourceSize_width.isAvailable
}
SpinBox {
backendValue: backendValues.sourceSize_width
minimumValue: -2000
maximumValue: 2000
enabled: backendValue.isAvailable
decimals: 0
}
Label {
text: "H"
width: 12
disabledStateSoft: !backendValues.sourceSize_height.isAvailable
}
SpinBox {
backendValue: backendValues.sourceSize_height
minimumValue: -2000
maximumValue: 2000
enabled: backendValue.isAvailable
decimals: 0
}

View File

@@ -27,7 +27,6 @@ VersionData {
name: "QUL 1.4"
bannedItems: ["QtQuick.AnimatedImage",
"QtQuick.BorderImage",
"QtQuick.FocusScope",
"QtQuick.TextInput",
"QtQuick.TextEdit",
@@ -104,6 +103,12 @@ VersionData {
"sourceSize", "smooth"]
}
QtQuick.BorderImage {
bannedProperties: ["asynchronous", "cache", "currentFrame", "frameCount",
"horizontalTileMode", "mirror", "progress", "smooth", "sourceSize",
"status", "verticalTileMode"]
}
QtQuick.Text {
allowChildren: false
allowedProperties: ["rotation", "scale", "transformOrigin"]

View File

@@ -12,8 +12,8 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
# They need to be set before the find_package(Qt5 ...) call.
# Check https://doc.qt.io/qt/deployment-android.html for more information.
# They need to be set before the find_package(...) calls below.
#if(ANDROID)
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")

View File

@@ -1,6 +1,7 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html
@if '%{QtQuickControlsStyle}' != 'Default'
[Controls]
Style=%{QtQuickControlsStyle}
@@ -21,3 +22,4 @@ Theme=%{QtQuickControlsStyleTheme}
;Foreground=Brown
;Background=Grey
@endif
@endif

View File

@@ -12,8 +12,8 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
# They need to be set before the find_package(Qt5 ...) call.
# Check https://doc.qt.io/qt/deployment-android.html for more information.
# They need to be set before the find_package( ...) calls below.
#if(ANDROID)
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")

View File

@@ -257,6 +257,7 @@ PaletteWindowDisabled=backgroundColorDisabled
PaletteWindowTextDisabled=textDisabled
PaletteBaseDisabled=backgroundColorDisabled
PaletteTextDisabled=textDisabled
PaletteMid=ffa0a0a0
QmlDesigner_BackgroundColor=qmlDesignerButtonColor
QmlDesigner_HighlightColor=ff46a2da

View File

@@ -385,6 +385,7 @@ PaletteWindowDisabled=backgroundColorDisabled
PaletteWindowTextDisabled=textDisabled
PaletteBaseDisabled=backgroundColorDisabled
PaletteTextDisabled=textDisabled
PaletteMid=ffafafaf
[Flags]
ComboBoxDrawTextShadow=false

View File

@@ -275,6 +275,7 @@ PaletteWindowDisabled=backgroundColorDisabled
PaletteWindowTextDisabled=textDisabled
PaletteBaseDisabled=backgroundColorDisabled
PaletteTextDisabled=textDisabled
PaletteMid=ffa0a0a0
[Flags]
ComboBoxDrawTextShadow=false

View File

@@ -1020,8 +1020,7 @@ FilePath AndroidConfig::defaultSdkPath()
// Set default path of SDK as used by Android Studio
if (Utils::HostOsInfo::isMacHost()) {
return Utils::FilePath::fromString(
QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)
+ "/../Android/sdk");
QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Android/sdk");
}
if (Utils::HostOsInfo::isWindowsHost()) {
@@ -1348,7 +1347,11 @@ void AndroidConfigurations::updateAutomaticKitList()
DeviceKitAspect::setDevice(k, device);
QStringList abis = static_cast<const AndroidQtVersion *>(qt)->androidAbis();
Debugger::DebuggerKitAspect::setDebugger(k, findOrRegisterDebugger(tc, abis, QtKitAspect::qtVersion(k)));
k->makeSticky();
k->setSticky(ToolChainKitAspect::id(), true);
k->setSticky(QtSupport::QtKitAspect::id(), true);
k->setSticky(DeviceKitAspect::id(), true);
k->setSticky(DeviceTypeKitAspect::id(), true);
QString versionStr = QLatin1String("Qt %{Qt:Version}");
if (!qt->isAutodetected())
@@ -1451,16 +1454,14 @@ AndroidConfigurations::~AndroidConfigurations() = default;
static Utils::FilePath androidStudioPath()
{
if (Utils::HostOsInfo::isWindowsHost()) {
#if defined(Q_OS_WIN)
const QLatin1String registryKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Android Studio");
const QLatin1String valueName("Path");
#if defined(Q_OS_WIN)
const QSettings settings64(registryKey, QSettings::Registry64Format);
const QSettings settings32(registryKey, QSettings::Registry32Format);
return Utils::FilePath::fromUserInput(
settings64.value(valueName, settings32.value(valueName).toString()).toString());
#endif
}
#endif
return {}; // TODO non-Windows
}

View File

@@ -33,6 +33,7 @@
#include <projectexplorer/buildinfo.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchainmanager.h>
#include <qtsupport/qtkitinformation.h>
@@ -318,7 +319,10 @@ bool CMakeProjectImporter::matchKit(void *directoryData, const Kit *k) const
if (data->qt.qt && QtSupport::QtKitAspect::qtVersionId(k) != data->qt.qt->uniqueId())
return false;
const QList<Id> allLanguages = ToolChainManager::allLanguages();
for (const ToolChainDescription &tcd : data->toolChains) {
if (!Utils::contains(allLanguages, [&tcd](const Id& language) {return language == tcd.language;}))
continue;
ToolChain *tc = ToolChainKitAspect::toolChain(k, tcd.language);
if (!tc || tc->compilerCommand() != tcd.compilerPath)
return false;

View File

@@ -637,7 +637,7 @@ QWidget *ICore::dialogParent()
QWidget *active = QApplication::activeModalWidget();
if (!active)
active = QApplication::activeWindow();
if (!active)
if (!active || (active && active->windowFlags().testFlag(Qt::SplashScreen)))
active = m_mainwindow;
return active;
}

View File

@@ -31,7 +31,6 @@ namespace Internal {
namespace Constants {
const QLatin1String CUSTOMCOMMANDBUILDER_COMMAND("IncrediBuild.BuildConsole.%1.Command");
const QLatin1String CUSTOMCOMMANDBUILDER_ARGS("IncrediBuild.BuildConsole.%1.Arguments");
const QLatin1String CUSTOMCOMMANDBUILDER_ARGSSET("IncrediBuild.BuildConsole.%1.ArgumentsSet");
} // namespace Constants
void CommandBuilder::fromMap(const QVariantMap &map)

View File

@@ -39,6 +39,7 @@ const char KIT_MCUTARGET_SDKVERSION_KEY[] = "McuSupport.McuTargetSdkVersion";
const char KIT_MCUTARGET_KITVERSION_KEY[] = "McuSupport.McuTargetKitVersion";
const char KIT_MCUTARGET_COLORDEPTH_KEY[] = "McuSupport.McuTargetColorDepth";
const char KIT_MCUTARGET_OS_KEY[] = "McuSupport.McuTargetOs";
const char KIT_MCUTARGET_TOOCHAIN_KEY[] = "McuSupport.McuTargetToolchain";
const char SETTINGS_GROUP[] = "McuSupport";
const char SETTINGS_KEY_PACKAGE_PREFIX[] = "Package_";

View File

@@ -65,7 +65,7 @@ using namespace Utils;
namespace McuSupport {
namespace Internal {
static const int KIT_VERSION = 7; // Bumps up whenever details in Kit creation change
static const int KIT_VERSION = 8; // Bumps up whenever details in Kit creation change
static QString packagePathFromSettings(const QString &settingsKey,
QSettings::Scope scope = QSettings::UserScope,
@@ -577,6 +577,7 @@ static void setKitProperties(const QString &kitName, Kit *k, const McuTarget *mc
k->setValue(KIT_MCUTARGET_SDKVERSION_KEY, mcuTarget->qulVersion().toString());
k->setValue(KIT_MCUTARGET_KITVERSION_KEY, KIT_VERSION);
k->setValue(KIT_MCUTARGET_OS_KEY, static_cast<int>(mcuTarget->os()));
k->setValue(KIT_MCUTARGET_TOOCHAIN_KEY, mcuTarget->toolChainPackage()->toolChainName());
k->setAutoDetected(true);
k->makeSticky();
if (mcuTarget->toolChainPackage()->isDesktopToolchain())
@@ -741,6 +742,8 @@ QList<Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTarget)
&& kit->value(KIT_MCUTARGET_COLORDEPTH_KEY) == mcuTarget->colorDepth()
&& kit->value(KIT_MCUTARGET_OS_KEY).toInt()
== static_cast<int>(mcuTarget->os())
&& kit->value(KIT_MCUTARGET_TOOCHAIN_KEY)
== mcuTarget->toolChainPackage()->toolChainName()
));
});
}

View File

@@ -59,7 +59,6 @@ using namespace Utils;
const char BUILD_TARGETS_SUFFIX[] = ".BuildTargets";
const char MAKE_ARGUMENTS_SUFFIX[] = ".MakeArguments";
const char MAKE_COMMAND_SUFFIX[] = ".MakeCommand";
const char CLEAN_SUFFIX[] = ".Clean";
const char OVERRIDE_MAKEFLAGS_SUFFIX[] = ".OverrideMakeflags";
const char JOBCOUNT_SUFFIX[] = ".JobCount";

View File

@@ -3903,7 +3903,7 @@ void ProjectExplorerPlugin::addCustomParser(const CustomParserSettings &settings
void ProjectExplorerPlugin::removeCustomParser(Id id)
{
erase(dd->m_customParsers, [id](const CustomParserSettings &s) {
Utils::erase(dd->m_customParsers, [id](const CustomParserSettings &s) {
return s.id == id;
});
emit m_instance->customParsersChanged();

View File

@@ -272,11 +272,7 @@ QString QbsBuildConfiguration::configurationName() const
QString QbsBuildConfiguration::equivalentCommandLine(const QbsBuildStepData &stepData) const
{
CommandLine commandLine;
const QString qbsInstallDir = QString::fromLocal8Bit(qgetenv("QBS_INSTALL_DIR"));
const QString qbsFilePath = HostOsInfo::withExecutableSuffix(!qbsInstallDir.isEmpty()
? qbsInstallDir + QLatin1String("/bin/qbs")
: QCoreApplication::applicationDirPath() + QLatin1String("/qbs"));
commandLine.addArg(QDir::toNativeSeparators(qbsFilePath));
commandLine.addArg(QDir::toNativeSeparators(QbsSettings::qbsExecutableFilePath().toString()));
commandLine.addArg(stepData.command);
const QString buildDir = buildDirectory().toUserOutput();
commandLine.addArgs({"-d", buildDir});

View File

@@ -786,7 +786,9 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags,
cFlags = cxxFlags = commonFlags;
const auto cxxLanguageVersion = arrayToStringList(getCppProp("cxxLanguageVersion"));
if (cxxLanguageVersion.contains("c++17"))
if (cxxLanguageVersion.contains("c++20"))
cxxFlags << "-std=c++20";
else if (cxxLanguageVersion.contains("c++17"))
cxxFlags << "-std=c++17";
else if (cxxLanguageVersion.contains("c++14"))
cxxFlags << "-std=c++14";
@@ -805,7 +807,11 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags,
cxxFlags << QLatin1String(enableRtti.toBool() ? "-frtti" : "-fno-rtti");
const auto cLanguageVersion = arrayToStringList(getCppProp("cLanguageVersion"));
if (cLanguageVersion.contains("c11"))
if (cLanguageVersion.contains("c18"))
cFlags << "-cstd=c18";
else if (cLanguageVersion.contains("c17"))
cFlags << "-std=c17";
else if (cLanguageVersion.contains("c11"))
cFlags << "-std=c11";
else if (cLanguageVersion.contains("c99"))
cFlags << "-std=c99";

View File

@@ -57,7 +57,7 @@ void BindingModel::resetModel()
QStringList({tr("Item"), tr("Property"), tr("Source Item"), tr("Source Property")}));
if (connectionView()->isAttached()) {
for (const ModelNode modelNode : connectionView()->selectedModelNodes())
for (const ModelNode &modelNode : connectionView()->selectedModelNodes())
addModelNode(modelNode);
}

View File

@@ -49,7 +49,7 @@ namespace {
QStringList propertyNameListToStringList(const QmlDesigner::PropertyNameList &propertyNameList)
{
QStringList stringList;
for (const QmlDesigner::PropertyName propertyName : propertyNameList) {
for (const QmlDesigner::PropertyName &propertyName : propertyNameList) {
stringList << QString::fromUtf8(propertyName);
}
stringList.removeDuplicates();

View File

@@ -134,7 +134,7 @@ void DynamicPropertiesModel::resetModel()
QStringList({tr("Item"), tr("Property"), tr("Property Type"), tr("Property Value")}));
if (connectionView()->isAttached()) {
for (const ModelNode modelNode : connectionView()->selectedModelNodes())
for (const ModelNode &modelNode : connectionView()->selectedModelNodes())
addModelNode(modelNode);
}

View File

@@ -44,6 +44,7 @@ Edit3DCanvas::Edit3DCanvas(Edit3DWidget *parent)
{
setMouseTracking(true);
setAcceptDrops(true);
setFocusPolicy(Qt::ClickFocus);
}
void Edit3DCanvas::updateRenderImage(const QImage &img)

View File

@@ -484,6 +484,8 @@ void ItemLibraryWidget::addImport(const QString &name, const QString &version)
void ItemLibraryWidget::addPossibleImport(const QString &name)
{
QTC_ASSERT(m_model, return);
QmlDesignerPlugin::emitUsageStatistics(Constants::EVENT_IMPORT_ADDED_FLOWTAG
+ name);
const Import import = m_model->highestPossibleImport(name);
try {
QList<Import> addedImports = {Import::createLibraryImport(name, import.version())};

View File

@@ -126,7 +126,7 @@ public:
}
}
void walCheckpointFull()
void walCheckpointFull() override
{
try {
database.walCheckpointFull();

View File

@@ -39,10 +39,13 @@
#include <QPointer>
#include <QRectF>
#include <QTime>
#include <QTimer>
#include <QtGui/qevent.h>
#include <memory>
QT_FORWARD_DECLARE_CLASS(QFileSystemWatcher)
namespace ProjectExplorer {
class Target;
}
@@ -219,6 +222,8 @@ private: // functions
QVariant modelNodePreviewImageDataToVariant(const ModelNodePreviewImageData &imageData);
void updatePreviewImageForNode(const ModelNode &modelNode, const QImage &image);
void updateWatcher(const QString &path);
private:
QHash<QString, ModelNodePreviewImageData> m_imageDataMap;
@@ -236,7 +241,16 @@ private:
// key: fileUrl value: (key: instance qml id, value: related tool states)
QHash<QUrl, QHash<QString, QVariantMap>> m_edit3DToolStates;
std::function<void()> m_crashCallback{[this] { handleCrash(); }};
// We use QFileSystemWatcher directly instead of Utils::FileSystemWatcher as we want
// shader changes to be applied immediately rather than requiring reactivation of
// the creator application.
QFileSystemWatcher *m_fileSystemWatcher;
QTimer m_resetTimer;
QTimer m_updateWatcherTimer;
QSet<QString> m_pendingUpdateDirs;
};
} // namespace ProxyNodeInstanceView

View File

@@ -190,6 +190,7 @@ protected: // functions
private: //variables
ModelNode nodeAtTextCursorPositionHelper(const ModelNode &root, int cursorPosition) const;
void setupCanonicalHashes() const;
void handleLibraryInfoUpdate();
TextModifier *m_textModifier = nullptr;
int transactionLevel = 0;
@@ -210,6 +211,7 @@ private: //variables
std::function<void(bool)> m_setWidgetStatusCallback;
bool m_hasIncompleteTypeInformation = false;
bool m_restoringAuxData = false;
bool m_modelAttachPending = false;
mutable QHash<int, ModelNode> m_canonicalIntModelNode;
mutable QHash<ModelNode, int> m_canonicalModelNodeInt;

View File

@@ -100,6 +100,7 @@
#include <QTimerEvent>
#include <QPicture>
#include <QPainter>
#include <QDirIterator>
enum {
debug = false
@@ -135,8 +136,44 @@ NodeInstanceView::NodeInstanceView(ConnectionManagerInterface &connectionManager
: m_connectionManager(connectionManager)
, m_baseStatePreviewImage(QSize(100, 100), QImage::Format_ARGB32)
, m_restartProcessTimerId(0)
, m_fileSystemWatcher(new QFileSystemWatcher(this))
{
m_baseStatePreviewImage.fill(0xFFFFFF);
// Interval > 0 is used for QFileSystemWatcher related timers to allow all notifications
// related to a single event to be received before we act.
m_resetTimer.setSingleShot(true);
m_resetTimer.setInterval(100);
QObject::connect(&m_resetTimer, &QTimer::timeout, [this] {
resetPuppet();
});
m_updateWatcherTimer.setSingleShot(true);
m_updateWatcherTimer.setInterval(100);
QObject::connect(&m_updateWatcherTimer, &QTimer::timeout, [this] {
for (const auto &path : qAsConst(m_pendingUpdateDirs))
updateWatcher(path);
m_pendingUpdateDirs.clear();
});
connect(m_fileSystemWatcher, &QFileSystemWatcher::directoryChanged,
[this](const QString &path) {
const QSet<QString> pendingDirs = m_pendingUpdateDirs;
for (const auto &pendingPath : pendingDirs) {
if (path.startsWith(pendingPath)) {
// no need to add path, already handled by a pending parent path
return;
} else if (pendingPath.startsWith(path)) {
// Parent path to a pending path added, remove the pending path
m_pendingUpdateDirs.remove(pendingPath);
}
}
m_pendingUpdateDirs.insert(path);
m_updateWatcherTimer.start();
});
connect(m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, [this] {
m_resetTimer.start();
});
}
@@ -210,6 +247,8 @@ void NodeInstanceView::modelAttached(Model *model)
NodeInstance newStateInstance = instanceForModelNode(stateNode);
activateState(newStateInstance);
}
updateWatcher({});
}
void NodeInstanceView::modelAboutToBeDetached(Model * model)
@@ -227,6 +266,11 @@ void NodeInstanceView::modelAboutToBeDetached(Model * model)
m_activeStateInstance = NodeInstance();
m_rootNodeInstance = NodeInstance();
AbstractView::modelAboutToBeDetached(model);
m_resetTimer.stop();
m_updateWatcherTimer.stop();
m_pendingUpdateDirs.clear();
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->directories());
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->files());
}
void NodeInstanceView::handleCrash()
@@ -378,6 +422,7 @@ void NodeInstanceView::resetVerticalAnchors(const ModelNode &modelNode)
void NodeInstanceView::propertiesAboutToBeRemoved(const QList<AbstractProperty>& propertyList)
{
QTC_ASSERT(m_nodeInstanceServer, return);
QList<ModelNode> nodeList;
QList<AbstractProperty> nonNodePropertyList;
@@ -449,6 +494,7 @@ void NodeInstanceView::nodeTypeChanged(const ModelNode &, const TypeName &, int,
void NodeInstanceView::bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags /*propertyChange*/)
{
QTC_ASSERT(m_nodeInstanceServer, return);
m_nodeInstanceServer->changePropertyBindings(createChangeBindingCommand(propertyList));
}
@@ -463,6 +509,7 @@ void NodeInstanceView::bindingPropertiesChanged(const QList<BindingProperty>& pr
void NodeInstanceView::variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags /*propertyChange*/)
{
QTC_ASSERT(m_nodeInstanceServer, return);
updatePosition(propertyList);
m_nodeInstanceServer->changePropertyValues(createChangeValueCommand(propertyList));
}
@@ -478,6 +525,7 @@ void NodeInstanceView::variantPropertiesChanged(const QList<VariantProperty>& pr
void NodeInstanceView::nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags /*propertyChange*/)
{
QTC_ASSERT(m_nodeInstanceServer, return);
if (!isSkippedNode(node)) {
updateChildren(newPropertyParent);
m_nodeInstanceServer->reparentInstances(
@@ -487,11 +535,14 @@ void NodeInstanceView::nodeReparented(const ModelNode &node, const NodeAbstractP
void NodeInstanceView::fileUrlChanged(const QUrl &/*oldUrl*/, const QUrl &newUrl)
{
QTC_ASSERT(m_nodeInstanceServer, return);
m_nodeInstanceServer->changeFileUrl(createChangeFileUrlCommand(newUrl));
}
void NodeInstanceView::nodeIdChanged(const ModelNode& node, const QString& /*newId*/, const QString &oldId)
{
QTC_ASSERT(m_nodeInstanceServer, return);
if (hasInstanceForModelNode(node)) {
NodeInstance instance = instanceForModelNode(node);
m_nodeInstanceServer->changeIds(createChangeIdsCommand({instance}));
@@ -502,6 +553,7 @@ void NodeInstanceView::nodeIdChanged(const ModelNode& node, const QString& /*new
void NodeInstanceView::nodeOrderChanged(const NodeListProperty & listProperty,
const ModelNode & /*movedNode*/, int /*oldIndex*/)
{
QTC_ASSERT(m_nodeInstanceServer, return);
QVector<ReparentContainer> containerList;
PropertyName propertyName = listProperty.name();
qint32 containerInstanceId = -1;
@@ -530,6 +582,7 @@ void NodeInstanceView::auxiliaryDataChanged(const ModelNode &node,
const PropertyName &name,
const QVariant &value)
{
QTC_ASSERT(m_nodeInstanceServer, return);
if (((node.isRootNode() && (name == "width" || name == "height")) || name == "invisible" || name == "locked")
|| name.endsWith(PropertyName("@NodeInstance"))) {
if (hasInstanceForModelNode(node)) {
@@ -566,6 +619,7 @@ void NodeInstanceView::customNotification(const AbstractView *view, const QStrin
void NodeInstanceView::nodeSourceChanged(const ModelNode &node, const QString & newNodeSource)
{
QTC_ASSERT(m_nodeInstanceServer, return);
if (hasInstanceForModelNode(node)) {
NodeInstance instance = instanceForModelNode(node);
ChangeNodeSourceCommand changeNodeSourceCommand(instance.instanceId(), newNodeSource);
@@ -1704,4 +1758,61 @@ void NodeInstanceView::updatePreviewImageForNode(const ModelNode &modelNode, con
emitModelNodelPreviewPixmapChanged(modelNode, pixmap);
}
void NodeInstanceView::updateWatcher(const QString &path)
{
QString rootPath;
QStringList oldFiles;
QStringList oldDirs;
QStringList newFiles;
QStringList newDirs;
if (path.isEmpty()) {
// Do full update
rootPath = QFileInfo(model()->fileUrl().toLocalFile()).absolutePath();
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->directories());
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->files());
} else {
rootPath = path;
const QStringList files = m_fileSystemWatcher->files();
const QStringList dirs = m_fileSystemWatcher->directories();
for (const auto &file : files) {
if (file.startsWith(path))
oldFiles.append(file);
}
for (const auto &dir : dirs) {
if (dir.startsWith(path))
oldDirs.append(dir);
}
}
newDirs.append(rootPath);
QDirIterator dirIterator(rootPath, {}, QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
while (dirIterator.hasNext())
newDirs.append(dirIterator.next());
// Common shader suffixes
static const QStringList filterList {"*.frag", "*.vert",
"*.glsl", "*.glslv", "*.glslf",
"*.vsh","*.fsh"};
QDirIterator fileIterator(rootPath, filterList, QDir::Files, QDirIterator::Subdirectories);
while (fileIterator.hasNext())
newFiles.append(fileIterator.next());
if (oldDirs != newDirs) {
if (!oldDirs.isEmpty())
m_fileSystemWatcher->removePaths(oldDirs);
if (!newDirs.isEmpty())
m_fileSystemWatcher->addPaths(newDirs);
}
if (newFiles != oldFiles) {
if (!oldFiles.isEmpty())
m_fileSystemWatcher->removePaths(oldFiles);
if (!newFiles.isEmpty())
m_fileSystemWatcher->addPaths(newFiles);
}
}
}

View File

@@ -837,7 +837,7 @@ ModelNode QmlFlowItemNode::decisionNodeForTransition(const ModelNode &transition
}
QmlFlowViewNode flowView(transition.view()->rootModelNode());
if (flowView.isValid()) {
for (const ModelNode target : flowView.decicions()) {
for (const ModelNode &target : flowView.decicions()) {
if (target.hasBindingProperty("targets")
&& target.bindingProperty("targets").resolveToModelNodeList().contains(transition))
return target;
@@ -853,7 +853,7 @@ ModelNode QmlFlowTargetNode::findSourceForDecisionNode() const
if (!isFlowDecision())
return {};
for (const ModelNode transition : flowView().transitionsForTarget(modelNode())) {
for (const ModelNode &transition : flowView().transitionsForTarget(modelNode())) {
if (transition.hasBindingProperty("from")) {
const ModelNode source = transition.bindingProperty("from").resolveToModelNode();
if (source.isValid()) {

View File

@@ -64,6 +64,19 @@ namespace QmlDesigner {
const char annotationsEscapeSequence[] = "##^##";
bool debugQmlPuppet()
{
#ifndef QMLDESIGNER_TEST
if (!QmlDesignerPlugin::instance())
return false;
const QString debugPuppet = QmlDesignerPlugin::instance()->settings().value(DesignerSettingsKey::
DEBUG_PUPPET).toString();
return !debugPuppet.isEmpty();
#else
return false;
#endif
}
RewriterView::RewriterView(DifferenceHandling differenceHandling, QObject *parent):
AbstractView(parent),
m_differenceHandling(differenceHandling),
@@ -72,7 +85,12 @@ RewriterView::RewriterView(DifferenceHandling differenceHandling, QObject *paren
m_textToModelMerger(new Internal::TextToModelMerger(this))
{
m_amendTimer.setSingleShot(true);
m_amendTimer.setInterval(400);
connect(&m_amendTimer, &QTimer::timeout, this, &RewriterView::amendQmlText);
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
connect(modelManager, &QmlJS::ModelManagerInterface::libraryInfoUpdated,
this, &RewriterView::handleLibraryInfoUpdate, Qt::QueuedConnection);
}
RewriterView::~RewriterView() = default;
@@ -89,6 +107,8 @@ Internal::TextToModelMerger *RewriterView::textToModelMerger() const
void RewriterView::modelAttached(Model *model)
{
m_modelAttachPending = false;
if (model && model->textModifier())
setTextModifier(model->textModifier());
@@ -102,10 +122,12 @@ void RewriterView::modelAttached(Model *model)
if (!(m_errors.isEmpty() && m_warnings.isEmpty()))
notifyErrorsAndWarnings(m_errors);
if (hasIncompleteTypeInformation())
if (hasIncompleteTypeInformation()) {
m_modelAttachPending = true;
QTimer::singleShot(1000, this, [this, model](){
modelAttached(model);
});
}
}
void RewriterView::modelAboutToBeDetached(Model * /*model*/)
@@ -803,6 +825,13 @@ void RewriterView::setupCanonicalHashes() const
}
}
void RewriterView::handleLibraryInfoUpdate()
{
// Trigger dummy amend to reload document when library info changes
if (isAttached() && !m_modelAttachPending && !debugQmlPuppet())
m_amendTimer.start();
}
ModelNode RewriterView::nodeAtTextCursorPosition(int cursorPosition) const
{
return nodeAtTextCursorPositionHelper(rootModelNode(), cursorPosition);
@@ -1005,7 +1034,7 @@ void RewriterView::qmlTextChanged()
auto &viewManager = QmlDesignerPlugin::instance()->viewManager();
if (viewManager.usesRewriterView(this)) {
QmlDesignerPlugin::instance()->viewManager().disableWidgets();
m_amendTimer.start(400);
m_amendTimer.start();
}
#else
/*Keep test synchronous*/

View File

@@ -1672,7 +1672,7 @@ void ModelValidator::signalHandlerSourceDiffer(SignalHandlerProperty &modelPrope
{
Q_UNUSED(modelProperty)
Q_UNUSED(javascript)
QTC_ASSERT(modelProperty.source() == javascript, return);
QTC_ASSERT(compareJavaScriptExpression(modelProperty.source(), javascript), return);
}
void ModelValidator::shouldBeSignalHandlerProperty(AbstractProperty &modelProperty, const QString & /*javascript*/)

View File

@@ -86,6 +86,7 @@ const char EVENT_ANNOTATION_ADDED[] = "Annotation Added";
const char EVENT_RESOURCE_IMPORTED[] = "Resource Imported ";
const char EVENT_ACTION_EXECUTED[] = "Action Executed ";
const char EVENT_IMPORT_ADDED[] = "Import Added ";
const char EVENT_IMPORT_ADDED_FLOWTAG[] = "Import Added FlowTag ";
const char EVENT_BINDINGEDITOR_OPENED[] = "Binding Editor Opened";
const char EVENT_RICHTEXT_OPENED[] = "Richtext Editor Opened";
const char EVENT_FORMEDITOR_TIME[] = "Form Editor";

View File

@@ -34,16 +34,6 @@
using namespace ProjectExplorer;
using namespace QtSupport;
static QString format(const QString &fileName, int lineNo, const QString &msg)
{
if (lineNo > 0)
return QString::fromLatin1("%1(%2): %3").arg(fileName, QString::number(lineNo), msg);
else if (lineNo)
return QString::fromLatin1("%1: %3").arg(fileName, msg);
else
return msg;
}
ProMessageHandler::ProMessageHandler(bool verbose, bool exact)
: m_verbose(verbose)
, m_exact(exact)

View File

@@ -90,7 +90,7 @@ void RsyncDeployService::doDeploy()
void RsyncDeployService::filterDeployableFiles() const
{
if (m_ignoreMissingFiles) {
erase(m_deployableFiles, [](const DeployableFile &f) {
Utils::erase(m_deployableFiles, [](const DeployableFile &f) {
return !f.localFilePath().exists();
});
}

View File

@@ -345,7 +345,7 @@ WelcomeMode::WelcomeMode()
setPriority(Core::Constants::P_MODE_WELCOME);
setId(Core::Constants::MODE_WELCOME);
setContextHelp("Qt Creator Manual");
setContextHelp("Qt Design Studio Manual");
setContext(Core::Context(Core::Constants::C_WELCOME_MODE));
m_modeWidget = new QQuickWidget;

View File

@@ -40,9 +40,11 @@ endif()
set(UtilsSourcesDir "../../libs/utils")
file(RELATIVE_PATH DATA_PATH "/${IDE_LIBEXEC_PATH}" "/${IDE_DATA_PATH}")
add_qtc_executable(sdktool
${DESTINATION}
DEFINES DATA_PATH=\"${IDE_DATA_PATH}\"
DEFINES DATA_PATH=\"${DATA_PATH}\"
DEPENDS Qt5::Core
INCLUDES
"${UtilsSourcesDir}/../"

View File

@@ -79,6 +79,14 @@ void printHelp(const std::vector<std::unique_ptr<Operation>> &operations)
std::cout << " --help|-h Print this help text" << std::endl;
std::cout << " --sdkpath=PATH|-s PATH Set the path to the SDK files" << std::endl << std::endl;
std::cout << "Default sdkpath is \""
<< qPrintable(QDir::cleanPath(
Utils::FilePath::fromString(QCoreApplication::applicationDirPath())
.pathAppended(DATA_PATH)
.toUserOutput()))
<< "\"" << std::endl
<< std::endl;
std::cout << "OPERATION:" << std::endl;
std::cout << " One of:" << std::endl;
for (const std::unique_ptr<Operation> &o : operations)

View File

@@ -3101,6 +3101,7 @@ void tst_Dumpers::dumper_data()
+ Check5("mm", "destroyed", "@QMetaMethod")
+ Check4("mm", "destroyed(QObject*)", "@QMetaMethod")
+ Check("mm.handle", "14", TypeDef("unsigned int", "uint"))
% QtVersion(0, 0x5ffff) // Gone in Qt 6
+ Check("mp", "objectName", "@QMetaProperty");
@@ -6635,7 +6636,7 @@ void tst_Dumpers::dumper_data()
"boost::shared_ptr<int> s;\n"
"boost::shared_ptr<int> i(new int(43));\n"
"boost::shared_ptr<int> j = i;\n"
"boost::shared_ptr<QStringList> sl(new QStringList(QStringList() << \"HUH!\"));",
"boost::shared_ptr<QList<QString>> sl(new QList<QString>(QList<QString>() << \"HUH!\"));",
"&s, &i, &j, &sl")
@@ -6645,7 +6646,7 @@ void tst_Dumpers::dumper_data()
+ Check("s", "(null)", "boost::shared_ptr<int>")
+ Check("i", "43", "boost::shared_ptr<int>")
+ Check("j", "43", "boost::shared_ptr<int>")
+ Check("sl", "<1 items>", " boost::shared_ptr<@QStringList>")
+ Check("sl", "<1 items>", " boost::shared_ptr<@QList<@QString>>")
+ Check("sl.0", "[0]", "\"HUH!\"", "@QString");
@@ -6886,13 +6887,13 @@ void tst_Dumpers::dumper_data()
<< Data("#include <QMap>\n"
"struct CustomStruct {\n"
" int id;\n"
" double dvalue;\n"
" double dval;\n"
"};",
"QMap<int, CustomStruct> map;\n"
"CustomStruct cs1;\n"
"cs1.id = 1;\n"
"cs1.dvalue = 3.14;\n"
"cs1.dval = 3.14;\n"
"CustomStruct cs2 = cs1;\n"
"cs2.id = -1;\n"
"map.insert(cs1.id, cs1);\n"
@@ -6904,10 +6905,11 @@ void tst_Dumpers::dumper_data()
+ CoreProfile()
+ Check("map", "<2 items>", "@QMap<int, CustomStruct>")
+ Check("map.0.key", "-1", "int")
+ CheckType("map.0.value", "CustomStruct")
+ Check("map.0.value.dvalue", FloatValue("3.14"), "double")
+ Check("map.0.value.id", "-1", "int");
+ CheckPairish("map.0.key", "-1", "int")
+ CheckType("map.0.value", "CustomStruct") % Qt5
+ CheckType("map.0.second", "CustomStruct") % Qt6
+ CheckPairish("map.0.value.dval", FloatValue("3.14"), "double")
+ CheckPairish("map.0.value.id", "-1", "int");
#if 0
@@ -7597,7 +7599,7 @@ void tst_Dumpers::dumper_data()
const QtVersion jsonv1{0, 0x50f00};
const QtVersion jsonv2{0x50f00};
const QtVersion jsonv2{0x50f00, 0x60000};
QTest::newRow("QJson")
<< Data("#include <QString>\n"
@@ -7740,6 +7742,7 @@ void tst_Dumpers::dumper_data()
"v18.setProperty(\"PropA\", 1);\n"
"v18.setProperty(\"PropB\", 2.5);\n"
"v18.setProperty(\"PropC\", v10);\n\n"
"#if QT_VERSION < 0x60000\n"
"QV4::Value s11, *p11 = QJSValuePrivate::valueForData(&v11, &s11);\n"
"QV4::Value s12, *p12 = QJSValuePrivate::valueForData(&v12, &s12);\n"
"QV4::Value s13, *p13 = QJSValuePrivate::valueForData(&v13, &s13);\n"
@@ -7747,10 +7750,11 @@ void tst_Dumpers::dumper_data()
"QV4::Value s15, *p15 = QJSValuePrivate::valueForData(&v15, &s15);\n"
"QV4::Value s16, *p16 = QJSValuePrivate::valueForData(&v16, &s16);\n"
"QV4::Value s17, *p17 = QJSValuePrivate::valueForData(&v17, &s17);\n"
"QV4::Value s18, *p18 = QJSValuePrivate::valueForData(&v18, &s18);\n",
"QV4::Value s18, *p18 = QJSValuePrivate::valueForData(&v18, &s18);\n"
"unused(&p11, &p12, &p13, &p14, &p15, &p16, &p17, &p18);\n"
"#endif\n",
"&v10, &v11, &v12, &v13, &v14, &v15, &v16, &v17, &v18, "
"&p11, &p12, &p13, &p14, &p15, &p16, &p17, &p18")
"&v10, &v11, &v12, &v13, &v14, &v15, &v16, &v17, &v18")
+ QmlPrivateProfile()
+ QtVersion(0x50000)
@@ -8008,7 +8012,7 @@ void tst_Dumpers::dumper_data()
+ CorePrivateProfile()
+ QmlPrivateProfile()
+ QtVersion(0x50800)
+ QtVersion(0x50800, 0x5ffff) // Both test cases are gone in Qt6
+ Check("d.Log10_2_100000", "30103", "int")
+ Check("p.FlagBit", "<optimized out>", "") % NoCdbEngine