diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 8030f17d665..4ba26250a3f 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -128,13 +128,14 @@ function(add_qtc_library name) EXTRA_TRANSLATIONS ${_arg_EXTRA_TRANSLATIONS} ) - file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + get_filename_component(public_build_interface_dir "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE) + file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(${name} PRIVATE "$" PUBLIC - "$" - "$" + "$" + "$" ) set(skip_translation OFF) @@ -378,15 +379,16 @@ function(add_qtc_plugin target_name) EXTRA_TRANSLATIONS ${_arg_EXTRA_TRANSLATIONS} ) - file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + get_filename_component(public_build_interface_dir "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE) + file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(${target_name} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}/src" "$" PUBLIC - "$" - "$" + "$" + "$" ) set(plugin_dir "${IDE_PLUGIN_PATH}") diff --git a/dist/changes-4.13.0.md b/dist/changes-4.13.0.md index 54641e2b4f6..4ca1fcbe21f 100644 --- a/dist/changes-4.13.0.md +++ b/dist/changes-4.13.0.md @@ -53,6 +53,8 @@ Editing * Fixed that find usages was finding function arguments when searching functions (QTCREATORBUG-2176) * Fixed crash in lexer (QTCREATORBUG-19525) * Fixed handling of incomplete macro invocations (QTCREATORBUG-23881) +* Fixed update of function signature tooltip (QTCREATORBUG-24449) +* Fixed that built-in macros were ignored for custom toolchains (QTCREATORBUG-24367) ### Language Client @@ -60,6 +62,7 @@ Editing * Added highlighting of code range for diagnostics * Added tooltips for diagnostics * Fixed various issues with completion, outline, files with spaces, and synchronization +* Fixed handling of workspace folders (QTCREATORBUG-24452) ### QML @@ -90,6 +93,10 @@ Editing * Added option to sort file list +### Widget Designer + +* Fixed that designed widgets were dark in dark theme (QTCREATORBUG-23981) + Projects -------- @@ -222,6 +229,7 @@ Federico Guerinoni Friedemann Kleint Henning Gruendl Ivan Komissarov +Jacek Nijaki Jaroslaw Kobus Jochen Becher Jochen Seemann @@ -229,8 +237,10 @@ Johanna Vanhatapio Joni Poikelin Junker, Gregory Knud Dollereder +Kwanghyo Park Lars Knoll Leena Miettinen +Lukasz Ornatek Mahmoud Badri Marco Bubke Michael BrĂ¼ning diff --git a/doc/qtcreator/images/icons/detach-group-icon.png b/doc/qtcreator/images/icons/detach-group-icon.png index 7a3bea690c2..82fc8ddad69 100644 Binary files a/doc/qtcreator/images/icons/detach-group-icon.png and b/doc/qtcreator/images/icons/detach-group-icon.png differ diff --git a/doc/qtcreator/images/qmldesigner-dynamicprops.png b/doc/qtcreator/images/qmldesigner-dynamicprops.png index ae2125481ad..82cd304888b 100644 Binary files a/doc/qtcreator/images/qmldesigner-dynamicprops.png and b/doc/qtcreator/images/qmldesigner-dynamicprops.png differ diff --git a/doc/qtcreator/images/qtcreator-cdb-options.png b/doc/qtcreator/images/qtcreator-cdb-options.png new file mode 100644 index 00000000000..2e8211452b1 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-cdb-options.png differ diff --git a/doc/qtcreator/images/qtcreator-workspace-attaching-views.png b/doc/qtcreator/images/qtcreator-workspace-attaching-views.png index e1eeae51a79..d20d406c6c6 100644 Binary files a/doc/qtcreator/images/qtcreator-workspace-attaching-views.png and b/doc/qtcreator/images/qtcreator-workspace-attaching-views.png differ diff --git a/doc/qtcreator/images/qtcreator-workspace-manager.png b/doc/qtcreator/images/qtcreator-workspace-manager.png index 603b16f9180..b12a6ac1a08 100644 Binary files a/doc/qtcreator/images/qtcreator-workspace-manager.png and b/doc/qtcreator/images/qtcreator-workspace-manager.png differ diff --git a/doc/qtcreator/images/qtcreator-workspace-new.png b/doc/qtcreator/images/qtcreator-workspace-new.png new file mode 100644 index 00000000000..501b44609be Binary files /dev/null and b/doc/qtcreator/images/qtcreator-workspace-new.png differ diff --git a/doc/qtcreator/images/qtquick-custom-properties.png b/doc/qtcreator/images/qtquick-custom-properties.png new file mode 100644 index 00000000000..9964bb6317f Binary files /dev/null and b/doc/qtcreator/images/qtquick-custom-properties.png differ diff --git a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc index 3382cfa1d63..663e6d576e0 100644 --- a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc +++ b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc @@ -30,26 +30,52 @@ \title Connecting Bare Metal Devices - You can connect bare metal devices to a development host to run and debug + You can configure build and run kits to use Bare Metal tool chains installed + on the development host to build applications for Bare Metal devices. You + can connect the devices to the development host to run and debug applications on them from \QC using GDB or a hardware debugger. This enables you to debug on small devices that are not supported by the generic remote - Linux device plugin. However, if the device does not have Qt libraries, you - need a fake Qt installation. + Linux device plugin. + + \note If you use qmake to build the project and the device does not have + Qt libraries, you need a fake Qt installation. + + The following tool chains are supported for building applications: + + \list + \li GCC: Microchip Technology (AVR, AVR32, PIC16, PIC32), + NXP Semiconductors (ColdFire, M68K), Texas Instruments (MSP430), + National Semiconductor (CR16C), Renesas Electronics (M32R, M32C, + RL78, RX, SuperH, V850), Tensilica XTENSA (ESP8266, ESP32), RISC-V, + Arm + \li \l{https://www.iar.com/iar-embedded-workbench/}{IAR EW}: + Microchip Technology (AVR, AVR32), NXP Semiconductors + (ColdFire, M68K), Texas Instruments (MSP430), + National Semiconductor (CR16C), Renesas Electronics (78K, + M16/R8C, M32C, R32C, RH850, RL78, RX, SuperH, V850), + STMicroelectronics (STM8), 8051, RISC-V, Arm + \li \l{https://www.keil.com/product/}{Keil}: Arm, C51 (8051), + C251 (80251), C166 (C16x, XC16x) + \li \l{http://sdcc.sourceforge.net/}{SDCC}: STMicroelectronics (STM8), + 8051 + \endlist The bare metal device type accepts custom GDB commands that you specify in the device options. You can specify the commands to execute when connecting using a particular debug server provider. - The following debug server providers are supported: + The following debug server providers are supported when using GDB: \list \li \l EBlink \li \l J-Link \li \l OpenOCD - \li \l ST-LINK - \li \l {uVision IDE} + \li \l ST-Link \endlist + ST-Link and J-Link debug server providers can be used together with + the \l {uVision IDE}. + \section1 Enabling the Bare Metal Device Plugin To enable the Bare Metal Device plugin: @@ -200,7 +226,11 @@ \l{http://www.keil.com/support/man/docs/uv4/uv4_overview.htm}{uVision} is an IDE for developing applications for embedded devices. Applications can be debugged by using uVision Simulator or directly on hardware by using - St-Link. + St-Link and J-Link. + + You can view the current state of peripheral registers in the + \uicontrol {Peripheral Registers} view in Debug mode. The view + is hidden by default. \section3 uVision Simulator diff --git a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc b/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc index e5366aa9681..65e3bd226e8 100644 --- a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc +++ b/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc @@ -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 Creator documentation. @@ -61,7 +61,7 @@ Breakpoints come in two varieties: \c unclaimed and \c claimed. An unclaimed breakpoint represents a task to interrupt the debugged - program and passes the control to you later. I has two states: + program and passes the control to you later. It has two states: \c pending and \c implanted. Unclaimed breakpoints are stored as a part of a session and exist @@ -145,6 +145,35 @@ \endlist + \section2 Specifying Breakpoint Settings + + You can specify settings for breakpoints in \uicontrol Tools > + \uicontrol Options > \uicontrol Debugger. For more information, + see \l{Specifying Debugger Settings}. + + To use a full absolute path in breakpoints, select the + \uicontrol {Set breakpoints using a full absolute path} check box. + + GDB and CDB enable setting breakpoints on source lines for which no code + was generated. In such situations, the breakpoint is shifted to the next + source code line for which the code was actually generated. To reflect + such temporary changes by moving the breakpoint markers in the source code + editor, select \uicontrol GDB > \uicontrol {Adjust breakpoint locations} + or \uicontrol CDB > \uicontrol {Correct breakpoint location}. + + When using CDB as backend, you can specify that the debugger should break on + specific events, such as C++ exceptions, thread creation or exit, loading or + unloading \l{Viewing Modules}{application modules}, or particular output. + Select the appropriate check boxes in the \uicontrol CDB > + \uicontrol {Break on} group. To disable first-chance break on access + violation exceptions, select the \uicontrol {Ignore first chance access + violations} check box. The second occurrence of an access violation will + break into the debugger. + + You can automatically add breakpoints on some functions to catch error + and warning messages. For more information, see \l{Specifying CDB Settings} + and \l{Specifying Extended GDB Settings}. + For more information on breakpoints, see \l{http://sourceware.org/gdb/onlinedocs/gdb/Breakpoints.html#Breakpoints} {Breakpoints, Watchpoints, and Catchpoints} in GDB documentation. diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc index 04b5d70f5d8..75e9c31873f 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc @@ -325,6 +325,53 @@ To keep debugging all children after a fork, select the \uicontrol {Debug all child processes} check box. + \section2 Specifying CDB Settings + + To specify settings for managing the CDB process, select \uicontrol Tools > + \uicontrol Options > \uicontrol Debugger > \uicontrol CDB. + + \image qtcreator-cdb-options.png "CDB options" + + You can specify additional arguments for starting CDB in the + \uicontrol {Additional arguments} field. + + If a console application does not start up properly in the configured + console and the subsequent attach fails, you can diagnose the issue by + using CDB's native console. Select the \uicontrol {Use CDB console} + check box to override the console set in the Windows system + environment variables. Note that the native console does not + prompt on application exit. + + To automatically add a breakpoint on the \c CrtCbgReport() function, + select the \uicontrol {Stop when CrtCbgReport() is called} check box. + This catches runtime error messages caused by \c assert(), for example. + + In the \uicontrol {Break on} group, specify whether the debugger should + break on C++ exceptions, on thread creation or exit, on loading or + unloading the specified \l{Viewing Modules}{application modules}, or on + the specified output. + + To disable first-chance break on access violation exceptions, select the + \uicontrol {Ignore first chance access violations} check box. + The second occurrence of an access violation will break into the debugger. + + CDB enables setting breakpoints in comments or on source lines for which + no code was generated. In such situations, the breakpoint is shifted to + the next source code line for which the code was actually generated. To + reflect such temporary changes by moving the breakpoint markers in the + source code editor, select the \uicontrol {Correct breakpoint location} + check box. For more information, see \l{Setting Breakpoints}. + + To use the abstraction layer provided by Python Dumper + classes to create a description of data items displayed + in the \uicontrol Locals and \uicontrol Expressions + views, select the \uicontrol {Use Python dumper} check box. + For more information, see \l{Debugging Helper Implementation}. + + To add information about first-chance and second-chance exceptions + to the \uicontrol Issues output pane, select the check boxes + in the \uicontrol {Add Exceptions to the Issues View} group. + \section1 Mapping Source Paths To enable the debugger to step into the code and display the source code diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index b1f1ede7118..e95067dae33 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -118,10 +118,15 @@ The debugger then takes over and starts the program with suitable parameters. + When using GDB or CDB as debug backend, you can specify additional commands + to execute before and after the backend and debugged program are started or + attached in \uicontrol Tools > \uicontrol Options > \uicontrol Debugger > + \uicontrol GDB and \uicontrol CDB. For more information, see + \l{Specifying Debugger Settings}. + \note Starting a C++ program in the debugger can take a long time, typically in the range of several seconds to minutes if complex features are used. - \section1 Launching the Debugger in Different Modes The debugger plugin can run the native debuggers in various operating modes @@ -171,6 +176,13 @@ \uicontrol {Run Settings} and select the \uicontrol {Run in terminal} check box. + If a console application does not start up properly in the configured + console and the subsequent attach fails, you can diagnose the issue by + using CDB's native console. Select \uicontrol Tools > \uicontrol Options > + \uicontrol Debugger > \uicontrol CDB > \uicontrol {Use CDB console} to + override the console set in the Windows system environment variables. + Note that the native console does not prompt on application exit. + To launch the debugger in Start Internal mode, click the \uicontrol {Start Debugging} button for the active project. @@ -596,6 +608,23 @@ It is also possible to continue executing the program until the current function completes or jump to an arbitrary position in the current function. + \section2 Customizing Debug Views + + You can change the appearance and behavior of the debug views by specifying + settings in \uicontrol Options > \uicontrol Debugger. For example, you can: + + \list + \li Use alternating row colors in debug views. + \li Adopt font size changes from the main editor. + \li Have tooltips displayed in the main editor while you are debugging. + \li Close temporary source and memory views and switch to the previously + used \QC mode when the debugger exits. + \li Bring \QC to the foreground when the debugged application is + interrupted. + \endlist + + For more information, see \l{Specifying Debugger Settings}. + \include creator-debugger-common.qdocinc debugger-breakpoints \include creator-debugger-common.qdocinc debugger-call-stack-trace \include creator-debugger-common.qdocinc debugger-locals @@ -691,6 +720,12 @@ By default, the \uicontrol Modules view is hidden. + When using CDB as debug backend, you can specify that the debugger should + break when application modules are loaded or unloaded. To enable breaking + for the specified modules, select \uicontrol Tools > \uicontrol Options > + \uicontrol Debugger > \uicontrol CDB. For more information, see + \l{Specifying CDB Settings}. + \section2 Viewing Source Files The \uicontrol {Source Files} view lists all the source files included in @@ -991,12 +1026,15 @@ not to generate the wire format directly, but to use the abstraction layer provided by the Python Dumper classes, specifically the \c{Dumper} class itself, and the \c{Dumper:Value} and \c{Dumper:Type} abstractions. - These provide a complete framework to take care of the \c iname and \c addr fields, to handle children of simple types, references, pointers, enums, and known and unknown structs, as well as some convenience functions to handle common situations. + When using CDB as debugger backend, you can enable the Python dumper by + selecting \uicontrol Tools > \uicontrol Options > \uicontrol Debugger > + \uicontrol CDB > \uicontrol {Use Python dumper}. + \section3 Dumper Class The \c Dumper class contains generic bookkeeping, low-level, and convenience diff --git a/doc/qtcreator/src/howto/creator-ui.qdoc b/doc/qtcreator/src/howto/creator-ui.qdoc index 7b1bd855c0e..2f48f433f57 100644 --- a/doc/qtcreator/src/howto/creator-ui.qdoc +++ b/doc/qtcreator/src/howto/creator-ui.qdoc @@ -301,7 +301,7 @@ \list \li \uicontrol {\l{User Interface}{Welcome}} mode for opening projects, - tutorial, and examples. + tutorials, and examples. \li \uicontrol{\l{Coding}{Edit}} mode for editing project and source files. diff --git a/doc/qtcreator/src/howto/creator-workspaces.qdoc b/doc/qtcreator/src/howto/creator-workspaces.qdoc index 356063ac333..d3e48090897 100644 --- a/doc/qtcreator/src/howto/creator-workspaces.qdoc +++ b/doc/qtcreator/src/howto/creator-workspaces.qdoc @@ -62,7 +62,7 @@ \section1 Saving Workspaces The changes you make to a workspace are saved when you exit \QC. - In \QMLD, you can select \uicontrol View > \uicontrol Workspaces > + Select \uicontrol View > \uicontrol Workspaces > \uicontrol Manage > \uicontrol {Restore last workspace on startup} to restore the current workspace the next time you start \QC. @@ -75,10 +75,12 @@ To switch between workspaces, select \uicontrol {Switch To}. - To create a new workspace: + To save a workspace after you've moved views around or opened and + closed them: \list 1 \li Select \uicontrol New. + \image qtcreator-workspace-new.png "New Workspace Name dialog" \li In the \uicontrol {Enter the name of the workspace} field, enter a name for the workspace. \li Select \uicontrol Create to create a new empty workspace or @@ -86,5 +88,10 @@ switch to it. \endlist - To delete the selected workspace, select \uicontrol Delete. + To delete the selected workspace, select \uicontrol Delete in + \uicontrol {Workspace Manager}. + + To export workspace settings into \e {.wrk} files select \uicontrol Export. + To import them to another computer, select \uicontrol Import, and then + locate the workspace settings file. */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc index 186d6f614e7..1b54b8d8ac0 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc @@ -70,7 +70,7 @@ If you have built the project before, \QC can use the existing build configuration to make the exact same build as found in the directory available to \QC. To import a build, specify a directory in the - \uicontrol {Import Build from} section and select \uicontrol {Import}. + \uicontrol {Import Build From} section and select \uicontrol {Import}. You can edit the build configuration later. For more information, see \l{Editing Build Configurations}. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc index 7622bf1fa45..b8af74b4beb 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -36,25 +36,25 @@ \title Sharing Project Settings - \QC stores user-specific project settings in a .pro.user file. You can - share these settings between several projects as a .pro.shared file. It - has the same XML structure as a .pro.user file, but only contains the + \QC stores user-specific project settings in a \e {.user} file. You can + share these settings between several projects as a \e {.shared} file. It + has the same XML structure as a \e {.user} file, but only contains the settings to share. \section1 Creating Shared Settings File - The easiest way to create a .pro.shared file is to copy settings from the - .pro.user file. Typically, you would share some of the values in the + The easiest way to create a \e {.shared} file is to copy settings from the + \e {.user} file. Typically, you would share some of the values in the \c ProjectExplorer.Project.EditorSettings section. \note You must always specify the \c ProjectExplorer.Project.Updater.FileVersion variable and use the same - value for it as in the .pro.user file. + value for it as in the \e {.user} file. - You can then deliver the .pro.shared file to other developers or copy it to + You can then deliver the \e {.shared} file to other developers or copy it to other development PCs. - The following is an example of a pro.shared file: + The following is an example of a \e {.shared} file: \code @@ -78,16 +78,16 @@ \section1 Updating Shared Settings - The first time \QC loads the project after you added pro.shared settings, - it overwrites the pro.user settings with them. If you open the project for - the first time and \QC has not created a .pro.user file, the settings in the - .pro.shared file take effect immediately. + The first time \QC loads the project after you add shared settings, + it overwrites the user settings with them. If you open the project for + the first time and \QC has not created a \e {.user} file, the settings + in the \e {.shared} file take effect immediately. - If you receive a .pro.shared file and do not want to use a particular + If you receive a \e {.shared} file and do not want to use a particular setting in it, you can change it. \QC marks it a \e sticky setting. The next time you open a project, the setting is not updated. \QC tracks sticky - settings in the .pro.user file and removes the mark if the values in the - pro.user and pro.shared files eventually become identical. This is to avoid + settings in the \e {.user} file and removes the mark if the values in the + user and shared files eventually become identical. This is to avoid a permanent sticky setting that was created just because you wanted to try something out. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc index 40d486ebad3..cfdc3e349f5 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc @@ -68,7 +68,7 @@ Typically, only a subset of the kit settings is relevant for a particular setup. Therefore, \QC plugins register sets of relevant settings that you can view and modify in \uicontrol Tools > \uicontrol Options > - \uicontrol Kits >. For example, if you use CMake to build all your projects, + \uicontrol Kits. For example, if you use CMake to build all your projects, you can hide Qbs and qmake settings by default. To hide and show settings in the \uicontrol Kits tab for the diff --git a/doc/qtcreator/src/qtcreator.qdoc b/doc/qtcreator/src/qtcreator.qdoc index 71d2a2a1fe6..c7d61efba3b 100644 --- a/doc/qtcreator/src/qtcreator.qdoc +++ b/doc/qtcreator/src/qtcreator.qdoc @@ -37,10 +37,9 @@ \QC provides a cross-platform, complete integrated development environment (IDE) for application developers to create applications for multiple - desktop, \l {http://doc.qt.io/QtForDeviceCreation/index.html}{embedded}, - and mobile device platforms, such as \l{Connecting Android Devices}{Android} - and \l{Connecting iOS Devices}{iOS}. It is available for Linux, \macos and - Windows + \l{Desktop Platforms}{desktop}, \l {Embedded Platforms}{embedded}, and + \l{Mobile Platforms}{mobile device} platforms, such as \l Android and + \l iOS. It is available for \l Linux, \l \macos and \l Windows operating systems. For more information, see \l{Supported Platforms}. In addition, you can use the experimental diff --git a/doc/qtcreator/src/qtquick/qtquick-connection-editor-properties.qdoc b/doc/qtcreator/src/qtquick/qtquick-connection-editor-properties.qdoc index 9c05d2524c5..176a9070a38 100644 --- a/doc/qtcreator/src/qtquick/qtquick-connection-editor-properties.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-connection-editor-properties.qdoc @@ -30,8 +30,8 @@ \title Specifying Dynamic Properties - In addition to the properties predefined for QML types, you can specify - \e {dynamic properties} to add properties that would not otherwise + Each predefined QML type has a set of predefined properties that you can + specify values for. You can add custom properties that would not otherwise exist for a particular type. You bind the properties to dynamic expressions to define global properties for an object that can be read by other objects. For example, you can specify global properties for the root object that you @@ -42,18 +42,19 @@ and then use bindings to refer to the value of the margin property from other objects. - Similarly, you can add dynamic properties at component level. + Similarly, you can add custom properties for your own QML types that are + based on the predefined types. - You can specify dynamic properties for objects in the - \uicontrol Connections view. + You can add properties for objects in the \uicontrol Connections view, + \uicontrol Properties tab. - \image qmldesigner-dynamicprops.png + \image qmldesigner-dynamicprops.png "Custom properties in Connection View Custom Properties tab" - To specify dynamic properties for an object: + To add properties for an object: \list 1 - \li In the \uicontrol {Connections} view, select the - \uicontrol {Properties} tab. + \li Select \uicontrol View > \uicontrol Views > + \uicontrol {Connections View} > \uicontrol {Properties}. \li Select the \inlineimage plus.png (\uicontrol Add) button to add a dynamic property for the currently selected item. The item ID is displayed in the \uicontrol Item @@ -61,9 +62,67 @@ \li Double-click the value in the \uicontrol Property column to give a name to the property. \li Double-click the value in the \uicontrol {Property Type} column to - specify the type of the property. + specify the \l{Supported Property Types}{type of the property}. \li Double-click the value in the \uicontrol {Property Value} column - to specify a dynamic expression as the value of the property. + to specify the value of the property. \endlist + The properties you add for a QML type are displayed in the + \uicontrol Properties view when you select a component of + that type in \uicontrol Navigator or \uicontrol {Form Editor}. + + \image qtquick-custom-properties.png "Custom properties in Properties view" + + For more information about setting property values in the + \uicontrol Properties view, see \l{Specifying Item Properties}. + + For an example of using custom properties in an application, see + \l{Creating a Mobile Application}. + + \section1 Supported Property Types + + The following table describes the supported property types: + + \table + \header + \li Type + \li Description + \row + \li alias + \li \l{Property Aliases}{Property alias} that holds a reference to + another property + \row + \li bool + \li Binary \c true or \c false value + \row + \li color + \li Color value that can be specified by using an SVG color name, such + as "red", "green", or "lightsteelblue", or a hexadecimal triplet or + quad in the form "#RRGGBB" and "#AARRGGBB", respectively. For + example, the color red corresponds to a triplet of "#FF0000" and + a slightly transparent blue to a quad of "#800000FF". + In addition, you can use the following Qt functions: \l{Qt::rgba()} + {Qt.rgba()}, \l{Qt::hsva()}{Qt.hsva()}, \l{Qt::hsla()}{Qt.hsla()}, + \l{Qt::darker()}{Qt.darker()}, \l{Qt::lighter()}{Qt.lighter()}, and + \l{Qt::tint()}{Qt.tint()}. + \row + \li int + \li Whole integer number, such as 0, 10, or -20 + \row + \li real + \li Number with a decimal point + \row + \li string + \li Free form text string + \row + \li url + \li Resource locator, such as a file name. It can be either absolute, + (\c http://qt-project.org), or relative (\c pics/logo.png). A + relative URL is resolved relative to the URL of the parent + component. + \row + \li variant + \li Generic property type. For example, variant properties can store + numbers, strings, objects, arrays, and functions. + \endtable */ diff --git a/doc/qtcreator/src/qtquick/qtquick-designer.qdoc b/doc/qtcreator/src/qtquick/qtquick-designer.qdoc index 412cbc8f552..98059facac7 100644 --- a/doc/qtcreator/src/qtquick/qtquick-designer.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-designer.qdoc @@ -52,8 +52,10 @@ following views, select \uicontrol View > \uicontrol Views: \list - \li \uicontrol {Form Editor} (1) provides a canvas for designing 2D UIs. - For more information, see \l {Editing 2D Content}. + \li \uicontrol {Form Editor} (1) provides a canvas for designing + 2D UIs. For more information, see \l {Editing 2D Content}. + When you are editing 3D scenes, the \uicontrol {Form Editor} is + used as a canvas for the 3D scene projected by the camera. \li \uicontrol {3D Editor} provides an editor for files you created using 3D graphics applications and stored in one of the supported @@ -88,11 +90,11 @@ \li \uicontrol {Open Documents} shows currently open files. - \li \uicontrol {Projects} shows a list of projects open in the + \li \uicontrol {Projects} (6) shows a list of projects open in the current session. For more information, see \l{Viewing Project Files}. - \li \uicontrol {States} (6) displays the different states of the item. + \li \uicontrol {States} displays the different states of the item. QML states typically describe user interface configurations, such as the UI controls, their properties and behavior and the available actions. For more information, see \l{Adding States}. diff --git a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc index 78c70b28093..b26107ca2a4 100644 --- a/doc/qtcreator/src/qtquick/qtquick-properties.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-properties.qdoc @@ -32,25 +32,30 @@ The \uicontrol Properties view displays all the properties of the selected item. The properties are grouped by type. The top part of the view displays - properties that are common to all QML types, such as position, size, and - visibility. + properties that are common to all QML types, such as type, id, position, + size, and visibility. - The bottom part of the view displays properties that are specific to each - QML type. For example, the following image displays the properties you can - set for \uicontrol Rectangle and \uicontrol Text items. + The bottom part of the view displays properties that have been defined for + the QML type. For example, the following image displays the predefined + properties you can set for \uicontrol Rectangle and \uicontrol Text items. \image qmldesigner-element-properties.png - To change the item type, double-click the \uicontrol Type field in the - \uicontrol Properties view, and enter the name of another QML type in the - field. If you have specified properties for the item that are not supported - for the new type, the type cannot be changed and an error message is - displayed. Select the \inlineimage icons/action-icon.png + When you create a component using a QML type, the component has all the + properties of the type you used. If you realize later that another + QML type with another set of predefined properties would be more suitable + for your purposes, you can change the component type by double-clicking the + \uicontrol Type field in the \uicontrol Properties view. Enter the name of + another QML type in the field. + + If you have specified values for properties that are not supported by + the new type, \QC offers to remove them for you. If you'd rather do + this yourself, you can select the \inlineimage icons/action-icon.png (\uicontrol Actions) menu next to the property name, and then select \uicontrol Reset to remove the property values before trying again. - To modify the common properties of multiple items simultaneously, select - them in the \uicontrol Navigator or on the canvas: + To modify the values of common properties of multiple items simultaneously, + select the items in the \uicontrol Navigator or on the canvas: \list \li On Windows, press and hold \key Ctrl and \key Shift, and then click @@ -71,6 +76,18 @@ For more information on the properties available for an item, press \key {F1}. + \section1 Specifying Custom Properties + + Each predefined QML type has a set of properties that you can extend by + defining additional properties for your own QML components. For more + information, see \l{Specifying Dynamic Properties}. + + The properties you add for a QML type are displayed in the + \uicontrol Properties view when you select a component + of that type in \uicontrol Navigator or \uicontrol {Form Editor}. + + \image qtquick-custom-properties.png "Custom properties in Properties view" + \section1 Viewing Changes in Properties The default values of properties are displayed in white color, while the diff --git a/doc/qtdesignstudio/images/studio-design-mode.png b/doc/qtdesignstudio/images/studio-design-mode.png index 9937cce4ffe..33cdfb5ea71 100644 Binary files a/doc/qtdesignstudio/images/studio-design-mode.png and b/doc/qtdesignstudio/images/studio-design-mode.png differ diff --git a/share/qtcreator/qml/qmlpuppet/commands/captureddatacommand.h b/share/qtcreator/qml/qmlpuppet/commands/captureddatacommand.h index c9d626e4341..f682c035e9f 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/captureddatacommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/captureddatacommand.h @@ -98,6 +98,7 @@ public: { out << data.image; out << data.nodeData; + out << data.nodeId; return out; } @@ -106,6 +107,7 @@ public: { in >> data.image; in >> data.nodeData; + in >> data.nodeId; return in; } diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index c990c276650..59642672065 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -28,8 +28,6 @@ #include "cppmodelmanager.h" #include "headerpathfilter.h" -#include - #include #include @@ -385,8 +383,11 @@ void CompilerOptionsBuilder::addProjectMacros() { static const int useMacros = qEnvironmentVariableIntValue("QTC_CLANG_USE_TOOLCHAIN_MACROS"); - if (m_projectPart.toolchainType == BareMetal::Constants::IAREW_TOOLCHAIN_TYPEID || useMacros) + if (m_projectPart.toolchainType == ProjectExplorer::Constants::CUSTOM_TOOLCHAIN_TYPEID + || m_projectPart.toolchainType.name().contains("BareMetal") + || useMacros) { addMacros(m_projectPart.toolChainMacros); + } addMacros(m_projectPart.projectMacros); } diff --git a/src/plugins/projectexplorer/buildaspects.cpp b/src/plugins/projectexplorer/buildaspects.cpp index a061605ef48..04f71e132e1 100644 --- a/src/plugins/projectexplorer/buildaspects.cpp +++ b/src/plugins/projectexplorer/buildaspects.cpp @@ -51,7 +51,7 @@ BuildDirectoryAspect::BuildDirectoryAspect() : d(new Private) setSettingsKey("ProjectExplorer.BuildConfiguration.BuildDirectory"); setLabelText(tr("Build directory:")); setDisplayStyle(PathChooserDisplay); - setExpectedKind(Utils::PathChooser::ExistingDirectory); + setExpectedKind(Utils::PathChooser::Directory); } BuildDirectoryAspect::~BuildDirectoryAspect() diff --git a/src/plugins/qmldesigner/components/debugview/debugview.cpp b/src/plugins/qmldesigner/components/debugview/debugview.cpp index 6805f7b44fc..61c6830b11c 100644 --- a/src/plugins/qmldesigner/components/debugview/debugview.cpp +++ b/src/plugins/qmldesigner/components/debugview/debugview.cpp @@ -422,10 +422,7 @@ void DebugView::instancesChildrenChanged(const QVector & nodeList) void DebugView::customNotification(const AbstractView *view, const QString &identifier, const QList &nodeList, const QList &data) { - if (identifier == "PuppetStatus" && data.count() == 1) { - m_debugViewWidget->setPuppetStatus(data.constFirst().toString()); - - } else if (isDebugViewEnabled()) { + if (isDebugViewEnabled()) { QTextStream message; QString string; message.setString(&string); diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.h b/src/plugins/qmldesigner/components/formeditor/formeditoritem.h index 37e34fc4f78..9551f1eb88d 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.h @@ -131,7 +131,7 @@ protected: QRectF m_boundingRect; QRectF m_paintedBoundingRect; QRectF m_selectionBoundingRect; - QColor m_frameColor{0xaa, 0xaa, 0xaa}; + QColor m_frameColor; private: // functions void setup(); diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index bdae76c0d3f..136b51150d2 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -495,9 +495,6 @@ QProcessEnvironment PuppetCreator::processEnvironment() const } #ifndef QMLDESIGNER_TEST - auto view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView(); - view->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)}); - // set env var if QtQuick3D import exists QmlDesigner::Import import = QmlDesigner::Import::createLibraryImport("QtQuick3D", "1.0"); if (m_model->hasImport(import, true, true)) diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp index f5b4b677808..5c1ffce639a 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp @@ -216,7 +216,9 @@ static bool isIdToAvoid(const QString& id) "layer", "scale", "enabled", - "anchors" + "anchors", + "texture", + "shaderInfo" }; return ids.contains(id); diff --git a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp index aa6b0e85652..ac0f30118d5 100644 --- a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp +++ b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewplugin.cpp @@ -158,13 +158,15 @@ void QmlPreviewPlugin::setLanguageLocale(const QString &locale) QObject *QmlPreviewPlugin::getPreviewPlugin() { - auto pluginIt = std::find_if(ExtensionSystem::PluginManager::plugins().begin(), - ExtensionSystem::PluginManager::plugins().end(), + const QVector specs = ExtensionSystem::PluginManager::plugins(); + + auto pluginIt = std::find_if(specs.begin(), + specs.end(), [](const ExtensionSystem::PluginSpec *p) { return p->name() == "QmlPreview"; }); - if (pluginIt != ExtensionSystem::PluginManager::plugins().constEnd()) + if (pluginIt != specs.end()) return (*pluginIt)->plugin(); return nullptr; diff --git a/src/shared/qbs b/src/shared/qbs index af6b6ef74ed..1f2900f4181 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit af6b6ef74edb19e07b354c853c99eac30631d736 +Subproject commit 1f2900f4181d44b53f2a36ee637b8570f611515f