diff --git a/dist/changes-4.9.1.md b/dist/changes-4.9.1.md new file mode 100644 index 00000000000..5e49b1f8bb6 --- /dev/null +++ b/dist/changes-4.9.1.md @@ -0,0 +1,65 @@ +Qt Creator version 4.9.1 contains bug fixes. + +The most important changes are listed in this document. For a complete +list of changes, see the Git log for the Qt Creator sources that +you can check out from the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline origin/v4.9.0..v4.9.1 + +Editing + +* Fixed folding for generic highlighter (QTCREATORBUG-22346) + +QMake Projects + +* Fixed unnecessary reparsing on file save (QTCREATORBUG-22361) + +CMake Projects + +* Fixed deployment with `QtCreatorDeployment.txt` (QTCREATORBUG-22184) + +Debugging + +* Fixed ambiguity of `F10` shortcut (QTCREATORBUG-22330) +* CDB + * Fixed `Start and Break on Main` (QTCREATORBUG-22263) + +Test Integration + +* Fixed `Uncheck All` + +Platform Specific + +Android + +* Fixed AVD creation for Google Play images + +Remote Linux + +* Fixed crash when running `Custom Executable` on remote Linux target + from Windows host (QTCREATORBUG-22414) +* Fixed SSH connection sharing on macOS (QTCREATORBUG-21748) +* Deployment via SFTP + * Fixed `Unexpected stat output for remote file` (QTCREATORBUG-22041) + * Fixed deployment of symbolic links (QTCREATORBUG-22307) +* Deployment via rsync + * Fixed compatibility issue with command line parameters + (QTCREATORBUG-22352) + +Credits for these changes go to: +André Pönitz +BogDan Vatra +Christian Kandeler +Christian Stenger +David Schulz +Eike Ziller +Jaroslaw Kobus +Jonathan Liu +Leena Miettinen +Mitch Curtis +Nikolai Kosjar +Robert Löhning +Thomas Hartmann +Ulf Hermann +Ville Nummela diff --git a/doc/config/qtcreator-project.qdocconf b/doc/config/qtcreator-project.qdocconf index f7659e94d94..db7d38dc393 100644 --- a/doc/config/qtcreator-project.qdocconf +++ b/doc/config/qtcreator-project.qdocconf @@ -19,6 +19,7 @@ imagedirs = ../images \ ../../src/plugins/qmldesigner/components/componentcore/images \ ../../src/plugins/qmldesigner/components/formeditor \ ../../src/plugins/qmldesigner/components/navigator \ + ../../src/plugins/qmldesigner//qmldesignerextension/timelineeditor/images \ ../../src/plugins/scxmleditor/common/images \ ../../src/plugins/texteditor/images \ ../../src/plugins/valgrind/images diff --git a/doc/images/anchor-bottom.png b/doc/images/anchor-bottom.png new file mode 100644 index 00000000000..3a96c98107a Binary files /dev/null and b/doc/images/anchor-bottom.png differ diff --git a/doc/images/anchor-fill.png b/doc/images/anchor-fill.png new file mode 100644 index 00000000000..a065729bee0 Binary files /dev/null and b/doc/images/anchor-fill.png differ diff --git a/doc/images/anchor-horizontal-center.png b/doc/images/anchor-horizontal-center.png new file mode 100644 index 00000000000..984fa0eb680 Binary files /dev/null and b/doc/images/anchor-horizontal-center.png differ diff --git a/doc/images/anchor-left.png b/doc/images/anchor-left.png new file mode 100644 index 00000000000..92637502352 Binary files /dev/null and b/doc/images/anchor-left.png differ diff --git a/doc/images/anchor-right.png b/doc/images/anchor-right.png new file mode 100644 index 00000000000..7fa48d4f75a Binary files /dev/null and b/doc/images/anchor-right.png differ diff --git a/doc/images/anchor-top.png b/doc/images/anchor-top.png new file mode 100644 index 00000000000..12dd0ff3e16 Binary files /dev/null and b/doc/images/anchor-top.png differ diff --git a/doc/images/anchor-vertical-center.png b/doc/images/anchor-vertical-center.png new file mode 100644 index 00000000000..a82090c1edb Binary files /dev/null and b/doc/images/anchor-vertical-center.png differ diff --git a/doc/images/creator-git-commit-actions.png b/doc/images/creator-git-commit-actions.png index ad28b3fd71b..80b644f0ef3 100644 Binary files a/doc/images/creator-git-commit-actions.png and b/doc/images/creator-git-commit-actions.png differ diff --git a/doc/images/keyframe_linear_inactive.png b/doc/images/keyframe_linear_inactive.png new file mode 100644 index 00000000000..f53c5c25cec Binary files /dev/null and b/doc/images/keyframe_linear_inactive.png differ diff --git a/doc/images/keyframe_manualbezier_inactive.png b/doc/images/keyframe_manualbezier_inactive.png new file mode 100644 index 00000000000..ab6ced5af04 Binary files /dev/null and b/doc/images/keyframe_manualbezier_inactive.png differ diff --git a/doc/images/qmldesigner-binding-editor.png b/doc/images/qmldesigner-binding-editor.png index 7c8edfd90d1..0fd07427b63 100644 Binary files a/doc/images/qmldesigner-binding-editor.png and b/doc/images/qmldesigner-binding-editor.png differ diff --git a/doc/images/qmldesigner-set-expression.png b/doc/images/qmldesigner-set-expression.png index bbcbd094425..da93bd2cc63 100644 Binary files a/doc/images/qmldesigner-set-expression.png and b/doc/images/qmldesigner-set-expression.png differ diff --git a/doc/images/qmldesigner-visual-editor.png b/doc/images/qmldesigner-visual-editor.png index 2affa4ed6a8..f78480e0ac8 100644 Binary files a/doc/images/qmldesigner-visual-editor.png and b/doc/images/qmldesigner-visual-editor.png differ diff --git a/doc/images/qtcreator-application-output.png b/doc/images/qtcreator-application-output.png index 1064dd3a6d9..05f76b380d3 100644 Binary files a/doc/images/qtcreator-application-output.png and b/doc/images/qtcreator-application-output.png differ diff --git a/doc/images/qtcreator-build-issues.png b/doc/images/qtcreator-build-issues.png index 230572237e9..85c42782b3b 100644 Binary files a/doc/images/qtcreator-build-issues.png and b/doc/images/qtcreator-build-issues.png differ diff --git a/doc/images/qtcreator-compile-pane.png b/doc/images/qtcreator-compile-pane.png index 5c9b7647333..e7af4fe5e80 100644 Binary files a/doc/images/qtcreator-compile-pane.png and b/doc/images/qtcreator-compile-pane.png differ diff --git a/doc/images/qtcreator-filesystem-view.png b/doc/images/qtcreator-filesystem-view.png index 407f39a2b24..c94cf6020ee 100644 Binary files a/doc/images/qtcreator-filesystem-view.png and b/doc/images/qtcreator-filesystem-view.png differ diff --git a/doc/images/qtcreator-gerrit-options.png b/doc/images/qtcreator-gerrit-options.png index 9ead8c2b2e9..2cade60b9d4 100644 Binary files a/doc/images/qtcreator-gerrit-options.png and b/doc/images/qtcreator-gerrit-options.png differ diff --git a/doc/images/qtcreator-gerrit-push.png b/doc/images/qtcreator-gerrit-push.png index 0a831f21971..40ac931b667 100644 Binary files a/doc/images/qtcreator-gerrit-push.png and b/doc/images/qtcreator-gerrit-push.png differ diff --git a/doc/images/qtcreator-gerrit.png b/doc/images/qtcreator-gerrit.png index 1ba060be741..e489752b20a 100644 Binary files a/doc/images/qtcreator-gerrit.png and b/doc/images/qtcreator-gerrit.png differ diff --git a/doc/images/qtcreator-image-viewer.png b/doc/images/qtcreator-image-viewer.png index c1160c8a4f6..ea3ee88a83a 100644 Binary files a/doc/images/qtcreator-image-viewer.png and b/doc/images/qtcreator-image-viewer.png differ diff --git a/doc/images/qtcreator-mode-selector.png b/doc/images/qtcreator-mode-selector.png index ab52f1094a0..e82047cf859 100644 Binary files a/doc/images/qtcreator-mode-selector.png and b/doc/images/qtcreator-mode-selector.png differ diff --git a/doc/images/qtcreator-search-results.png b/doc/images/qtcreator-search-results.png index bf64f6e3a90..363207038a7 100644 Binary files a/doc/images/qtcreator-search-results.png and b/doc/images/qtcreator-search-results.png differ diff --git a/doc/images/qtcreator-searchresults.png b/doc/images/qtcreator-searchresults.png index 3bdf3fc1531..8c0a0b0ebb9 100644 Binary files a/doc/images/qtcreator-searchresults.png and b/doc/images/qtcreator-searchresults.png differ diff --git a/doc/images/qtcreator-sidebar.png b/doc/images/qtcreator-sidebar.png index e0c0da3c29f..d7f6dea0f86 100644 Binary files a/doc/images/qtcreator-sidebar.png and b/doc/images/qtcreator-sidebar.png differ diff --git a/doc/images/qtcreator-task-pane.png b/doc/images/qtcreator-task-pane.png new file mode 100644 index 00000000000..b2207514005 Binary files /dev/null and b/doc/images/qtcreator-task-pane.png differ diff --git a/doc/images/qtcreator-todo-options.png b/doc/images/qtcreator-todo-options.png index acf1a1ee906..9de23156214 100644 Binary files a/doc/images/qtcreator-todo-options.png and b/doc/images/qtcreator-todo-options.png differ diff --git a/doc/images/qtcreator-todo-pane.png b/doc/images/qtcreator-todo-pane.png index eed8e3deba4..21122b96a22 100644 Binary files a/doc/images/qtcreator-todo-pane.png and b/doc/images/qtcreator-todo-pane.png differ diff --git a/doc/images/qtcreator-vcs-commit.png b/doc/images/qtcreator-vcs-commit.png index a55f92b1d28..79ef8bc53ab 100644 Binary files a/doc/images/qtcreator-vcs-commit.png and b/doc/images/qtcreator-vcs-commit.png differ diff --git a/doc/images/qtcreator-vcs-diff.png b/doc/images/qtcreator-vcs-diff.png index 7500b965eb7..59d420cf6b1 100644 Binary files a/doc/images/qtcreator-vcs-diff.png and b/doc/images/qtcreator-vcs-diff.png differ diff --git a/doc/images/qtcreator-vcs-gitbranch.png b/doc/images/qtcreator-vcs-gitbranch.png index b19c0cfeba4..aae80201bca 100644 Binary files a/doc/images/qtcreator-vcs-gitbranch.png and b/doc/images/qtcreator-vcs-gitbranch.png differ diff --git a/doc/images/qtcreator-vcs-pane.png b/doc/images/qtcreator-vcs-pane.png index 62270b796f8..cfd60d8b955 100644 Binary files a/doc/images/qtcreator-vcs-pane.png and b/doc/images/qtcreator-vcs-pane.png differ diff --git a/doc/images/qtcreator-vcs-show.png b/doc/images/qtcreator-vcs-show.png index 610a0f2de05..4b510ca7d39 100644 Binary files a/doc/images/qtcreator-vcs-show.png and b/doc/images/qtcreator-vcs-show.png differ diff --git a/doc/images/qtquick-designer-stacked-view.png b/doc/images/qtquick-designer-stacked-view.png index 78eb17926e5..b3205e517c5 100644 Binary files a/doc/images/qtquick-designer-stacked-view.png and b/doc/images/qtquick-designer-stacked-view.png differ diff --git a/doc/images/studio-curve-picker.png b/doc/images/studio-curve-picker.png new file mode 100644 index 00000000000..37f1af0a399 Binary files /dev/null and b/doc/images/studio-curve-picker.png differ diff --git a/doc/images/studio-timeline-settings.png b/doc/images/studio-timeline-settings.png new file mode 100644 index 00000000000..eefbc561cd9 Binary files /dev/null and b/doc/images/studio-timeline-settings.png differ diff --git a/doc/images/studio-timeline.png b/doc/images/studio-timeline.png new file mode 100644 index 00000000000..e5743e068bd Binary files /dev/null and b/doc/images/studio-timeline.png differ diff --git a/doc/src/debugger/creator-only/creator-debugger.qdoc b/doc/src/debugger/creator-only/creator-debugger.qdoc index 57e49a846bc..a8d0d1e0932 100644 --- a/doc/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/src/debugger/creator-only/creator-debugger.qdoc @@ -698,6 +698,11 @@ single instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}. By default, the \uicontrol Disassembler view is hidden. + To access the \uicontrol Disassembler view, check + \uicontrol Debug > \uicontrol {Operate by Instruction} while the debugger is + running. Alternatively, click the \inlineimage debugger_singleinstructionmode.png + (\uicontrol {Operate by Instruction}) tool button on the debugger tool bar. + \section2 Viewing and Editing Register State The \uicontrol Registers view displays the current state of the CPU registers. diff --git a/doc/src/editors/creator-code-syntax.qdoc b/doc/src/editors/creator-code-syntax.qdoc index bf68f1e41a5..e183c20f5e1 100644 --- a/doc/src/editors/creator-code-syntax.qdoc +++ b/doc/src/editors/creator-code-syntax.qdoc @@ -38,17 +38,20 @@ structure. \if defined(qtcreator) - \list - \li Syntax errors are underlined in red. + In the following screenshot, \QC points out an error, because a semicolon is + missing at the end of the line: - In the following screenshot, a semicolon is missing at the end - of the line. - \image qtcreator-syntaxerror.png - \li Semantic errors and warnings are underlined in olive. + \image qtcreator-syntaxerror.png - In the following screenshot, the variable is not used. - \image qtcreator-semanticerror.png - \endlist + In the following screenshot, \QC issues a warning, because the variable is + not used: + + \image qtcreator-semanticerror.png + + To modify the colors used for underlining errors and warnings, select + \uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} > + \uicontrol {Fonts & Colors} > \uicontrol Copy, and select new colors for + \uicontrol Error and \uicontrol Warning. \section1 Viewing Annotations diff --git a/doc/src/howto/creator-only/creator-tips.qdoc b/doc/src/howto/creator-only/creator-tips.qdoc index 80334544978..5e481b42f27 100644 --- a/doc/src/howto/creator-only/creator-tips.qdoc +++ b/doc/src/howto/creator-only/creator-tips.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -53,7 +53,7 @@ \endlist - For more information about \QC modes, see \l {Modes}. + For more information about \QC modes, see \l {Selecting Modes}. \section1 Moving Between Open Files diff --git a/doc/src/howto/creator-sidebar-views.qdocinc b/doc/src/howto/creator-sidebar-views.qdoc similarity index 92% rename from doc/src/howto/creator-sidebar-views.qdocinc rename to doc/src/howto/creator-sidebar-views.qdoc index ff287b4525e..d92a1067b57 100644 --- a/doc/src/howto/creator-sidebar-views.qdocinc +++ b/doc/src/howto/creator-sidebar-views.qdoc @@ -24,15 +24,19 @@ ****************************************************************************/ /*! -//! [using sidebar views] + \contentspage index.html + \page creator-sidebar-views.html + \previouspage creator-modes.html + \nextpage creator-output-panes.html - \section1 Browsing Project Contents + \title Browsing Project Contents - A left and right sidebar are available in most \QC modes. The availability - of the sidebars and their contents depend on the mode. + A left and right sidebar are available in most \QC \l{Selecting Modes} + {modes}. The availability of the sidebars and their contents depend on + the mode. - In the \uicontrol Edit mode, you can use the sidebars to browse the project - contents. + In the \uicontrol Edit and \uicontrol Design mode, you can use the sidebars + to browse the project contents. \image qtcreator-sidebar.png @@ -97,11 +101,7 @@ In some views, right-clicking opens a context menu that contains functions for managing the objects listed in the view. -//! [using sidebar views] - -//! [projects view] - - \section2 Viewing Project Files + \section1 Viewing Project Files The sidebar displays projects in a project tree. The project tree contains a list of all projects open in the current session. For each project, the @@ -196,11 +196,7 @@ files, as well as compare the selected file with the currently open file in the diff editor. For more information, see \l{Comparing Files}. -//! [projects view] - -//! [open documents view] - - \section2 Viewing Open Documents + \section1 Viewing Open Documents To see a list of open documents, switch to the \uicontrol {Open Documents} view. By right-clicking an open document, you can: @@ -210,11 +206,7 @@ closed when \uicontrol {Close All} is used. \endlist -//! [open documents view] - -//! [file system view] - - \section2 Viewing the File System + \section1 Viewing the File System If you cannot see a file in the \uicontrol Projects view, switch to the \uicontrol {File System} view, which shows all the files in the file system. @@ -282,11 +274,7 @@ \endlist -//! [file system view] - -//! [outline view] - - \section2 Viewing Defined Types and Symbols + \section1 Viewing Defined Types and Symbols The \uicontrol Outline view shows an overview of defined types and other symbols, as well as their properties and hierarchy in a source file. @@ -298,12 +286,7 @@ editor, deselect \uicontrol {Synchronize with Editor}. \endlist -//! [outline view] - - -//! [class view] - - \section2 Viewing the Class Hierarchy + \section1 Viewing the Class Hierarchy The \uicontrol {Class View} shows the class hierarchy of the currently open projects. To organize the view by subprojects, click @@ -313,22 +296,12 @@ To visit all parts of a namespace, double-click on the namespace item multiple times. -//! [class view] - - -//! [type hierarchy view] - - \section2 Viewing Type Hierarchy + \section1 Viewing Type Hierarchy To view the base classes of a class, right-click the class and select \uicontrol {Open Type Hierarchy} or press \key {Ctrl+Shift+T}. -//! [type hierarchy view] - - -//! [include hierarchy view] - - \section2 Viewing Include Hierarchy + \section1 Viewing Include Hierarchy To view which files are included in the current file and which files include the current file, right-click in the editor and select @@ -336,6 +309,4 @@ To keep the view synchronized with the file currently opened in the editor, select \uicontrol {Synchronize with Editor}. - -//! [include hierarchy view] */ diff --git a/doc/src/howto/creator-ui.qdoc b/doc/src/howto/creator-ui.qdoc index 9d0249251b1..2419f499e85 100644 --- a/doc/src/howto/creator-ui.qdoc +++ b/doc/src/howto/creator-ui.qdoc @@ -34,11 +34,10 @@ \page creator-quick-tour.html \if defined(qtdesignstudio) \previouspage qtbridge-ps-using.html - \nextpage creator-using-qt-quick-designer.html \else \previouspage creator-overview.html - \nextpage creator-configuring.html \endif + \nextpage creator-modes.html \title User Interface @@ -64,7 +63,8 @@ \image studio-welcome-mode.png \endif - You can use the mode selector (1) to change to another \QC mode. + You can use the \l{Selecting Modes}{mode selector} (1) to change to another + \QC mode. \if defined(qtcreator) You can use the kit selector (2) to select the @@ -74,363 +74,27 @@ \else You can use the kit selector (2) to select the \l{glossary-buildandrun-kit} {kit} for running (3) or debugging (4) the application. Output from these - actions is displayed in the output panes (5). + actions is displayed in the \l{Viewing Output}{output panes} (5). \endif - You can use the locator (6) to browse through projects, files, classes, - functions, documentation, and file systems. + You can use the \l{Searching with the Locator}{locator} (6) to browse + through projects, files, classes, functions, documentation, and file + systems. \if defined(qtcreator) For a quick tour of the user interface that takes you to the locations of these controls, select \uicontrol Help > \uicontrol {UI Tour}. \endif - \section1 Modes - The mode selector allows you to quickly switch between tasks such as editing - project and source files, designing application UIs, configuring how - projects are built and executed, and debugging your applications. To change - modes, click the icons, or use the \l{keyboard-shortcuts} - {corresponding keyboard shortcut}. - - To hide the mode selector and to save space on the display, select - \uicontrol Window > \uicontrol {Mode Selector Style} > \uicontrol Hidden. - To only show icons on the mode selector, select the \uicontrol {Icons Only} - style. - - The following image displays an example application in \uicontrol Edit mode (1) - and \uicontrol Design mode (2). - - \if defined(qtcreator) - \image qtcreator-qt-quick-editors.png "Edit mode and Design mode" - \else - \image studio-editors.png "Edit mode and Design mode" - \endif - - You can use \QC in the following modes: + The following sections describe some of these controls in more detail: \list - - \li \uicontrol Welcome mode for opening projects. - - \li \uicontrol{\l{Coding}{Edit}} mode for editing project and source - files. - - \if defined(qtcreator) - \li \uicontrol{\l{Designing User Interfaces}{Design}} - \else - \li \uicontrol{\l{Editing QML Files in Design Mode}{Design}} - \endif - mode for designing and developing application user interfaces. - This mode is available for UI files. - - \li \uicontrol{\l{Debugging}{Debug}} mode for inspecting the state of your - application while debugging and for using code analysis tools - to detect memory leaks and profile C++ or QML code. - - \if defined(qtcreator) - \li \uicontrol{\l{Specifying Build Settings}{Projects}} mode - for configuring project building and execution. - \else - \li \uicontrol{\l{Selecting the Preview Tool}{Projects}} mode - for selecting the tool to use for live preview. - \endif - This mode is available when a project is open. - - \li \uicontrol{\l{Using the Help Mode}{Help}} mode for viewing Qt - documentation. - + \li \l{Selecting Modes}{Mode selector} + \li \l{Browsing Project Contents}{Sidebars} + \li \l{Viewing Output}{Output panes} \endlist - Certain actions in \QC trigger a mode change. Clicking on \uicontrol {Debug} > - \uicontrol {Start Debugging} > \uicontrol {Start Debugging} automatically switches to - \uicontrol {Debug} mode. - - \include creator-sidebar-views.qdocinc using sidebar views - \include creator-sidebar-views.qdocinc projects view - \include creator-sidebar-views.qdocinc open documents view - \include creator-sidebar-views.qdocinc file system view - \include creator-sidebar-views.qdocinc outline view - \if defined(qtcreator) - \include creator-sidebar-views.qdocinc class view - \include creator-sidebar-views.qdocinc type hierarchy view - \include creator-sidebar-views.qdocinc include hierarchy view - \endif - - \section1 Viewing Output - - The task pane in \QC can display one of the following panes: - - \list - - \li \uicontrol{Issues} - - \li \uicontrol{Search Results} - - \li \uicontrol{Application Output} - - \li \uicontrol{Compile Output} - - \li \uicontrol {QML Debugger Console} - - \li \uicontrol{General Messages} - - \li \uicontrol{Version Control} - - \if defined(qtcreator) - \li \uicontrol{Test Results} - - \li \uicontrol {To-Do Entries} - \endif - - \endlist - - Output panes are available in all \l{Modes}{modes}. Click the name of an - output pane to open the pane. To maximize an open output pane, click the - \uicontrol {Maximize Output Pane} button or press \key {Alt+9}. - - To search within the \uicontrol{Application Output} and \uicontrol{Compile Output} - panes, press \key {Ctrl+F} when the pane is active. Enter search criteria in - the \uicontrol Find field and click the left and right arrows to search down and - up in the pane. In these panes, you can also use the zoom buttons to increase and - decrease the text size of the output. - - To open the \uicontrol{General Messages} and - \if defined(qtcreator) - \l{Using Version Control Systems}{Version Control} - \else - \l{Using Git}{Version Control} - \endif - panes, select \uicontrol {Window > Output Panes}. - \if defined(qtcreator) - To display the \uicontrol {To-Do Entries} pane, enable the Todo plugin. - \endif - - For more information about the \uicontrol {QML Debugger Console} view, see - \l{Executing JavaScript Expressions}. - - \section2 Issues - - The \uicontrol{Issues} pane provides lists of following types of issues: - - \list - - \if defined(qtdesignstudio) - \li \uicontrol {Asset Importer Error} - Errors and warnings encountered - while importing assets from a design tool. - \endif - - \li \uicontrol {Build System} - Errors and warnings encountered during a - build. - - \if defined(qtcreator) - \li \uicontrol {Clang Code Model} - - \l {Parsing C++ Files with the Clang Code Model} - {Errors and warnings from the current editor}. - \endif - - \li \uicontrol Compile - Selected output from the compiler. Open the - \uicontrol {Compile Output} pane for more detailed information. - - \li \uicontrol{Debug Information} - Lists debug information packages that might - be missing. - - \if defined(qtcreator) - \li \uicontrol Debugger - Errors encountered while running the - \l{Analyzing Code}{Valgrind code analysis tools}. - \endif - - \li \uicontrol{Debugger Runtime} - Errors encountered when starting \QC. For - example, information about missing DLLs. - - \li \uicontrol Deployment - Errors encountered between building an application - successfully and starting it on a \l{glossary-device}{device}. - - \if defined(qtcreator) - \li \uicontrol {My Tasks} - Entries from a task list file (.tasks) generated - by \l{Showing Task List Files in Issues Pane} - {code scanning and analysis tools}. - - \li \uicontrol Python - Runtime errors and exceptions of Python scripts. - \endif - - \li \uicontrol QML and \uicontrol {QML Analysis} - - \l{JavaScript and QML Error Codes} - {QML and JavaScript syntax errors}. - - \endlist - - The pane filters out irrelevant output from the build tools and presents the - issues in an organized way. To further filter the output by type, select - \uicontrol {Filter Tree} - and then select a filter. - - \image qtcreator-build-issues.png - - Right-clicking on a line brings up a context menu with actions that you can - apply to the contents of the line. You can remove a line, copy its contents - to the clipboard, or search the Internet for a solution using the contents - of the line as search criteria. In addition, you can show a version control - annotation view of the line that causes the error message. - - To navigate to the corresponding source code, click an issue or - select \uicontrol {Show in Editor} in the context menu. The entry must contain the - name of the file where the issue was found. - - To view more information about an issue in the \uicontrol {Compile Output} pane, - select \uicontrol {Show Output} in the context menu. - - To jump from one issue to the next or previous one, press \key F6 and - \key Shift+F6. - - \section2 Search Results - - In the \uicontrol{Search Results} pane, you can search through projects, files on - a file system or the currently open files: - - \image qtcreator-search-results.png "Search Results output pane" - - The search results are stored in the search history (1) from which you can - select earlier searches. - - The figure below shows an example search result for all - occurrences of the search string in the specified directory. - - \image qtcreator-searchresults.png - - For more information about the different search options, see - \l {Finding and Replacing}. - - \section2 Application Output - - The \uicontrol{Application Output} pane displays the status of a program when - it is executed, and the debug output. - - \image qtcreator-application-output.png - - \if defined(qtcreator) - If you specify command line arguments in the run settings that are passed - to the application when running it, they are displayed as a part of the - application output. For more information, see - \l{Specifying Run Settings for Desktop Device Types}. - \endif - - Select toolbar buttons to run applications, to attach the debugger to the - running application, and to stop running or debugging. - - To specify settings for displaying application output, select - \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} > - \uicontrol Application Output, or click the \uicontrol {Open Settings Page} - button. You can select whether to open the \uicontrol{Application Output} pane - on output when running or debugging applications, to clear old output on a new run, - to word-wrap output, and to limit output to the specified number of lines. - - \section2 Compile Output - - The \uicontrol{Compile Output} pane provides all output from the compiler. - The \uicontrol{Compile Output} is a more detailed version of information - displayed in the \uicontrol{Issues} pane. - - \image qtcreator-compile-pane.png - - Double-click on a file name in an error message to open the file in the - code editor. - - Select the \uicontrol {Cancel Build} button to cancel the build. - - To specify whether to open the \uicontrol {Compile Output} pane on output - when building applications, select \uicontrol Tools > \uicontrol Options > - \uicontrol {Build & Run} > \uicontrol Compile Output, and then select the - \uicontrol {Open pane when building} check box. - In the \uicontrol {Limit output to} field, you can specify the maximum - amount of build output lines to display in the pane. - - You can also reach the options page by clicking the \uicontrol {Open Settings Page} - button. - - \if defined(qtcreator) - \section2 To-Do Entries - - The \uicontrol {To-Do Entries} pane lists the BUG, FIXME, NOTE, TODO, and - WARNING keywords from the current file, from all project files, or from a - subproject. Click the icons on the toolbar to show only the selected - keywords. - - \image qtcreator-todo-pane.png - - To add keywords, select \uicontrol Tools > \uicontrol Options > - \uicontrol {To-Do} > \uicontrol Add. Set an icon and a line background color - for the keyword. - - \image qtcreator-todo-options.png - - To change the icon and line background color of the selected keyword, select - \uicontrol Edit. - - To remove the selected keyword, select \uicontrol Remove. - - To reset the list to predefined keywords, select \uicontrol Reset. All your - changes will be permanently lost. - - To determine whether the keywords in the whole project, in the current file, - or in a subproject are displayed by default, select the appropriate option - in the \uicontrol {Scanning scope} group. - - To exclude files from scanning, select \uicontrol {Project Settings} > - \uicontrol {To-Do} in the - \uicontrol Projects mode. Select \uicontrol Add and enter a regular - expression that matches the path to files to exclude. Use a forward slash - (/) as a separator in the path also on Windows. - - The Todo plugin is disabled by default. To enable the plugin, select - \uicontrol Help > \uicontrol {About Plugins} > \uicontrol Utilities > - \uicontrol Todo and restart - \QC. - - In addition, you can open task list files generated by code scanning and - analysis tools in the \uicontrol Issues pane. For more information, see - \l{Showing Task List Files in Issues Pane}. - \endif - - \section1 Changing Languages - - \QC has been localized into several languages. If the system language is one - of the supported languages, it is automatically selected. To change the - language, select \uicontrol {Tools > Options > Environment} and select a language - in the \uicontrol Language field. The change takes effect after you restart \QC. - - \section1 Viewing Images - - \QC opens image files in the image viewer. - - \image qtcreator-image-viewer.png "Image viewer" - - Use the toolbar buttons (1) or \l{Keyboard Shortcuts}{keyboard shortcuts} - to: - - \list - - \li Export SVG images to pixmaps - - \li Switch between background and outline modes - - \li Zoom in and out - - \li Fit images to screen - - \li Return to original size - - \li Play and pause animated GIF and MNG images - - \endlist - - \section2 Exporting SVG Images - - If you receive a freely scalable icon in the SVG format from an UI designer, - you can export it to several images of different sizes to create a set of - pixmaps. You can then use QIcon::addPixmap() to add the pixmaps to icons in - different modes and states. - \section1 Navigating with Keyboard \QC caters not only to developers who are used to using the mouse, @@ -544,3 +208,365 @@ \uicontrol {Enable high DPI scaling}. The changes will take effect after you restart \QC. */ + +/*! + \contentspage index.html + \page creator-modes.html + \previouspage creator-quick-tour.html + \nextpage creator-sidebar-views.html + + \title Selecting Modes + + \image qtcreator-mode-selector.png + + The mode selector allows you to quickly switch between tasks such as editing + project and source files, designing application UIs, configuring how + projects are built and executed, and debugging your applications. To change + modes, click the icons, or use the \l{keyboard-shortcuts} + {corresponding keyboard shortcut}. + + To hide the mode selector and to save space on the display, select + \uicontrol Window > \uicontrol {Mode Selector Style} > \uicontrol Hidden. + To only show icons on the mode selector, select the \uicontrol {Icons Only} + style. + + The following image displays an example application in \uicontrol Edit mode (1) + and \uicontrol Design mode (2). + + \if defined(qtcreator) + \image qtcreator-qt-quick-editors.png "Edit mode and Design mode" + \else + \image studio-editors.png "Edit mode and Design mode" + \endif + + You can use \QC in the following modes: + + \list + + \li \uicontrol {\l{User Interface}{Welcome}} mode for opening projects. + + \li \uicontrol{\l{Coding}{Edit}} mode for editing project and source + files. + + \if defined(qtcreator) + \li \uicontrol{\l{Designing User Interfaces}{Design}} + \else + \li \uicontrol{\l{Editing QML Files in Design Mode}{Design}} + \endif + mode for designing and developing application user interfaces. + This mode is available for UI files. + + \if defined(qtcreator) + \li \uicontrol{\l{Debugging}{Debug}} + \else + \li \uicontrol {\l{Debugging and Profiling}{Debug}} + \endif + mode for inspecting the state of your + application while debugging and for using code analysis tools + to detect memory leaks and profile C++ or QML code. + + \if defined(qtcreator) + \li \uicontrol{\l{Specifying Build Settings}{Projects}} mode + for configuring project building and execution. + \else + \li \uicontrol{\l{Selecting the Preview Tool}{Projects}} mode + for selecting the tool to use for live preview. + \endif + This mode is available when a project is open. + + \li \uicontrol{\l{Using the Help Mode}{Help}} mode for viewing Qt + documentation. + + \endlist + + Certain actions in \QC trigger a mode change. Clicking on \uicontrol {Debug} > + \uicontrol {Start Debugging} > \uicontrol {Start Debugging} automatically switches to + \uicontrol {Debug} mode. +*/ + +/*! + \contentspage index.html + \page creator-output-panes.html + \previouspage creator-sidebar-views.html + \if defined(qtdesignstudio) + \nextpage creator-using-qt-quick-designer.html + \else + \nextpage creator-configuring.html + \endif + + \title Viewing Output + + \image qtcreator-task-pane.png + + The task pane in \QC can display one of the following panes: + + \list + + \li \uicontrol{Issues} + + \li \uicontrol{Search Results} + + \li \uicontrol{Application Output} + + \li \uicontrol{Compile Output} + + \li \uicontrol {QML Debugger Console} + + \li \uicontrol{General Messages} + + \li \uicontrol{Version Control} + + \if defined(qtcreator) + \li \uicontrol{Test Results} + + \li \uicontrol {To-Do Entries} + \endif + + \endlist + + Output panes are available in all \l{Selecting Modes}{modes}. Click the name + of an output pane to open the pane. To maximize an open output pane, click + the \uicontrol {Maximize Output Pane} button or press \key {Alt+9}. + + To search within the \uicontrol{Application Output} and \uicontrol{Compile Output} + panes, press \key {Ctrl+F} when the pane is active. Enter search criteria in + the \uicontrol Find field and click the left and right arrows to search down and + up in the pane. In these panes, you can also use the zoom buttons to increase and + decrease the text size of the output. + + To open the \uicontrol{General Messages} and + \if defined(qtcreator) + \l{Using Version Control Systems}{Version Control} + \else + \l{Using Git}{Version Control} + \endif + panes, select \uicontrol {Window > Output Panes}. + \if defined(qtcreator) + To display the \uicontrol {To-Do Entries} pane, enable the Todo plugin. + \endif + + For more information about the \uicontrol {QML Debugger Console} view, see + \l{Executing JavaScript Expressions}. + + \section1 Issues + + The \uicontrol{Issues} pane provides lists of following types of issues: + + \list + + \if defined(qtdesignstudio) + \li \uicontrol {Asset Importer Error} - Errors and warnings encountered + while importing assets from a design tool. + \endif + + \li \uicontrol {Build System} - Errors and warnings encountered during a + build. + + \if defined(qtcreator) + \li \uicontrol {Clang Code Model} - + \l {Parsing C++ Files with the Clang Code Model} + {Errors and warnings from the current editor}. + \endif + + \li \uicontrol Compile - Selected output from the compiler. Open the + \uicontrol {Compile Output} pane for more detailed information. + + \li \uicontrol{Debug Information} - Lists debug information packages that might + be missing. + + \if defined(qtcreator) + \li \uicontrol Debugger - Errors encountered while running the + \l{Analyzing Code}{Valgrind code analysis tools}. + \endif + + \li \uicontrol{Debugger Runtime} - Errors encountered when starting \QC. For + example, information about missing DLLs. + + \li \uicontrol Deployment - Errors encountered between building an application + successfully and starting it on a \l{glossary-device}{device}. + + \if defined(qtcreator) + \li \uicontrol {My Tasks} - Entries from a task list file (.tasks) generated + by \l{Showing Task List Files in Issues Pane} + {code scanning and analysis tools}. + + \li \uicontrol Python - Runtime errors and exceptions of Python scripts. + \endif + + \li \uicontrol QML and \uicontrol {QML Analysis} - + \l{JavaScript and QML Error Codes} + {QML and JavaScript syntax errors}. + + \endlist + + The pane filters out irrelevant output from the build tools and presents the + issues in an organized way. To further filter the output by type, select + \uicontrol {Filter Tree} + and then select a filter. + + \image qtcreator-build-issues.png + + Right-clicking on a line brings up a context menu with actions that you can + apply to the contents of the line. You can remove a line, copy its contents + to the clipboard, or search the Internet for a solution using the contents + of the line as search criteria. In addition, you can show a version control + annotation view of the line that causes the error message. + + To navigate to the corresponding source code, click an issue or + select \uicontrol {Show in Editor} in the context menu. The entry must contain the + name of the file where the issue was found. + + To view more information about an issue in the \uicontrol {Compile Output} pane, + select \uicontrol {Show Output} in the context menu. + + To jump from one issue to the next or previous one, press \key F6 and + \key Shift+F6. + + \section1 Search Results + + In the \uicontrol{Search Results} pane, you can search through projects, files on + a file system or the currently open files: + + \image qtcreator-search-results.png "Search Results output pane" + + The search results are stored in the search history (1) from which you can + select earlier searches. + + The figure below shows an example search result for all + occurrences of the search string in the specified directory. + + \image qtcreator-searchresults.png + + For more information about the different search options, see + \l {Finding and Replacing}. + + \section1 Application Output + + The \uicontrol{Application Output} pane displays the status of a program when + it is executed, and the debug output. + + \image qtcreator-application-output.png + + \if defined(qtcreator) + If you specify command line arguments in the run settings that are passed + to the application when running it, they are displayed as a part of the + application output. For more information, see + \l{Specifying Run Settings for Desktop Device Types}. + \endif + + Select toolbar buttons to run applications, to attach the debugger to the + running application, and to stop running or debugging. + + To specify settings for displaying application output, select + \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run} > + \uicontrol Application Output, or click the \uicontrol {Open Settings Page} + button. You can select whether to open the \uicontrol{Application Output} pane + on output when running or debugging applications, to clear old output on a new run, + to word-wrap output, and to limit output to the specified number of lines. + + \section1 Compile Output + + The \uicontrol{Compile Output} pane provides all output from the compiler. + The \uicontrol{Compile Output} is a more detailed version of information + displayed in the \uicontrol{Issues} pane. + + \image qtcreator-compile-pane.png + + Double-click on a file name in an error message to open the file in the + code editor. + + Select the \uicontrol {Cancel Build} button to cancel the build. + + To specify whether to open the \uicontrol {Compile Output} pane on output + when building applications, select \uicontrol Tools > \uicontrol Options > + \uicontrol {Build & Run} > \uicontrol Compile Output, and then select the + \uicontrol {Open pane when building} check box. + In the \uicontrol {Limit output to} field, you can specify the maximum + amount of build output lines to display in the pane. + + You can also reach the options page by clicking the \uicontrol {Open Settings Page} + button. + + \if defined(qtcreator) + \section1 To-Do Entries + + The \uicontrol {To-Do Entries} pane lists the BUG, FIXME, NOTE, TODO, and + WARNING keywords from the current file, from all project files, or from a + subproject. Click the icons on the toolbar to show only the selected + keywords. + + \image qtcreator-todo-pane.png + + To add keywords, select \uicontrol Tools > \uicontrol Options > + \uicontrol {To-Do} > \uicontrol Add. Set an icon and a line background color + for the keyword. + + \image qtcreator-todo-options.png + + To change the icon and line background color of the selected keyword, select + \uicontrol Edit. + + To remove the selected keyword, select \uicontrol Remove. + + To reset the list to predefined keywords, select \uicontrol Reset. All your + changes will be permanently lost. + + To determine whether the keywords in the whole project, in the current file, + or in a subproject are displayed by default, select the appropriate option + in the \uicontrol {Scanning scope} group. + + To exclude files from scanning, select \uicontrol {Project Settings} > + \uicontrol {To-Do} in the + \uicontrol Projects mode. Select \uicontrol Add and enter a regular + expression that matches the path to files to exclude. Use a forward slash + (/) as a separator in the path also on Windows. + + The Todo plugin is disabled by default. To enable the plugin, select + \uicontrol Help > \uicontrol {About Plugins} > \uicontrol Utilities > + \uicontrol Todo and restart + \QC. + + In addition, you can open task list files generated by code scanning and + analysis tools in the \uicontrol Issues pane. For more information, see + \l{Showing Task List Files in Issues Pane}. + \endif + + \section1 Changing Languages + + \QC has been localized into several languages. If the system language is one + of the supported languages, it is automatically selected. To change the + language, select \uicontrol {Tools > Options > Environment} and select a language + in the \uicontrol Language field. The change takes effect after you restart \QC. + + \section1 Viewing Images + + \QC opens image files in the image viewer. + + \image qtcreator-image-viewer.png "Image viewer" + + Use the toolbar buttons (1) or \l{Keyboard Shortcuts}{keyboard shortcuts} + to: + + \list + + \li Export SVG images to pixmaps + + \li Switch between background and outline modes + + \li Zoom in and out + + \li Fit images to screen + + \li Return to original size + + \li Play and pause animated GIF and MNG images + + \endlist + + \section1 Exporting SVG Images + + If you receive a freely scalable icon in the SVG format from an UI designer, + you can export it to several images of different sizes to create a set of + pixmaps. You can then use QIcon::addPixmap() to add the pixmaps to icons in + different modes and states. +*/ diff --git a/doc/src/projects/creator-only/creator-projects-generic.qdoc b/doc/src/projects/creator-only/creator-projects-generic.qdoc index 2a387de1a71..7c1f06ec35d 100644 --- a/doc/src/projects/creator-only/creator-projects-generic.qdoc +++ b/doc/src/projects/creator-only/creator-projects-generic.qdoc @@ -133,7 +133,7 @@ \section1 Forwarding Flags to Clang Code Model The \c {.cxxflags} and \c {.cflags} files contain command line flags for the - Clang code model, one flag per line. + Clang code model on a single line. For example, specify the \c {-std=c++11} to set the language version for parsing as C++11. diff --git a/doc/src/qtcreator-toc.qdoc b/doc/src/qtcreator-toc.qdoc index 3f9c7a7df5e..c2beb581b88 100644 --- a/doc/src/qtcreator-toc.qdoc +++ b/doc/src/qtcreator-toc.qdoc @@ -35,6 +35,11 @@ \list \li \l{IDE Overview} \li \l{User Interface} + \list + \li \l{Selecting Modes} + \li \l{Browsing Project Contents} + \li \l{Viewing Output} + \endlist \li \l{Configuring Qt Creator} \li \l{Building and Running an Example} \li \l{Tutorials} @@ -86,7 +91,6 @@ \li \l{Developing Qt Quick Applications} \list \li \l {Creating Qt Quick Projects} - \li \l {Qt Quick UI Forms} \li \l {Editing QML Files in Design Mode} \li \l {Creating Components} \list @@ -95,7 +99,7 @@ \endlist \li \l {Managing Item Hierarchy} \li \l {Specifying Item Properties} - \li \l {Editing PathView Properties} + \li \l {Creating Animations} \li \l {Adding Connections} \list \li \l{Connecting Objects to Signals} @@ -104,7 +108,9 @@ \li \l{Managing C++ Backend Objects} \endlist \li \l {Adding States} + \li \l {Editing PathView Properties} \li \l {Browsing ISO 7000 Icons} + \li \l {Qt Quick UI Forms} \li \l {Exporting Designs from Graphics Software} \li \l {Using QML Modules with Plugins} \li \l {Converting UI Projects to Applications} diff --git a/doc/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc b/doc/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc index 380192d9dd7..6f8b571bf89 100644 --- a/doc/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc +++ b/doc/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc @@ -100,7 +100,7 @@ to reference the rectangle from other places. \li Select the \uicontrol Layout tab, and then click - the \inlineimage anchor_fill.png + the \inlineimage anchor-fill.png (\uicontrol {Fill to Parent}) button to anchor the rectangle to the item. diff --git a/doc/src/qtquick/creator-only/qtquick-app-development.qdoc b/doc/src/qtquick/creator-only/qtquick-app-development.qdoc index 698dffa3aed..c1a1abac9a3 100644 --- a/doc/src/qtquick/creator-only/qtquick-app-development.qdoc +++ b/doc/src/qtquick/creator-only/qtquick-app-development.qdoc @@ -32,72 +32,137 @@ /*! \contentspage index.html - \previouspage creator-design-mode.html \page creator-visual-editor.html + \if defined(qtdesignstudio) + \previouspage quick-converting-ui-projects.html + \nextpage quick-components.html + \else + \previouspage creator-design-mode.html \nextpage quick-projects.html + \endif \title Developing Qt Quick Applications + \if defined(qtdesignstudio) + When you install \QDS, everything you'll need to design UIs + using \l{Qt Quick} and to preview them on the desktop or on Android or + embedded Linux devices is automatically installed and configured correctly + for you. + \endif + + Qt Quick enables you to build UIs around the behavior of + \e components and how they connect with one another. You + create components using Qt Quick and QML types that are available in + the Design mode. You can specify values for the \e properties of a + component to change its appearance and behavior. All QML types have a + set of predefined properties, some of which control things that are + visible to users, while others are used behind the scene. + + While it is useful to learn the basics of Qt Quick, you can also rely on + \QDS to write the code for you when you drag-and-drop the ready-made + components to the working area and change them to your liking by modifying + their properties in the Design mode. You can always check up details in + the extensive Qt Quick documentation by pressing \key F1. + \list + \if defined(qtcreator) \li \l {Creating Qt Quick Projects} You can use wizards to create Qt Quick projects. + \li \l {Editing QML Files in Design Mode} + + You can use the \uicontrol {Form Editor} or the + \uicontrol {Text Editor} in the Design mode to + develop Qt Quick applications. + \endif + + \li \l {Creating Components} + + In addition to your imported artwork, you can use the Design + mode to customize ready-made components or design any custom form + and shape directly as QML types. You can import visual assets in + various formats, such as PNG, JPG, and SVG for use in the + components. + + \li \l {Managing Item Hierarchy} + + You can manage the items in the current QML file and their + relationships in the \uicontrol Navigator. + + \li \l {Specifying Item Properties} + + You can specify values for the properties of a component to change + its appearance and behavior. All QML types have a set of predefined + properties. Some properties, such as position, size, and visibility, + are common to all QML types, whereas others are specific to the QML + type. You can specify properties for your components in the + \uicontrol Properties pane. + + \li \l {Creating Animations} + + You can use a timeline and keyframe based editor in the + \uicontrol Timeline view to animate the properties of UI + components. Animating properties enables their values to + move through intermediate values at specified keyframes + instead of immediately changing to the target value. + + \li \l {Adding Connections} + + You can create connections between the UI components and + the application to enable them to communicate with each other. For + example, how does the appearance of a button change on a mouse click + and which action does the application need to perform in response to + it. + + You can also create connections between UI components by + binding their properties together. This way, when the value of a + property changes in a parent component, it can be automatically + changed in all the child components, for example. + + \li \l {Adding States} + + Qt Quick allows you to declare various UI states that describe + how component properties change from a base state. Therefore, + states can be a useful way of organizing your UI + logic. You can associate transitions with items to define + how their properties will animate when they change due to a state + change. + \endlist + + \section1 Related Topics + + \list + \if defined(qtdesignstudio) + \li \l {Using Custom Fonts} + + You can load custom fonts to \QDS and use them in your designs. + \endif + + \li \l {Editing PathView Properties} + + You can use a graphical spline editor to specify \l{PathView} paths. + A path view lays out data provided by data models on a \l{Path}. + + \li \l {Browsing ISO 7000 Icons} + + You can add ISO 7000 icons from a library delivered with \QC to + UIs and change their color. + \li \l{Qt Quick UI Forms} Some of the wizards create Qt Quick projects that contain UI forms (.ui.qml files). The forms use a purely declarative subset of the QML language and you can edit them in the Design mode. - \li \l {Editing QML Files in Design Mode} - - You can use the \uicontrol {Form Editor} or the - \uicontrol {Text Editor} in the Design mode to - develop Qt Quick applications. - - \li \l {Creating Components} - - You can use basic QML types to create your own components that you - can combine with ready-made Qt Quick Controls and Layouts - (available since Qt 5.7). - - \li \l {Managing Item Hierarchy} - - You can manage the items in the current QML file and their - relationships in the \uicontrol Navigator. - - \li \l {Specifying Item Properties} - - You can specify properties for your components in the - \uicontrol Properties pane. - - \li \l {Editing PathView Properties} - - You can use a graphical spline editor to specify \l{PathView} paths. - A path view lays out data provided by data models on a \l{Path}. - - \li \l {Adding Connections} - - You can connect objects to signals, specify dynamic properties for - objects, and create bindings between the properties of two objects. - - \li \l {Adding States} - - You can use states to describe user interface configurations, such - as the UI controls, their properties and behavior, and the available - actions. - - \li \l {Browsing ISO 7000 Icons} - - You can add ISO 7000 icons from a library delivered with \QC to Qt - Quick applications and change their color (commercial only). - + \if defined(qtcreator) \li \l {Exporting Designs from Graphics Software} You can export designs from graphics software, such as Adobe Photoshop and GIMP, to QML files. You can then edit QML files in \QC. + \li \l {Using QML Modules with Plugins} QML modules may use plugins to expose components defined in C++ to @@ -105,12 +170,14 @@ details of the contained components, and therefore, the modules must provide extra type information for code completion and the semantic checks to work correctly. + \li \l {Converting UI Projects to Applications} Qt Quick UI projects (.qmlproject) are useful for creating user interfaces. To use them for application development, you have to convert them to Qt Quick Application projects that contain .pro, .cpp, and .qrc files. + \endif \endlist diff --git a/doc/src/qtquick/creator-only/qtquick-app-tutorial.qdoc b/doc/src/qtquick/creator-only/qtquick-app-tutorial.qdoc index 6592b10c45b..55fe9f421c8 100644 --- a/doc/src/qtquick/creator-only/qtquick-app-tutorial.qdoc +++ b/doc/src/qtquick/creator-only/qtquick-app-tutorial.qdoc @@ -58,7 +58,7 @@ \section1 Creating the Main View The main view of the application displays a Qt logo in the top left corner - of the screen and two empty rectangles. + of the view and two empty rectangles. To use the \e qt-logo.png image in your application, you must copy it from the Qt examples directory to the project directory (same subdirectory as @@ -117,22 +117,24 @@ \li In the \uicontrol {Border color} field, set the border color to \e #808080. - \li Click \uicontrol {Layout}, and then click the top and left - anchor buttons to anchor the rectangle to the top left corner of - the page. - - \image qmldesigner-tutorial-topleftrect-layout.png "Layout tab" + \li Click \uicontrol {Layout}, and then click the + \inlineimage anchor-top.png + (\uicontrol Top) and \inlineimage anchor-left.png + (\uicontrol Left) anchor buttons to anchor the + rectangle to the top left corner of the page. \li In the \uicontrol Margin field, select \e 20 for the top anchor and \e 10 for the left anchor. + \image qmldesigner-tutorial-topleftrect-layout.png "Anchor margins" + \endlist \li Drag and drop a \uicontrol {Mouse Area} type from the \uicontrol Library to \e topLeftRect in the navigator. \li Click \uicontrol {Layout}, and then click the - \inlineimage anchor_fill.png + \inlineimage anchor-fill.png (\uicontrol {Fill to Parent}) button to anchor the mouse area to the rectangle. @@ -147,9 +149,12 @@ \li In the \uicontrol Id field, enter \e middleRightRect. - \li In \uicontrol {Layout}, select the vertical center anchor button and - then the right anchor button to - anchor the rectangle to the middle right margin of the screen. + \li In \uicontrol {Layout}, select the + \inlineimage anchor-vertical-center.png + (\uicontrol {Vertical Center} anchor button and then the + \inlineimage anchor-right.png + (\uicontrol Right) anchor button to anchor the rectangle + to the middle right margin of its parent. \li In the \uicontrol Margin field, select \e 10 for the right anchor and \e 0 for the vertical center anchor. @@ -162,8 +167,11 @@ \li In the \uicontrol Id field, enter \e bottomLeftRect. - \li In \uicontrol {Layout}, select the bottom and left anchor buttons to - anchor the rectangle to the bottom left margin of the screen. + \li In \uicontrol {Layout}, select the + \inlineimage anchor-bottom.png + (\uicontrol Bottom) and \inlineimage anchor-left.png + (\uicontrol Left) anchor buttons to anchor the rectangle + to the bottom left margin of its parent. \li In the \uicontrol Margin field, select \e 20 for the bottom anchor and \e 10 for the left anchor. diff --git a/doc/src/qtquick/creator-only/qtquick-creating.qdoc b/doc/src/qtquick/creator-only/qtquick-creating.qdoc index 90a6e8d4f5f..011f57a5c18 100644 --- a/doc/src/qtquick/creator-only/qtquick-creating.qdoc +++ b/doc/src/qtquick/creator-only/qtquick-creating.qdoc @@ -242,7 +242,7 @@ files in the project folder belong to the project. Therefore, you do not need to individually list all the files in the project. - \li .qml file defines an UI item, such as a component, screen, or the + \li .qml file defines an UI item, such as a component or the whole application UI. \li ui.qml file defines a form for the application UI. This file is diff --git a/doc/src/qtquick/creator-only/qtquick-exporting-qml.qdoc b/doc/src/qtquick/creator-only/qtquick-exporting-qml.qdoc index fe48d2bc8b7..668bcc877ee 100644 --- a/doc/src/qtquick/creator-only/qtquick-exporting-qml.qdoc +++ b/doc/src/qtquick/creator-only/qtquick-exporting-qml.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -32,7 +32,7 @@ /*! \contentspage index.html - \previouspage qtquick-iso-icon-browser.html + \previouspage creator-quick-ui-forms.html \page quick-export-to-qml.html \nextpage creator-qml-modules-with-plugins.html diff --git a/doc/src/qtquick/qtquick-buttons.qdoc b/doc/src/qtquick/qtquick-buttons.qdoc index 0f7c5f5235e..104605a7b86 100644 --- a/doc/src/qtquick/qtquick-buttons.qdoc +++ b/doc/src/qtquick/qtquick-buttons.qdoc @@ -76,7 +76,7 @@ the rectangle and produce rounded corners for the button. \li Select \uicontrol {Layout}, and then select the - \inlineimage anchor_fill.png + \inlineimage anchor-fill.png (\uicontrol {Fill to Parent}) button to anchor the rectangle to the item. @@ -208,7 +208,7 @@ for example button_up.png. \li Click \uicontrol {Layout}, and then click the - \inlineimage anchor_fill.png + \inlineimage anchor-fill.png (\uicontrol {Fill to Parent}) button to anchor the border image to the \uicontrol Item. @@ -258,12 +258,11 @@ \endlist \li Click \uicontrol {Layout}, and then click the - \inlineimage anchor_vertical.png - (\uicontrol {Set Vertical Anchor}) and - \inlineimage anchor_horizontal.png - (\uicontrol {Set Horizontal Anchor}) - buttons to inherit the vertical and horizontal centering from - the parent. + \inlineimage anchor-vertical-center.png + (\uicontrol {Vertical Center}) and + \inlineimage anchor-horizontal-center.png + (\uicontrol {Horizontal Center}) buttons to inherit the + vertical and horizontal centering from the parent. \endlist diff --git a/doc/src/qtquick/qtquick-components.qdoc b/doc/src/qtquick/qtquick-components.qdoc index 090f031b801..36190f81060 100644 --- a/doc/src/qtquick/qtquick-components.qdoc +++ b/doc/src/qtquick/qtquick-components.qdoc @@ -142,14 +142,14 @@ \l{SwipeDelegate}{Swipe Delegate} delegate components are also available in the \uicontrol Library. - \section1 Positioning Items on Screens + \section1 Positioning Items in UIs - The position of an item on the canvas can be either absolute or relative - to other items. If you are designing a static user interface, + The position of an item in the UI can be either absolute or + relative to other items. If you are designing a static UI, \l{Important Concepts In Qt Quick - Positioning#manual-positioning} - {manual positioning} provides the most efficient form of positioning items - on the screen. For a dynamic user interface, you can employ the following - positioning methods provided by Qt Quick: + {manual positioning} provides the most efficient form of positioning + items. For a dynamic UI, you can employ the following positioning + methods provided by Qt Quick: \list \li \l{Setting Bindings} @@ -212,7 +212,7 @@ \image qmldesigner-anchor-buttons.png "Anchor buttons" - For convenience, you can click the \inlineimage anchor_fill.png + For convenience, you can click the \inlineimage anchor-fill.png (\uicontrol {Fill to Parent}) toolbar button to apply fill anchors to an item and the \inlineimage qtcreator-anchors-reset-icon.png (\uicontrol {Reset Anchors}) button to reset the anchors to their saved @@ -264,7 +264,7 @@ the layout managers used with standard Qt widgets, except that they are also containers in their own right. - You can use the following positioners to arrange items on screens: + You can use the following positioners to arrange items in UIs: \list \li \l[QML] {Column} arranges its child items vertically. @@ -283,11 +283,11 @@ \section2 Using Layouts Since Qt 5.1, you can use QML types in the \l{qtquicklayouts-index.html} - {Qt Quick Layouts} module to arrange Qt Quick items on screens. Unlike + {Qt Quick Layouts} module to arrange Qt Quick items in UIs. Unlike positioners, they manage both the positions and sizes of items in a - declarative interface. They are well suited for resizable user interfaces. + declarative interface. They are well suited for resizable UIs. - You can use the following layout types to arrange items on screens: + You can use the following layout types to arrange items in UIs: \list \li \l{Layout} provides attached properties for items pushed onto a @@ -337,7 +337,7 @@ \section2 Organizing Items Since Qt 5.7, you can use the following \l{Qt Quick Controls} types to - organize items on screens: + organize items in UIs: \list \li \l [QtQuickControls]{Frame} places a logical group of controls @@ -357,7 +357,7 @@ \section1 Adding User Interaction Methods You can use the following QML types to add basic interaction methods to - screens: + UIs: \list \li \l{Flickable} @@ -441,7 +441,7 @@ \section1 History of Qt Quick Controls In Qt 4, ready-made Qt Quick 1 Components were provided for creating - screens with a native look and feel for a particular target platform. + UIs with a native look and feel for a particular target platform. In Qt 5.1, Qt Quick Controls, Dialogs, and Layouts were added for creating classic desktop-style user interfaces using Qt Quick 2.1. The Qt Quick Controls Styles could be used to customize Qt Quick Controls. diff --git a/doc/src/qtquick/qtquick-designer.qdoc b/doc/src/qtquick/qtquick-designer.qdoc index ab3102d3dd7..df38bf01651 100644 --- a/doc/src/qtquick/qtquick-designer.qdoc +++ b/doc/src/qtquick/qtquick-designer.qdoc @@ -33,7 +33,7 @@ \contentspage index.html \page creator-using-qt-quick-designer.html \if defined(qtdesignstudio) - \previouspage creator-quick-tour.html + \previouspage creator-modes.html \nextpage {Tutorials} \else \previouspage creator-quick-ui-forms.html @@ -157,7 +157,7 @@ The width and height of the root item in a QML file determine the size of the component. You can reuse components, such as buttons, in different - sizes in other QML files and design screens for use with different device + sizes in other QML files and design UIs for use with different device profiles, screen resolution, or screen orientation. The component size might also be zero (0,0) if its final size is determined by property bindings. diff --git a/doc/src/qtquick/qtquick-pathview-editor.qdoc b/doc/src/qtquick/qtquick-pathview-editor.qdoc index 872cd4cd8e7..bd4f4bd8519 100644 --- a/doc/src/qtquick/qtquick-pathview-editor.qdoc +++ b/doc/src/qtquick/qtquick-pathview-editor.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -28,11 +28,10 @@ \page qmldesigner-pathview-editor.html \if defined(qtdesignstudio) \previouspage studio-fonts.html - \nextpage qtquick-iso-icon-browser.html \else - \previouspage qtquick-properties.html - \nextpage qmldesigner-connections.html + \previouspage quick-states.html \endif + \nextpage qtquick-iso-icon-browser.html \title Editing PathView Properties diff --git a/doc/src/qtquick/qtquick-properties.qdoc b/doc/src/qtquick/qtquick-properties.qdoc index 41e1086f8ad..5f6759b9c45 100644 --- a/doc/src/qtquick/qtquick-properties.qdoc +++ b/doc/src/qtquick/qtquick-properties.qdoc @@ -27,11 +27,7 @@ \contentspage {Qt Creator Manual} \page qtquick-properties.html \previouspage qtquick-navigator.html - \if defined(qtdesignstudio) \nextpage studio-timeline.html - \else - \nextpage qmldesigner-pathview-editor.html - \endif \title Specifying Item Properties diff --git a/doc/src/qtquick/qtquick-states.qdoc b/doc/src/qtquick/qtquick-states.qdoc index c316df4575c..2cf02445210 100644 --- a/doc/src/qtquick/qtquick-states.qdoc +++ b/doc/src/qtquick/qtquick-states.qdoc @@ -31,7 +31,7 @@ \nextpage studio-fonts.html \else \previouspage quick-connections-backend.html - \nextpage qtquick-iso-icon-browser.html + \nextpage qmldesigner-pathview-editor.html \endif \title Adding States @@ -60,7 +60,7 @@ \li Start, stop or pause animations. \li Execute some script required in the new state. \li Change a property value for a particular item. - \li Show a different view or screen. + \li Show a different view. \endlist The \uicontrol States pane displays the different \l{State}{states} @@ -73,7 +73,7 @@ To add states, click the \inlineimage plus.png button. Then modify the new state in the editor. For example, to change the appearance of a button, you can hide the button image and show another image - in its place. Or, to add movement to the screen, you can change the position + in its place. Or, to add movement to the view, you can change the position of an object on the canvas and then add animation to the change between the states. @@ -88,7 +88,7 @@ QML states typically describe user interface configurations, such as the UI controls, their properties and behavior and the available actions. For - example, you can use states to create two screens. + example, you can use states to create two views. To add states, click the empty slot in the \uicontrol States pane. Then modify the new state in the \uicontrol {Form Editor} or the @@ -106,7 +106,7 @@ This allows you to: \list - \li Align items on different screens with each other. + \li Align items on different views with each other. \li Avoid excessive property changes. If an item is invisible in the base state, you must define all changes to its child types as property changes, which leads to complicated QML code. @@ -116,13 +116,13 @@ states. \endlist - To create screens for an application by using states: + To create views for an application by using states: \list 1 \li In the base state, add all items you will need in the application - (1). While you work on one screen, you can click the + (1). While you work on one view, you can click the \inlineimage eye_open.png - icon to hide items on the canvas that are not part of a screen. + icon to hide items on the canvas that are not part of a view. \li In the \uicontrol States pane, click the empty slot to create a new state and give it a name. For example, \c Normal. \li In the \uicontrol Properties pane (2), deselect the @@ -130,9 +130,9 @@ for each item that is not needed in this view. If you specify the setting for the parent item, all child items inherit it and are also hidden. - \image qmldesigner-screen-design.png "Designing screens" - \li Create additional states for each screen and set the visibility - or opacity of the items in the screen. + \image qmldesigner-screen-design.png "Designing views" + \li Create additional states for each view and set the visibility + or opacity of the items in the view. \li To determine which view opens when the application starts, use the \uicontrol {Text Editor} to set the state of the root item of the .qml file, as specified by the following code snippet: diff --git a/doc/src/qtquick/qtquick-timeline.qdoc b/doc/src/qtquick/qtquick-timeline.qdoc new file mode 100644 index 00000000000..0904fd908da --- /dev/null +++ b/doc/src/qtquick/qtquick-timeline.qdoc @@ -0,0 +1,322 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Creator documentation. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** +****************************************************************************/ + +/*! + \contentspage {Qt Design Studio Manual} + \previouspage qtquick-properties.html + \page studio-timeline.html + \nextpage qmldesigner-connections.html + + \title Creating Animations + + You can use the timeline and keyframe based editor in the + \uicontrol Timeline view to animate the properties of UI components. + Animating properties enables their values to move through intermediate + values instead of immediately changing to the target value. For example, + to move an item in a scene, you can animate the properties that control + the item's position, x and y, so that the item's position changes at + keyframes on the way to the target position. Similarly, you could change + the color and scale properties of the item at keyframes to make it appear + to move closer or farther away. + + Qt Quick allows you to declare various UI states in \l State objects. + These states are comprised of property changes from a base state, and + can be a useful way of organizing your UI logic. Transitions are objects + you can associate with an item to define how its properties will animate + when they change due to a state change. + + You can find a video tutorial about creating timelines and adding keyframes + \l{https://resources.qt.io/development-topic-ui-design/qtdesignstudio-clustertutorial-parttwo} + {here}. + + \if defined(qtcreator) + \section1 Enabling the Timeline Editor + + The \uicontrol Timeline view is not visible in \QC by default. To enable + it, select \uicontrol Tools > \uicontrol Options > \uicontrol {Qt Quick} > + \uicontrol {Qt Quick Designer} > \uicontrol {Enable Timeline editor}. You + need to restart \QC for the \uicontrol Timeline view to appear. + + To be able to create timelines, you also need the Qt Quick Timeline module. + At the time of this writing, the module is not available as a library in + the Qt installer, and therefore you must check out the repository and build + the module yourself using the same Qt version that you used to build \QC. + + You can check out the module from + \l{https://codereview.qt-project.org/#/admin/projects/qt/qtquicktimeline} + {Qt Code Review Tool}. + \endif + + \section1 Creating Timelines + + You specify settings for the timeline and for running the animation in the + \uicontrol {Timeline Settings} dialog. + + \image studio-timeline-settings.png "Timeline Settings dialog" + + To create a timeline to animate a UI component: + + \list 1 + \li In the \uicontrol Navigator, select the item to animate. + \li Select the \uicontrol Timeline tab to open the \uicontrol Timeline + view. + \li Select the \inlineimage plus.png + (\uicontrol {Add Timeline (A)}) button, or press \key {A} to + specify settings for the timeline and running the animation + in the \uicontrol {Timeline Settings} dialog. + \li In the \uicontrol {Timeline ID} field, enter a name that describes + the animated item. + \li In the \uicontrol {End frame} field, set the duration of the + animation. + \li To use bindings to specify the properties, select the + \uicontrol {Expression binding} radio button and enter the binding + in the \uicontrol {Expression binding} field. For more information + about property binding, see \l{Setting Bindings}. + \li To create a timeline animation, select the \uicontrol Animation + radio button. + \li In the \uicontrol timelineAnimation tab, \uicontrol {Animation ID} + field, enter a name for the animation. + \li Select the \uicontrol {Running in Base State} check box to use the + settings in this tab when previewing the UI. Deselect the check box + to use the default settings. + \li In the \uicontrol {Start frame} field, set the first frame of the + animation. + \li In the \uicontrol {End frame} field, set the last frame of the + animation. + \li In the \uicontrol {Duration} field, set the length of the + animation from the start frame to the end frame. If you set a + shorter duration than the number of frames, frames are left out + from the end of the animation when viewing it. + \li Select the \uicontrol Continuous check box to loop the animation + indefinitely. + \li In the \uicontrol Loops field, select the number of times to run + the animation as a loop. The default number of loops is one, which + means that you must restart the animation to see it again + \li Select the \uicontrol {Ping pong} check box to play the animation + backwards back to the beginning when it reaches the end. + \li In the \uicontrol {Transitions to states} field, select the state + to switch to when the animation finishes. + \li Select \uicontrol Close to close the dialog and save the settings. + \endlist + + To create additional timelines, select the \inlineimage plus.png + (\uicontrol {Add Timeline}) button next to the \uicontrol timeline tab. + + To specify settings for running the timeline animations, select the + \inlineimage plus.png + (\uicontrol {Add Animation}) button next to the + \uicontrol {Animation Settings} group. For example, you could create + settings for running a part of the timeline animation between specified + frames or for running the animation backwards from the last frame to the + first. + + To modify the settings, select the \inlineimage animation.png + (\uicontrol {Timeline Settings (S)}) button on the toolbar + (or press \key S) in the \uicontrol Timeline view. + + \section2 Binding Animations to States + + The table at the bottom of the \uicontrol {Timeline Settings} dialog lists + the available states. Double-click the values in the \uicontrol Timeline + and \uicontrol Animation column to bind the states to animations. In the + \uicontrol {Fixed Frame} column, you can bind the states that don't have + animations to fixed frames. + + \section1 Managing Keyframes + + To animate components in the \uicontrol Timeline view, move to a frame + on the timeline and specify changes in the values of a property. \QDS + automatically adds keyframes between two keyframes, and sets their values + evenly to create an appearance of movement or transformation. + + \section2 Navigating the Timeline + + \image studio-timeline.png "Timeline view" + + You can navigate the timeline in the following ways: + + \list + \li Drag the playhead (1) to a frame. + \li Click on the ruler (2) to move to a frame. + \li Select the \uicontrol {To Start (Home)}, \uicontrol {Previous (,)}, + or \uicontrol {Next (.)} buttons (3), or use the keyboard shortcuts + to move to the first, previous, or next frame on the timeline. + \li Enter the number of a frame in the field (4) to move to that frame. + \li Select the \uicontrol Previous and \uicontrol Next buttons next to + a property name on the timeline (5) to move to the previous or next + keyframe for that property. + \endlist + + \section2 Setting Keyframe Values + + You can insert keyframes for all the properties of all the components that + you want to animate first, and then record the changes in their values by + selecting the \inlineimage recordfill.png + (\uicontrol {Per Property Recording}) button for one property at a time. + For example, you can hide and show items by turning their visibility off and + on or by setting their opacity to 0 or 1. + + You can also select the \uicontrol {Auto Key (K)} button (or press \key K) + to record changes in property values, but you need to be more careful about + which property values you are changing to avoid surprises. + + To record the changes of property values: + + \list 1 + \li In the \uicontrol Navigator, select the item to animate. + \li In the \uicontrol Properties view, select \uicontrol Settings > + \uicontrol {Insert Keyframe} for the property that you want to + animate. + \li Select the \uicontrol {Per Property Recording} button to start + recording property changes. + \li Check that the playhead is in frame 0 and enter the value of the + property in the field next to the property name on the timeline. + Press \key Enter to save the value. + \li Move the playhead to another frame on the timeline and specify + the value at that frame. + \li When you have specified as many values as you need, select + \uicontrol {Per Property Recording} again to stop recording. + \endlist + + To remove all the changes you recorded for a property, right-click the + property name on the timeline and select \uicontrol {Remove Property}. + + Keyframes a marked on the timeline by using markers of different colors and + shapes, depending on whether they are active or inactive or whether you have + applied easing curves to them, for example. + + To edit the value of the selected keyframe, select + \uicontrol {Edit Value for Keyframe} in the context menu. + + You can copy the keyframes from the keyframe track for an item and + paste them to the keyframe track of another item. To copy all + keyframes from one item to another one, select an item, and then + select \uicontrol {Copy All Keyframes} in the context menu. Then + select the other item and select \uicontrol {Paste Keyframes} in + the context menu. + + To delete the selected keyframe, select \uicontrol {Delete Keyframe} in the + context menu. + + To delete all keyframes from the selected item, select + \uicontrol {Delete All Keyframes} in the context menu. + + To add keyframes to the keyframe track of an item at the current position + of the playhead select \uicontrol {Add Keyframes at Current Frame}. + + \section1 Viewing the Animation + + You can view the animation on the canvas by moving the playhead along the + timeline. + + \if defined(qtdesignstudio) + To preview the animation, select the \uicontrol {Play (Space)} + button or press \key Space. To preview the whole UI, select the + \inlineimage live_preview.png + (\uicontrol {Show Live Preview}) button on the canvas toolbar + or press \key {Alt+P}. + \endif + + \section1 Editing Easing Curves + + \e Easing specifies the rate of a property value over time, so that + components can appear to pick up speed, slow down, or bounce back at the + end of the animation. By default, the animations you specify on the + timeline are \e linear, which means that they move from the beginning to + the end at a constant speed. You can use the curve picker to edit the + easing curve at a keyframe. + + \image studio-curve-picker.png + + You can use the preset curves or modify them by dragging the curve handlers + around. You can add points to the curve and drag them and the point handlers + to modify the curve. When you are happy with the curve, you can save it as a + custom curve. For more information about easing curve types, see the + documentation for \l [QML] {PropertyAnimation}{easing curves}. + + To zoom into and out of the easing curve editor, use the mouse roller. To + reset the zoom factor, right-click in the editor and select + \uicontrol {Reset Zoom}. + + To select easing curves: + + \list 1 + \li Select a keyframe on the timeline. + \li Select \uicontrol {Curve Picker (C)} on the toolbar, or press + \key C to open the \uicontrol {Easing Curve Editor} dialog. + \li Select an easing curve in the \uicontrol Presets tab. + \li In the \uicontrol {Duration (ms)} field, select the duration of the + easing function in milliseconds. + \li Select \uicontrol Preview to preview the curve. + \li Select \uicontrol OK to attach the easing curve to the keyframe + and to close the curve picker. + \endlist + + When you attach easing curves to keyframes, the shape of the keyframe + marker changes from \inlineimage keyframe_linear_inactive.png + to \inlineimage keyframe_manualbezier_inactive.png + . + + To customize easing curves: + + \list 1 + \li In the \uicontrol {Easing Curve Editor} dialog, select an easing + curve in the \uicontrol Presets tab. + \li Drag the curve handlers to modify the curve. + \li Right-click in the editor, and select \uicontrol {Add Point} to add + points to the curve. + \li Drag the points or the point handlers to modify the curve. If the + curve becomes invalid, it turns red in the editor and the + \uicontrol Save button is disabled. + \li Select \uicontrol Save to save your changes to the curve. + \li In the \uicontrol Name field, enter a name for the custom curve, + and then select \uicontrol OK to save the curve in the + \uicontrol Custom tab. + \endlist + + To paste easing curve definitions to the curve picker as text, select + the \uicontrol Text tab. + + \section1 Rotating Items + + To animate components that rotate around a central point, you can use the + \l Item QML type as a parent for the rotating component. Then create a + timeline for the Item and set the rotation property for the start and end + keyframes. + + \if defined(qtdesignstudio) + \section1 Animating Shapes + + You can use the Studio components to animate the following shapes: + + \list + \li Arc + \li Border + \li Pie + \li Rectangle + \li Triangle + \endlist + \endif +*/ diff --git a/doc/src/qtquick/qtquick-ui-forms.qdoc b/doc/src/qtquick/qtquick-ui-forms.qdoc index fe4f7d5ee45..16ce57a7e72 100644 --- a/doc/src/qtquick/qtquick-ui-forms.qdoc +++ b/doc/src/qtquick/qtquick-ui-forms.qdoc @@ -33,12 +33,11 @@ \contentspage index.html \page creator-quick-ui-forms.html - \if defined(qtdesignstudio) \previouspage qtquick-iso-icon-browser.html + \if defined(qtdesignstudio) \nextpage studio-live-preview.html \else - \previouspage quick-projects.html - \nextpage creator-using-qt-quick-designer.html + \nextpage quick-export-to-qml.html \endif \title Qt Quick UI Forms diff --git a/scripts/createSourcePackages.py b/scripts/createSourcePackages.py index 1385de943aa..1e1bdead926 100755 --- a/scripts/createSourcePackages.py +++ b/scripts/createSourcePackages.py @@ -99,9 +99,9 @@ def main(): args = parse_arguments() base_repo_name = args.name if args.name else "qtcreator" if not args.name and not args.modules: # default Qt Creator repository - qbs_path = os.path.join('src', 'shared', 'qbs') - if os.path.exists(os.path.join(args.repo, qbs_path)): - args.modules = [qbs_path] + submodules = [os.path.join('src', 'shared', 'qbs'), + os.path.join('src', 'tools', 'perfparser')] + args.modules = [path for path in submodules if os.path.exists(os.path.join(args.repo, path, '.git'))] repos = [(base_repo_name, args.repo, '')] for module in args.modules: repos += [(module, os.path.join(args.repo, module), module + os.sep)] diff --git a/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json index 7d059b8d4cd..8a726cc09c5 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json @@ -129,6 +129,16 @@ } ] }, + { + "trDisplayName": "Kit Selection", + "trShortTitle": "Kits", + "typeId": "Kits", + "enabled": "%{JS: ! %{IsSubproject}}", + "data": { + "projectFilePath": "%{QmlProjectFileName}", + "requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ] + } + }, { "trDisplayName": "Project Management", "trShortTitle": "Summary", diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 1553ca0d324..9ab7ec3301a 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -40,7 +40,7 @@ New Folder - Neuer Ordner + Neues Verzeichnis Bookmarks @@ -48,15 +48,15 @@ Delete Folder - Ordner löschen + Verzeichnis löschen Rename Folder - Ordner umbenennen + Verzeichnis umbenennen Add in folder: - Im Ordner: + Im Verzeichnis: @@ -71,11 +71,11 @@ Deleting a folder also removes its content.<br>Do you want to continue? - Beim Löschen eines Ordners wird auch dessen Inhalt gelöscht.<br>Möchten Sie trotzdem fortsetzen? + Beim Löschen eines Verzeichnisses wird auch dessen Inhalt gelöscht.<br>Möchten Sie trotzdem fortsetzen? New Folder - Neuer Ordner + Neues Verzeichnis Bookmark @@ -86,11 +86,11 @@ BookmarkWidget Delete Folder - Ordner löschen + Verzeichnis löschen Rename Folder - Ordner umbenennen + Verzeichnis umbenennen Show Bookmark @@ -4288,7 +4288,7 @@ Grund: %3 Project Name and Location - Name und Ordner des Projekts + Name und Verzeichnis des Projekts Project name: @@ -4339,7 +4339,7 @@ Grund: %3 Select Git Directory - Git-Ordner auswählen + Git-Verzeichnis auswählen Error: Unknown reference @@ -5157,11 +5157,11 @@ Jetzt Commit ausführen? Gitk for folder of Current File - Gitk für Ordner der Datei + Gitk für Verzeichnis der Datei Gitk for folder of "%1" - Gitk für Ordner von "%1" + Gitk für Verzeichnis von "%1" Git Gui @@ -7082,7 +7082,7 @@ konnte dem Projekt "%2" nicht hinzugefügt werden. A version control system repository could not be created in "%1". - Das Versionskontrollsystem konnte im Ordner "%1" kein Repository anlegen. + Das Versionskontrollsystem konnte im Verzeichnis "%1" kein Repository anlegen. Failed to add "%1" to the version control system. @@ -8937,7 +8937,7 @@ Rename %2 to %3 anyway? Choose Directory - Ordner wählen + Verzeichnis wählen Choose Executable @@ -9047,7 +9047,7 @@ Rename %2 to %3 anyway? Use as default project location - Als Vorgabe für Projektordner verwenden + Als Vorgabe für Projektverzeichnis verwenden Introduction and Project Location @@ -9742,7 +9742,7 @@ Sie können die Änderungen in einem Stash ablegen oder zurücksetzen.Utils::UnixTools <table border=1 cellspacing=0 cellpadding=3><tr><th>Variable</th><th>Expands to</th></tr><tr><td>%d</td><td>directory of current file</td></tr><tr><td>%f</td><td>file name (with full path)</td></tr><tr><td>%n</td><td>file name (without path)</td></tr><tr><td>%%</td><td>%</td></tr></table> - <table border=1 cellspacing=0 cellpadding=3><tr><th>Variable</th><th>Expandiert zu</th></tr><tr><td>%d</td><td>Ordner der aktuellen Datei</td></tr><tr><td>%f</td><td>Dateiname mit vollständigem Pfad</td></tr><tr><td>%n</td><td>Dateiname (ohne Pfad)</td></tr><tr><td>%%</td><td>%</td></tr></table> + <table border=1 cellspacing=0 cellpadding=3><tr><th>Variable</th><th>Expandiert zu</th></tr><tr><td>%d</td><td>Verzeichnis der aktuellen Datei</td></tr><tr><td>%f</td><td>Dateiname mit vollständigem Pfad</td></tr><tr><td>%n</td><td>Dateiname (ohne Pfad)</td></tr><tr><td>%%</td><td>%</td></tr></table> @@ -10718,7 +10718,7 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML. Choose Repository Directory - Ordner für Repository wählen + Verzeichnis für Repository wählen The file "%1" could not be deleted. @@ -10730,7 +10730,7 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML. The directory "%1" is already managed by a version control system (%2). Would you like to specify another directory? - Der Ordner "%1" steht bereits unter Verwaltung eines Versionskontrollsystems (%2). Möchten Sie einen anderen Ordner angeben? + Das Verzeichnis "%1" steht bereits unter Verwaltung eines Versionskontrollsystems (%2). Möchten Sie einen anderes Verzeichnis angeben? Repository already under version control @@ -10746,7 +10746,7 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML. A version control repository has been created in %1. - Ein Repository für Versionskontrolle wurde im Ordner %1 erstellt. + Ein Repository für Versionskontrolle wurde im Verzeichnis %1 erstellt. Commit @@ -10755,7 +10755,7 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML. A version control repository could not be created in %1. - Im Ordner %1 konnte kein Repository für die Versionskontrolle erstellt werden. + Im Verzeichnis %1 konnte kein Repository für die Versionskontrolle erstellt werden. @@ -11379,7 +11379,7 @@ Für CMake-Projekte stellen Sie sicher, dass die Variable QML_IMPORT_PATH in CMa Qt Creator build: - Qt Creator-Build-Ordner: + Qt Creator-Build-Verzeichnis: Deploy into: @@ -12333,11 +12333,11 @@ Wenn Sie %2 aus den Quelltexten erstellen und eine ausführbare CDB-Datei mit ei The folder "%1" could not be created. - Der Ordner "%1" konnte nicht angelegt werden. + Das Verzeichnis "%1" konnte nicht angelegt werden. Cannot Create - Ordner kann nicht angelegt werden + Verzeichnis kann nicht angelegt werden @@ -13179,7 +13179,7 @@ konnte nicht unter Versionsverwaltung (%2) gestellt werden Debugger::Internal::StartRemoteCdbDialog <html><body><p>The remote CDB needs to load the matching %1 CDB extension (<code>%2</code> or <code>%3</code>, respectively).</p><p>Copy it onto the remote machine and set the environment variable <code>%4</code> to point to its folder.</p><p>Launch the remote CDB as <code>%5 &lt;executable&gt;</code> to use TCP/IP as communication protocol.</p><p>Enter the connection parameters as:</p><pre>%6</pre></body></html> - <html><body><p>Der entfernte CDB muss die passende CDB-Erweiterungsbibliothek von %1 (<code>%2</code> beziehungsweise <code>%3</code>) laden.</p><p>Kopieren Sie sie auf den entfernten Rechner und setzen Sie die Umgebungsvariable <code>%4</code> auf den Ordner.</p><p>Starten Sie den entfernten CDB als <code>%5 &lt;ausführbare Datei&gt;</code> um TCP/IP als Kommunikationsprotokoll zu verwenden.</p><p>Geben Sie die Verbindungsparameter wie folgt an:</p><pre>%6</pre></body></html> + <html><body><p>Der entfernte CDB muss die passende CDB-Erweiterungsbibliothek von %1 (<code>%2</code> beziehungsweise <code>%3</code>) laden.</p><p>Kopieren Sie sie auf den entfernten Rechner und setzen Sie die Umgebungsvariable <code>%4</code> auf das Verzeichnis.</p><p>Starten Sie den entfernten CDB als <code>%5 &lt;ausführbare Datei&gt;</code> um TCP/IP als Kommunikationsprotokoll zu verwenden.</p><p>Geben Sie die Verbindungsparameter wie folgt an:</p><pre>%6</pre></body></html> Start a CDB Remote Session @@ -14026,7 +14026,7 @@ Lokale Commits werden nicht zum Master-Branch gepusht, bis ein normaler Commit e Use existing directory - Vorhandenen Ordner verwenden + Vorhandenes Verzeichnis verwenden Create prefix @@ -14063,8 +14063,8 @@ Lokale Commits werden nicht zum Master-Branch gepusht, bis ein normaler Commit e By default, push will fail if the target directory exists, but does not already have a control directory. This flag will allow push to proceed. - Normalerweise schlägt eine push-Operation fehl, wenn das Zielverzeichnis vorhanden ist, aber keinen Versionskontroll-Ordner hat. -Die Einstellung gestattet es, unter diesem Umständen fortzusetzen. + Normalerweise schlägt eine push-Operation fehl, wenn das Zielverzeichnis vorhanden ist, aber kein Versionskontrollverzeichnis hat. +Die Einstellung gestattet es, unter diesen Umständen fortzusetzen. For example: 'https://[user[:pass]@]host[:port]/[path]'. @@ -14898,7 +14898,7 @@ Lokale Pull-Operationen werden nicht auf den Master-Branch angewandt. Directory - Ordner + Verzeichnis File @@ -16507,7 +16507,7 @@ Wollen Sie die Daten vorher speichern? TextEditor::Internal::SnippetsCollection Cannot create user snippet directory %1 - Der Snippet-Ordner des Nutzers konnte nicht erstellt werden: %1 + Das Snippet-Verzeichnis des Nutzers konnte nicht erstellt werden: %1 @@ -17279,7 +17279,7 @@ Zusätzlich wird die Verbindung zum Gerät getestet. Show Containing Folder - Beinhaltenden Ordner anzeigen + Beinhaltendes Verzeichnis anzeigen Open Command Prompt Here @@ -17302,7 +17302,7 @@ Zusätzlich wird die Verbindung zum Gerät getestet. BaseFileWizard Unable to create the directory %1. - Der Ordner %1 kann nicht erstellt werden. + Das Verzeichnis %1 kann nicht erstellt werden. @@ -17789,11 +17789,11 @@ Außer: %3 Director&y: - &Ordner: + &Verzeichnis: Directory to Search - Suchordner + Suchverzeichnis @@ -18937,7 +18937,7 @@ should a repository require SSH-authentication (see documentation on SSH and the Reset information about which version control system handles which directory. - Die Zuordnung, welches Versionsverwaltungssystem welchen Ordner behandelt, zurücksetzen. + Die Zuordnung, welches Versionsverwaltungssystem welches Verzeichnis behandelt, zurücksetzen. Reset VCS Cache @@ -19053,7 +19053,7 @@ should a repository require SSH-authentication (see documentation on SSH and the Build Location - Build-Ordner + Build-Verzeichnis @@ -20063,7 +20063,7 @@ should a repository require SSH-authentication (see documentation on SSH and the Select Android SDK folder - Android-SDK-Ordner auswählen + Android-SDK-Verzeichnis auswählen JDK path exists. @@ -20123,7 +20123,7 @@ should a repository require SSH-authentication (see documentation on SSH and the Select Android NDK folder - Android-NDK-Ordner auswählen + Android-NDK-Verzeichnis auswählen Android SDK installation is missing necessary packages. Do you want to install the missing packages? @@ -20483,7 +20483,7 @@ were not verified among remotes in %3. Select different folder? Change host %1 und Projekt %2 -gehören nicht zu den verifizierten Remotes in %3. Anderen Ordner angeben? +gehören nicht zu den verifizierten Remotes in %3. Anderes Verzeichnis angeben? Enter Local Repository for "%1" (%2) @@ -21515,7 +21515,7 @@ hinzufügen, um dem QML-Editor den wahrscheinlichen URI mitzuteilen. DiffUtils is available for free download at http://gnuwin32.sourceforge.net/packages/diffutils.htm. Extract it to a directory in your PATH. - DiffUtils sind kostenlos erhältlich unter http://gnuwin32.sourceforge.net/packages/diffutils.htm . Bitte entpacken Sie sie in einen im Suchpfad befindlichen Ordner. + DiffUtils sind kostenlos erhältlich unter http://gnuwin32.sourceforge.net/packages/diffutils.htm . Bitte entpacken Sie sie in ein im Suchpfad befindliches Verzeichnis. @@ -21814,7 +21814,7 @@ Sie können hier eine andere Verbindung wählen, beispielsweise eine serielle Ve Sys Root "%1" is not a directory. - Sys-Root "%1" ist kein Ordner. + Sys-Root "%1" ist kein Verzeichnis. Sys Root "%1" is empty. @@ -23033,7 +23033,7 @@ Weitere Informationen finden Sie auf der Dokumentationsseite "Checking Code File or directory does not exist. - Datei oder Ordner existiert nicht. + Datei oder Verzeichnis existiert nicht. Invalid color. @@ -26562,7 +26562,7 @@ Möchten Sie das vorhandene Paket deinstallieren? Library inside "debug" or "release" subfolder - Bibliothek innerhalb "debug" oder "release" Unterordner + Bibliothek innerhalb "debug" oder "release" Unterverzeichnis Add "d" suffix for debug version @@ -27074,7 +27074,7 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü QmakeProjectManager::Internal::SubdirsProjectWizardDialog This wizard generates a Qt Subdirs project. Add subprojects to it later on by using the other wizards. - Dieser Assistent erstellt ein Qt-Projekt vom Typ subdirs. Mit Hilfe der anderen Assistenten können später Unterprojekte hinzugefügt werden. + Dieser Assistent erstellt ein Qt-Projekt vom Typ subdirs. Unterprojekte können später mit anderen Assistenten hinzugefügt werden. @@ -27212,7 +27212,7 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü A build for a different project exists in %1, which will be overwritten. %1 build directory - Im Ordner %1 existiert bereits ein Build eines anderen Projektes, welcher überschrieben wird. + Im Verzeichnis %1 existiert bereits ein Build eines anderen Projektes, welcher überschrieben wird. @@ -27826,7 +27826,7 @@ Um es abzurufen, tippen Sie das Kürzel im Locator, gefolgt von einem Leerzeiche Locator filters that do not update their cached data immediately, such as the custom directory filters, update it after this time interval. - Locator-Filter, die ihre gespeicherten Daten nicht unmittelbar aktualisieren (wie die benutzerdefinierten Filter für Ordner), aktualisieren ihre Daten nach diesem Intervall. + Locator-Filter, die ihre gespeicherten Daten nicht unmittelbar aktualisieren (wie die benutzerdefinierten Filter für Verzeichnisse), aktualisieren ihre Daten nach diesem Intervall. Refresh interval: @@ -28825,7 +28825,7 @@ Möchten Sie es beenden? Remote directory: - Entfernter Ordner: + Entferntes Verzeichnis: Close @@ -30198,7 +30198,7 @@ Der vom Kit mindestens benötigte API-Level ist %1. The following files already exist in the folder %1. Would you like to overwrite them? - Die folgenden Dateien existieren bereits im Ordner + Die folgenden Dateien existieren bereits im Verzeichnis %1. Sollen sie überschrieben werden? @@ -37461,9 +37461,9 @@ Leer lassen, um das Dateisystem zu durchsuchen. Not showing %n files that are outside of the base directory. These files are preserved. - Eine Datei, die sich außerhalb des Basisordners befindet, wird nicht angezeigt. + Eine Datei, die sich außerhalb des Basisverzeichnisses befindet, wird nicht angezeigt. Sie wird erhalten. - %n Dateien, die sich außerhalb des Basisordners befinden, werden nicht angezeigt. + %n Dateien, die sich außerhalb des Basisverzeichnisses befinden, werden nicht angezeigt. Sie werden erhalten. @@ -46492,7 +46492,7 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni SyntaxHighlightingCLI Command line syntax highlighter using Kate syntax definitions. - Kommandozeilen-Syntaxhervorhebung mit Hilfe von Kate-Syntaxdefinitionen. + Kommandozeilen-Syntaxhervorhebung mittels Kate-Syntaxdefinitionen. source @@ -46524,7 +46524,7 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni Highlight using this syntax definition (default: auto-detect based on input file). - Mit Hilfe dieser Syntaxdefinition hervorheben (Vorgabe: Anhand der Eingabedatei automatisch erkennen). + Mit dieser Syntaxdefinition hervorheben (Vorgabe: Anhand der Eingabedatei automatisch erkennen). syntax @@ -47278,7 +47278,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e Deploy files via rsync - Dateien mit Hilfe von rsync übertragen + Dateien mittels rsync übertragen diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/modelines.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/modelines.xml new file mode 100644 index 00000000000..0f3c882b6c9 --- /dev/null +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/modelines.xml @@ -0,0 +1,197 @@ + + + +]> + + + diff --git a/src/libs/ssh/sftptransfer.cpp b/src/libs/ssh/sftptransfer.cpp index 7b65048a32d..887d8f36fa0 100644 --- a/src/libs/ssh/sftptransfer.cpp +++ b/src/libs/ssh/sftptransfer.cpp @@ -157,6 +157,7 @@ void SftpTransfer::doStart() } } for (const FileToTransfer &f : d->files) { + QString sourceFileOrLinkTarget; bool link = false; if (d->transferType == Internal::FileTransferType::Upload) { QFileInfo fi(f.sourceFile); @@ -164,10 +165,13 @@ void SftpTransfer::doStart() link = true; d->batchFile.write("-rm " + QtcProcess::quoteArgUnix(f.targetFile).toLocal8Bit() + '\n'); + sourceFileOrLinkTarget = fi.dir().relativeFilePath(fi.symLinkTarget()); // see QTBUG-5817. + } else { + sourceFileOrLinkTarget = f.sourceFile; } } d->batchFile.write(d->transferCommand(link) + ' ' - + QtcProcess::quoteArgUnix(f.sourceFile).toLocal8Bit() + ' ' + + QtcProcess::quoteArgUnix(sourceFileOrLinkTarget).toLocal8Bit() + ' ' + QtcProcess::quoteArgUnix(f.targetFile).toLocal8Bit() + '\n'); } d->batchFile.flush(); diff --git a/src/libs/ssh/sshconnection.cpp b/src/libs/ssh/sshconnection.cpp index fe207235ecd..703d20932ca 100644 --- a/src/libs/ssh/sshconnection.cpp +++ b/src/libs/ssh/sshconnection.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -149,7 +148,7 @@ struct SshConnection::SshConnectionPrivate SshConnectionInfo connInfo; SshProcess masterProcess; QString errorString; - std::unique_ptr masterSocketDir; + std::unique_ptr masterSocketDir; State state = Unconnected; const bool sharingEnabled = SshSettings::connectionSharingEnabled(); }; @@ -351,8 +350,7 @@ void SshConnection::doConnectToHost() } if (!d->sharingEnabled) emitConnected(); - QTC_ASSERT(TemporaryDirectory::masterTemporaryDirectory(), return); - d->masterSocketDir.reset(new TemporaryDirectory("ssh-XXXXXX")); + d->masterSocketDir.reset(new QTemporaryDir); if (!d->masterSocketDir->isValid()) { emitError(tr("Cannot establish SSH connection: Failed to create temporary " "directory for control socket: %1") diff --git a/src/plugins/android/androidavdmanager.cpp b/src/plugins/android/androidavdmanager.cpp index 457d85d53b3..f14a5bc78c2 100644 --- a/src/plugins/android/androidavdmanager.cpp +++ b/src/plugins/android/androidavdmanager.cpp @@ -124,10 +124,6 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig config, const CreateAv Utils::equal(&SystemImage::abiName, result.abi)); if (image && image->isValid()) { arguments << "-k" << image->sdkStylePath(); - // Google api system images requires explicit abi as - // google-apis/ABI or --tag "google-apis" - if (image->sdkStylePath().contains(googleApiTag)) - arguments << "--tag" << googleApiTag; } else { QString name = result.sdkPlatform->displayText(); qCDebug(avdManagerLog) << "AVD Create failed. Cannot find system image for the platform" diff --git a/src/plugins/autotest/testresultmodel.cpp b/src/plugins/autotest/testresultmodel.cpp index f0dd0591532..874e813660e 100644 --- a/src/plugins/autotest/testresultmodel.cpp +++ b/src/plugins/autotest/testresultmodel.cpp @@ -410,19 +410,24 @@ TestResultFilterModel::TestResultFilterModel(TestResultModel *sourceModel, QObje m_sourceModel(sourceModel) { setSourceModel(sourceModel); - enableAllResultTypes(); + enableAllResultTypes(true); } -void TestResultFilterModel::enableAllResultTypes() +void TestResultFilterModel::enableAllResultTypes(bool enabled) { - m_enabled << ResultType::Pass << ResultType::Fail << ResultType::ExpectedFail - << ResultType::UnexpectedPass << ResultType::Skip << ResultType::MessageDebug - << ResultType::MessageWarn << ResultType::MessageInternal << ResultType::MessageLocation - << ResultType::MessageFatal << ResultType::Invalid << ResultType::BlacklistedPass - << ResultType::BlacklistedFail << ResultType::BlacklistedXFail << ResultType::BlacklistedXPass - << ResultType::Benchmark - << ResultType::MessageCurrentTest << ResultType::TestStart << ResultType::TestEnd - << ResultType::MessageInfo << ResultType::MessageSystem << ResultType::Application; + if (enabled) { + m_enabled << ResultType::Pass << ResultType::Fail << ResultType::ExpectedFail + << ResultType::UnexpectedPass << ResultType::Skip << ResultType::MessageDebug + << ResultType::MessageWarn << ResultType::MessageInternal << ResultType::MessageLocation + << ResultType::MessageFatal << ResultType::Invalid << ResultType::BlacklistedPass + << ResultType::BlacklistedFail << ResultType::BlacklistedXFail << ResultType::BlacklistedXPass + << ResultType::Benchmark + << ResultType::MessageCurrentTest << ResultType::TestStart << ResultType::TestEnd + << ResultType::MessageInfo << ResultType::MessageSystem << ResultType::Application; + } else { + m_enabled.clear(); + m_enabled << ResultType::MessageFatal << ResultType::MessageSystem; + } invalidateFilter(); } diff --git a/src/plugins/autotest/testresultmodel.h b/src/plugins/autotest/testresultmodel.h index ea4af1df2c9..38c880003b6 100644 --- a/src/plugins/autotest/testresultmodel.h +++ b/src/plugins/autotest/testresultmodel.h @@ -108,7 +108,7 @@ class TestResultFilterModel : public QSortFilterProxyModel public: explicit TestResultFilterModel(TestResultModel *sourceModel, QObject *parent = nullptr); - void enableAllResultTypes(); + void enableAllResultTypes(bool enabled); void toggleTestResultType(ResultType type); void clearTestResults(); bool hasResults(); diff --git a/src/plugins/autotest/testresultspane.cpp b/src/plugins/autotest/testresultspane.cpp index 22a2ed71630..8ee178a3380 100644 --- a/src/plugins/autotest/testresultspane.cpp +++ b/src/plugins/autotest/testresultspane.cpp @@ -493,7 +493,7 @@ void TestResultsPane::checkAllFilter(bool checked) if (action->isCheckable()) action->setChecked(checked); } - m_filterModel->enableAllResultTypes(); + m_filterModel->enableAllResultTypes(checked); } void TestResultsPane::filterMenuTriggered(QAction *action) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 08d5c5d69c4..39928fab35b 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -237,7 +237,8 @@ DeploymentData CMakeBuildConfiguration::deploymentData() const sourceDir.absolutePath()); for (const CMakeBuildTarget &ct : m_buildTargets) { if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) { - if (!ct.executable.isEmpty()) { + if (!ct.executable.isEmpty() + && !result.deployableForLocalFile(ct.executable.toString()).isValid()) { result.addFile(ct.executable.toString(), deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()), DeployableFile::TypeExecutable); diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 12a24dc286f..dd29477deb8 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -524,14 +524,17 @@ void CdbEngine::handleInitialSessionIdle() // QmlCppEngine expects the QML engine to be connected before any breakpoints are hit // (attemptBreakpointSynchronization() will be directly called then) if (rp.breakOnMain) { - // FIXME: -// const BreakpointParameters bp(BreakpointAtMain); -// BreakpointModelId id(quint16(-1)); -// QString function = cdbAddBreakpointCommand(bp, m_sourcePathMappings, id, true); -// runCommand({function, BuiltinCommand, -// [this, id](const DebuggerResponse &r) { handleBreakInsert(r, id); }}); + BreakpointParameters bp(BreakpointAtMain); + if (rp.startMode == StartInternal || rp.startMode == StartExternal) { + const QString &moduleFileName = Utils::FileName::fromString(rp.inferior.executable) + .fileName(); + bp.module = moduleFileName.left(moduleFileName.indexOf('.')); + } + QString function = cdbAddBreakpointCommand(bp, m_sourcePathMappings); + runCommand({function, BuiltinCommand, [this](const DebuggerResponse &r) { + handleBreakInsert(r, Breakpoint()); + }}); } - // Take ownership of the breakpoint. Requests insertion. TODO: Cpp only? BreakpointManager::claimBreakpointsForEngine(this); runCommand({".symopt+0x8000"}); // disable searching public symbol table - improving the symbol lookup speed @@ -866,6 +869,7 @@ void CdbEngine::executeRunToLine(const ContextData &data) { // Add one-shot breakpoint BreakpointParameters bp; + bp.oneShot = true; if (data.address) { bp.type =BreakpointByAddress; bp.address = data.address; @@ -875,7 +879,7 @@ void CdbEngine::executeRunToLine(const ContextData &data) bp.lineNumber = data.lineNumber; } - runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings, {}, true), BuiltinCommand, + runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings), BuiltinCommand, [this](const DebuggerResponse &r) { handleBreakInsert(r, Breakpoint()); }}); continueInferior(); } @@ -885,7 +889,8 @@ void CdbEngine::executeRunToFunction(const QString &functionName) // Add one-shot breakpoint BreakpointParameters bp(BreakpointByFunction); bp.functionName = functionName; - runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings, {}, true), BuiltinCommand, + bp.oneShot = true; + runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings), BuiltinCommand, [this](const DebuggerResponse &r) { handleBreakInsert(r, Breakpoint()); }}); continueInferior(); } @@ -1947,7 +1952,7 @@ void CdbEngine::handleBreakInsert(const DebuggerResponse &response, const Breakp functionName = functionName.mid(functionStart); sub->params.functionName = functionName; sub->displayName = bp->displayName() + '.' + QString::number(subBreakPointID); - runCommand({cdbAddBreakpointCommand(sub->params, m_sourcePathMappings, sub->responseId, false), NoFlags}); + runCommand({cdbAddBreakpointCommand(sub->params, m_sourcePathMappings, sub->responseId), NoFlags}); } } @@ -2506,10 +2511,10 @@ void CdbEngine::insertBreakpoint(const Breakpoint &bp) && boolSetting(CdbBreakPointCorrection)) { response.lineNumber = int(lineCorrection->fixLineNumber( parameters.fileName, unsigned(parameters.lineNumber))); - QString cmd = cdbAddBreakpointCommand(response, m_sourcePathMappings, responseId, false); + QString cmd = cdbAddBreakpointCommand(response, m_sourcePathMappings, responseId); runCommand({cmd, BuiltinCommand, handleBreakInsertCB}); } else { - QString cmd = cdbAddBreakpointCommand(parameters, m_sourcePathMappings, responseId, false); + QString cmd = cdbAddBreakpointCommand(parameters, m_sourcePathMappings, responseId); runCommand({cmd, BuiltinCommand, handleBreakInsertCB}); } if (!parameters.enabled) @@ -2564,7 +2569,7 @@ void CdbEngine::updateBreakpoint(const Breakpoint &bp) } else { // Delete and re-add, triggering update runCommand({cdbClearBreakpointCommand(bp), NoFlags}); - QString cmd = cdbAddBreakpointCommand(parameters, m_sourcePathMappings, responseId, false); + QString cmd = cdbAddBreakpointCommand(parameters, m_sourcePathMappings, responseId); runCommand({cmd, BuiltinCommand, handleBreakInsertCB}); m_pendingBreakpointMap.insert(bp); listBreakpoints(); diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp index 58047ce12fe..577776f8fbd 100644 --- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp +++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp @@ -122,6 +122,8 @@ static BreakpointParameters fixWinMSVCBreakpoint(const BreakpointParameters &p) case BreakpointAtMain: { BreakpointParameters rc(BreakpointByFunction); rc.functionName = "main"; + rc.module = p.module; + rc.oneShot = true; return rc; } } // switch @@ -138,8 +140,7 @@ QString breakPointCdbId(const Breakpoint &bp) QString cdbAddBreakpointCommand(const BreakpointParameters &bpIn, const QList > &sourcePathMapping, - const QString &responseId, - bool oneshot) + const QString &responseId) { const BreakpointParameters params = fixWinMSVCBreakpoint(bpIn); QString rc; @@ -154,7 +155,7 @@ QString cdbAddBreakpointCommand(const BreakpointParameters &bpIn, str << (params.type == WatchpointAtAddress ? "ba" : "bu") << responseId << ' '; - if (oneshot) + if (params.oneShot) str << "/1 "; switch (params.type) { case BreakpointAtFork: @@ -249,7 +250,7 @@ void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r, r->module = moduleG.data(); const GdbMi sourceFileName = gdbmi["srcfile"]; if (sourceFileName.isValid()) { - r->fileName = sourceFileName.data(); + r->fileName = Utils::FileUtils::normalizePathName(sourceFileName.data()); const GdbMi lineNumber = gdbmi["srcline"]; if (lineNumber.isValid()) r->lineNumber = lineNumber.data().toULongLong(nullptr, 0); diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.h b/src/plugins/debugger/cdb/cdbparsehelpers.h index 6bf0efa160b..5053a6de7e1 100644 --- a/src/plugins/debugger/cdb/cdbparsehelpers.h +++ b/src/plugins/debugger/cdb/cdbparsehelpers.h @@ -58,7 +58,7 @@ QString breakPointCdbId(const Breakpoint &bp); // Convert breakpoint in CDB syntax (applying source path mappings using native paths). QString cdbAddBreakpointCommand(const BreakpointParameters &d, const QList > &sourcePathMapping, - const QString &responseId = QString(), bool oneshot = false); + const QString &responseId = QString()); QString cdbClearBreakpointCommand(const Breakpoint &bp); // Parse extension command listing breakpoints. // Note that not all fields are returned, since file, line, function are encoded diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 6cdecd4e0de..dd0149fe4f4 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1038,6 +1038,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, }; m_breakpointManagerView = new BaseTreeView; + m_breakpointManagerView->setActivationMode(Utils::DoubleClickActivation); m_breakpointManagerView->setIconSize(QSize(10, 10)); m_breakpointManagerView->setWindowIcon(Icons::BREAKPOINTS.icon()); m_breakpointManagerView->setSelectionMode(QAbstractItemView::ExtendedSelection); diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp index b03ac37f26c..9e81ff2ed2a 100644 --- a/src/plugins/debugger/enginemanager.cpp +++ b/src/plugins/debugger/enginemanager.cpp @@ -166,7 +166,13 @@ public: Core::Id m_previousMode; QPointer m_engineChooser; bool m_shuttingDown = false; - Context m_currentAdditionalContext; + + // This contains the contexts that need to be removed when switching + // away from the current engine item. Since the plugin itself adds + // C_DEBUGGER_NOTRUNNING on initialization this is set here as well, + // so it can be removed when switching away from the initial (null) + // engine. See QTCREATORBUG-22330. + Context m_currentAdditionalContext{Constants::C_DEBUGGER_NOTRUNNING}; }; //////////////////////////////////////////////////////////////////////// diff --git a/src/plugins/help/helpmanager.cpp b/src/plugins/help/helpmanager.cpp index 3391d94740a..68bedb57795 100644 --- a/src/plugins/help/helpmanager.cpp +++ b/src/plugins/help/helpmanager.cpp @@ -167,18 +167,6 @@ void HelpManager::registerDocumentationNow(QFutureInterface &futureInterfa qWarning() << "Error registering namespace '" << nameSpace << "' from file '" << file << "':" << helpEngine.error(); } - } else { - const QLatin1String key("CreationDate"); - const QString &newDate = helpEngine.metaData(file, key).toString(); - const QString &oldDate = helpEngine.metaData( - helpEngine.documentationFileName(nameSpace), key).toString(); - if (QDateTime::fromString(newDate, Qt::ISODate) - > QDateTime::fromString(oldDate, Qt::ISODate)) { - if (helpEngine.unregisterDocumentation(nameSpace)) { - docsChanged = true; - helpEngine.registerDocumentation(file); - } - } } } futureInterface.reportResult(docsChanged); diff --git a/src/plugins/languageclient/languageclientinterface.cpp b/src/plugins/languageclient/languageclientinterface.cpp index 1e8a0fe1192..389ed0517f3 100644 --- a/src/plugins/languageclient/languageclientinterface.cpp +++ b/src/plugins/languageclient/languageclientinterface.cpp @@ -144,7 +144,7 @@ void StdIOClientInterface::sendData(const QByteArray &data) void StdIOClientInterface::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) { if (exitStatus == QProcess::CrashExit) - emit error(tr("Crashed with exit code %1: %2").arg(exitCode, m_process.error())); + emit error(tr("Crashed with exit code %1: %2").arg(exitCode).arg(m_process.errorString())); emit finished(); } diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index c1b17eb0c45..6c17f570bc0 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -3323,8 +3323,10 @@ void ProjectExplorerPluginPrivate::addNewFile() map.insert(QLatin1String(Constants::PREFERRED_PROJECT_NODE), QVariant::fromValue(static_cast(currentNode))); map.insert(Constants::PREFERRED_PROJECT_NODE_PATH, currentNode->filePath().toString()); if (Project *p = ProjectTree::currentProject()) { - QList profileIds = Utils::transform(p->targets(), &Target::id); - map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), QVariant::fromValue(profileIds)); + const QStringList profileIds = Utils::transform(p->targets(), [](const Target *t) { + return t->id().toString(); + }); + map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), profileIds); map.insert(Constants::PROJECT_POINTER, QVariant::fromValue(static_cast(p))); } ICore::showNewItemDialog(ProjectExplorerPlugin::tr("New File", "Title of dialog"), @@ -3348,8 +3350,11 @@ void ProjectExplorerPluginPrivate::addNewSubproject() Project *project = ProjectTree::currentProject(); Core::Id projectType; if (project) { - QList profileIds = Utils::transform(ProjectTree::currentProject()->targets(), &Target::id); - map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), QVariant::fromValue(profileIds)); + const QStringList profileIds = Utils::transform(ProjectTree::currentProject()->targets(), + [](const Target *t) { + return t->id().toString(); + }); + map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), profileIds); projectType = project->id(); } diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index 1e8ff76337b..0b55a76e2c1 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -1624,25 +1624,38 @@ void QmakeProFile::applyEvaluate(QmakeEvalResult *evalResult) m_wildcardWatcher = std::make_unique(); QObject::connect( m_wildcardWatcher.get(), &Utils::FileSystemWatcher::directoryChanged, - [this]() { - scheduleUpdate(); + [this](QString path) { + QStringList directoryContents = QDir(path).entryList(); + if (m_wildcardDirectoryContents.value(path) != directoryContents) { + m_wildcardDirectoryContents.insert(path, directoryContents); + scheduleUpdate(); + } }); } - m_wildcardWatcher->addDirectories( - Utils::filtered(result->directoriesWithWildcards.toList(), - [this](const QString &path) { - return !m_wildcardWatcher->watchesDirectory(path); - }), Utils::FileSystemWatcher::WatchModifiedDate); + const QStringList directoriesToAdd = Utils::filtered( + result->directoriesWithWildcards.toList(), + [this](const QString &path) { + return !m_wildcardWatcher->watchesDirectory(path); + }); + for (QString path : directoriesToAdd) + m_wildcardDirectoryContents.insert(path, QDir(path).entryList()); + m_wildcardWatcher->addDirectories(directoriesToAdd, + Utils::FileSystemWatcher::WatchModifiedDate); } if (m_wildcardWatcher) { if (result->directoriesWithWildcards.isEmpty()) { m_wildcardWatcher.reset(); + m_wildcardDirectoryContents.clear(); } else { - m_wildcardWatcher->removeDirectories( - Utils::filtered(m_wildcardWatcher->directories(), + const QStringList directoriesToRemove = + Utils::filtered( + m_wildcardWatcher->directories(), [&result](const QString &path) { return !result->directoriesWithWildcards.contains(path); - })); + }); + m_wildcardWatcher->removeDirectories(directoriesToRemove); + for (QString path : directoriesToRemove) + m_wildcardDirectoryContents.remove(path); } } diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h index d166690badc..fb343cd07f1 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h @@ -372,6 +372,7 @@ private: QStringList m_featureRoots; std::unique_ptr m_wildcardWatcher; + QMap m_wildcardDirectoryContents; // Async stuff QFutureWatcher m_parseFutureWatcher; diff --git a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp index d22d8da89d3..d223b16bf3d 100644 --- a/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp @@ -140,25 +140,34 @@ bool CustomQmakeProjectWizard::postGenerateFiles(const QWizard *w, const Core::G } // ----------------- BaseQmakeProjectWizardDialog -BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(const Core::BaseFileWizardFactory *factory, - bool showModulesPage, QWidget *parent, - const Core::WizardDialogParameters ¶meters) : - ProjectExplorer::BaseProjectWizardDialog(factory, parent, parameters), - m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)) - .value >()) +BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog( + const Core::BaseFileWizardFactory *factory, + bool showModulesPage, + QWidget *parent, + const Core::WizardDialogParameters ¶meters) + : ProjectExplorer::BaseProjectWizardDialog(factory, parent, parameters) { + m_profileIds = Utils::transform(parameters.extraValues() + .value(ProjectExplorer::Constants::PROJECT_KIT_IDS) + .toStringList(), + &Core::Id::fromString); + init(showModulesPage); } -BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(const Core::BaseFileWizardFactory *factory, - bool showModulesPage, - Utils::ProjectIntroPage *introPage, - int introId, QWidget *parent, - const Core::WizardDialogParameters ¶meters) : - ProjectExplorer::BaseProjectWizardDialog(factory, introPage, introId, parent, parameters), - m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)) - .value >()) +BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog( + const Core::BaseFileWizardFactory *factory, + bool showModulesPage, + Utils::ProjectIntroPage *introPage, + int introId, + QWidget *parent, + const Core::WizardDialogParameters ¶meters) + : ProjectExplorer::BaseProjectWizardDialog(factory, introPage, introId, parent, parameters) { + m_profileIds = Utils::transform(parameters.extraValues() + .value(ProjectExplorer::Constants::PROJECT_KIT_IDS) + .toStringList(), + &Core::Id::fromString); init(showModulesPage); } diff --git a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp index 306a2438a4b..7c2f57420af 100644 --- a/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp @@ -89,7 +89,8 @@ bool SubdirsProjectWizard::postGenerateFiles(const QWizard *w, const Core::Gener const QString profileName = Core::BaseFileWizardFactory::buildFileName(projectPath, params.fileName, profileSuffix()); QVariantMap map; map.insert(QLatin1String(ProjectExplorer::Constants::PREFERRED_PROJECT_NODE), profileName); - map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS), QVariant::fromValue(wizard->selectedKits())); + map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS), + Utils::transform(wizard->selectedKits(), &Core::Id::toString)); IWizardFactory::requestNewItemDialog(tr("New Subproject", "Title of dialog"), Utils::filtered(Core::IWizardFactory::allWizardFactories(), [](Core::IWizardFactory *f) { diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp index 72ee60fd925..ae53990cf9d 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp @@ -30,6 +30,7 @@ #include "itemlibrarysection.h" #include +#include #include #include @@ -184,8 +185,10 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model) qDebug() << Utils::transform(metaInfo.superClasses(), &NodeMetaInfo::typeName); } + bool forceVisiblity = valid && NodeHints::fromItemLibraryEntry(entry).visibleInLibrary(); + if (valid - && isItem //We can change if the navigator does support pure QObjects + && (isItem || forceVisiblity) //We can change if the navigator does support pure QObjects && (entry.requiredImport().isEmpty() || model->hasImport(entryToImport(entry), true, true))) { QString itemSectionName = entry.category(); diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index e98e7c3379b..126fed8e68f 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -252,7 +252,7 @@ QList filteredList(const NodeListProperty &property, bool filter) return property.toModelNodeList(); return Utils::filtered(property.toModelNodeList(), [] (const ModelNode &arg) { - return QmlItemNode::isValidQmlItemNode(arg); + return QmlItemNode::isValidQmlItemNode(arg) || NodeHints::fromModelNode(arg).visibleInNavigator(); }); } diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp index c8fc4e5b54f..07434102fce 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp @@ -48,6 +48,7 @@ #include #include +#include static inline void setScenePos(const QmlDesigner::ModelNode &modelNode,const QPointF &pos) @@ -147,15 +148,21 @@ void NavigatorView::modelAttached(Model *model) { AbstractView::modelAttached(model); - m_currentModelInterface->setFilter( - DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_SHOW_ONLY_VISIBLE_ITEMS).toBool()); - QTreeView *treeView = treeWidget(); - treeView->expandAll(); treeView->header()->setSectionResizeMode(0, QHeaderView::Stretch); treeView->header()->resizeSection(1,26); treeView->setIndentation(20); + + m_currentModelInterface->setFilter(false); + + + QTimer::singleShot(0, this, [this, treeView]() { + m_currentModelInterface->setFilter( + DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_SHOW_ONLY_VISIBLE_ITEMS).toBool()); + treeView->expandAll(); + }); + #ifdef _LOCK_ITEMS_ treeView->header()->resizeSection(2,20); #endif diff --git a/src/plugins/qmldesigner/designercore/include/nodehints.h b/src/plugins/qmldesigner/designercore/include/nodehints.h index 982c3a80b06..1e8b7d99e41 100644 --- a/src/plugins/qmldesigner/designercore/include/nodehints.h +++ b/src/plugins/qmldesigner/designercore/include/nodehints.h @@ -65,6 +65,8 @@ public: bool canBeReparentedTo(const ModelNode &potenialParent); QString indexPropertyForStackedContainer() const; bool takesOverRenderingOfChildren() const; + bool visibleInNavigator() const; + bool visibleInLibrary() const; QHash hints() const; static NodeHints fromModelNode(const ModelNode &modelNode); diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp index 28d7c0a205a..be7623323d4 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp @@ -201,6 +201,19 @@ bool NodeHints::takesOverRenderingOfChildren() const return evaluateBooleanExpression("takesOverRenderingOfChildren", false); } +bool NodeHints::visibleInNavigator() const +{ + if (!isValid()) + return false; + + return evaluateBooleanExpression("visibleInNavigator", false); +} + +bool NodeHints::visibleInLibrary() const +{ + return evaluateBooleanExpression("visibleInLibrary", true); +} + QHash NodeHints::hints() const { return m_hints; diff --git a/src/plugins/qmldesigner/qmldesignerextension/timelineeditor/timelinesettingsdialog.cpp b/src/plugins/qmldesigner/qmldesignerextension/timelineeditor/timelinesettingsdialog.cpp index b2bcb8565d2..6178c8cda2a 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/timelineeditor/timelinesettingsdialog.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/timelineeditor/timelinesettingsdialog.cpp @@ -75,7 +75,7 @@ static QmlTimeline getTimelineFromTabWidget(QTabWidget *tabWidget) static void setTabForTimeline(QTabWidget *tabWidget, const QmlTimeline &timeline) { - for (int i = 0; i > tabWidget->count(); ++i) { + for (int i = 0; i < tabWidget->count(); ++i) { QWidget *w = tabWidget->widget(i); if (qobject_cast(w)->timeline() == timeline) { tabWidget->setCurrentIndex(i); @@ -86,7 +86,7 @@ static void setTabForTimeline(QTabWidget *tabWidget, const QmlTimeline &timeline static void setTabForAnimation(QTabWidget *tabWidget, const ModelNode &animation) { - for (int i = 0; i > tabWidget->count(); ++i) { + for (int i = 0; i < tabWidget->count(); ++i) { QWidget *w = tabWidget->widget(i); if (qobject_cast(w)->animation() == animation) { tabWidget->setCurrentIndex(i); diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index d7fa2fd7a96..ba5228f7c16 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -682,11 +682,9 @@ void QmlProfilerTool::clientsDisconnected() d->m_profilerModelManager->finalize(); } else if (d->m_profilerState->serverRecording()) { // If the application stopped by itself, check if we have all the data - if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying || - d->m_profilerState->currentState() == QmlProfilerStateManager::Idle) { + if (d->m_profilerState->currentState() != QmlProfilerStateManager::AppStopRequested) { showNonmodalWarning(tr("Application finished before loading profiled data.\n" "Please use the stop button instead.")); - d->m_profilerModelManager->clearAll(); } } } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 1f59d263fbc..5c2f5128220 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -302,6 +302,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id) m_qmlViewerAspect->setLabelText(tr("QML Viewer:")); m_qmlViewerAspect->setPlaceHolderText(executable()); m_qmlViewerAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay); + m_qmlViewerAspect->setHistoryCompleter("QmlProjectManager.viewer.history"); auto argumentAspect = addAspect(); argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY); diff --git a/src/plugins/remotelinux/genericdirectuploadservice.cpp b/src/plugins/remotelinux/genericdirectuploadservice.cpp index e07c819275c..014ed5db620 100644 --- a/src/plugins/remotelinux/genericdirectuploadservice.cpp +++ b/src/plugins/remotelinux/genericdirectuploadservice.cpp @@ -153,12 +153,12 @@ QDateTime GenericDirectUploadService::timestampFromStat(const DeployableFile &fi return QDateTime(); } const QByteArrayList columns = output.mid(file.remoteFilePath().toUtf8().size() + 1).split(' '); - if (columns.size() < 15) { // Normal Linux stat: 16 columns, busybox stat: 15 columns + if (columns.size() < 14) { // Normal Linux stat: 16 columns in total, busybox stat: 15 columns emit warningMessage(warningString); return QDateTime(); } bool isNumber; - const qint64 secsSinceEpoch = columns.at(12).toLongLong(&isNumber); + const qint64 secsSinceEpoch = columns.at(11).toLongLong(&isNumber); if (!isNumber) { emit warningMessage(warningString); return QDateTime(); diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp index 1d492b88e20..a375716aab3 100644 --- a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp @@ -105,8 +105,8 @@ QString RemoteLinuxCustomRunConfiguration::runConfigDefaultDisplayName() Runnable RemoteLinuxCustomRunConfiguration::runnable() const { ProjectExplorer::Runnable r = RunConfiguration::runnable(); - r.extraData.insert("Ssh.X11ForwardToDisplay", - aspect()->display(macroExpander())); + if (const auto * const forwardingAspect = aspect()) + r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display(macroExpander())); return r; } diff --git a/src/plugins/remotelinux/rsyncdeploystep.cpp b/src/plugins/remotelinux/rsyncdeploystep.cpp index 25c0e122073..8c0900d750b 100644 --- a/src/plugins/remotelinux/rsyncdeploystep.cpp +++ b/src/plugins/remotelinux/rsyncdeploystep.cpp @@ -232,7 +232,7 @@ RsyncCommandLine RsyncDeployStep::rsyncCommand(const SshConnection &sshConnectio QStringList{SshSettings::sshFilePath().toUserOutput()} << sshConnection.connectionOptions()); const SshConnectionParameters sshParams = sshConnection.connectionParameters(); - return RsyncCommandLine(QStringList{"-e", sshCmdLine, "-avz"}, + return RsyncCommandLine(QStringList{"-e", sshCmdLine, "-av"}, sshParams.userName() + '@' + sshParams.host()); } diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp index 5b60b885ab4..07ec2fcf964 100644 --- a/src/plugins/texteditor/highlighter.cpp +++ b/src/plugins/texteditor/highlighter.cpp @@ -27,6 +27,7 @@ #include "highlightersettings.h" #include "textdocumentlayout.h" +#include "tabsettings.h" #include "texteditorsettings.h" #include @@ -35,6 +36,7 @@ #include #include +#include #include #include @@ -272,10 +274,16 @@ void Highlighter::highlightBlock(const QString &text) { if (!definition().isValid()) return; - QTextBlock block = currentBlock(); - KSyntaxHighlighting::State state = TextDocumentLayout::userData(block)->syntaxState(); + const QTextBlock block = currentBlock(); + KSyntaxHighlighting::State state; + setCurrentBlockState(qMax(0, previousBlockState())); + if (TextBlockUserData *data = TextDocumentLayout::testUserData(block)) { + state = data->syntaxState(); + data->setFoldingStartIncluded(false); + data->setFoldingEndIncluded(false); + } state = highlightLine(text, state); - block = block.next(); + const QTextBlock nextBlock = block.next(); Parentheses parentheses; int pos = 0; @@ -288,8 +296,12 @@ void Highlighter::highlightBlock(const QString &text) } TextDocumentLayout::setParentheses(currentBlock(), parentheses); - if (block.isValid()) - TextDocumentLayout::userData(block)->setSyntaxState(state); + if (nextBlock.isValid()) { + TextBlockUserData *data = TextDocumentLayout::userData(nextBlock); + data->setSyntaxState(state); + data->setFoldingIndent(currentBlockState()); + } + formatSpaces(text); } @@ -297,3 +309,31 @@ void Highlighter::applyFormat(int offset, int length, const KSyntaxHighlighting: { setFormat(offset, length, formatForCategory(format.textStyle())); } + +void Highlighter::applyFolding(int offset, + int length, + KSyntaxHighlighting::FoldingRegion region) +{ + if (!region.isValid()) + return; + const QTextBlock &block = currentBlock(); + const QString &text = block.text(); + TextBlockUserData *data = TextDocumentLayout::userData(currentBlock()); + const bool fromStart = TabSettings::firstNonSpace(text) == offset; + const bool toEnd = (offset + length) == (text.length() - TabSettings::trailingWhitespaces(text)); + if (region.type() == KSyntaxHighlighting::FoldingRegion::Begin) { + setCurrentBlockState(currentBlockState() + 1); + // if there is only a folding begin in the line move the current block into the fold + if (fromStart && toEnd) { + data->setFoldingIndent(currentBlockState()); + data->setFoldingStartIncluded(true); + } + } else if (region.type() == KSyntaxHighlighting::FoldingRegion::End) { + setCurrentBlockState(qMax(0, currentBlockState() - 1)); + // if the folding end is at the end of the line move the current block into the fold + if (toEnd) + data->setFoldingEndIncluded(true); + else + data->setFoldingIndent(currentBlockState()); + } +} diff --git a/src/plugins/texteditor/highlighter.h b/src/plugins/texteditor/highlighter.h index 92e7e136c18..8777bf006fc 100644 --- a/src/plugins/texteditor/highlighter.h +++ b/src/plugins/texteditor/highlighter.h @@ -66,6 +66,7 @@ public: protected: void highlightBlock(const QString &text) override; void applyFormat(int offset, int length, const KSyntaxHighlighting::Format &format) override; + void applyFolding(int offset, int length, KSyntaxHighlighting::FoldingRegion region) override; }; } // namespace TextEditor diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index ac0a626d577..24b061fed7e 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4720,13 +4720,13 @@ void TextEditorWidgetPrivate::paintReplacement(PaintEventData &data, QPainter &p replacement.prepend(nextBlock.text().trimmed().at(0)); } - QTextBlock nextVisibleBlock = TextEditor::nextVisibleBlock(data.block, data.doc); - if (!nextVisibleBlock.isValid()) - nextVisibleBlock = data.doc->lastBlock(); + QTextBlock lastInvisibleBlock = TextEditor::nextVisibleBlock(data.block, data.doc).previous(); + if (!lastInvisibleBlock.isValid()) + lastInvisibleBlock = data.doc->lastBlock(); - if (TextBlockUserData *blockUserData = TextDocumentLayout::testUserData(nextVisibleBlock)) { + if (TextBlockUserData *blockUserData = TextDocumentLayout::testUserData(lastInvisibleBlock)) { if (blockUserData->foldingEndIncluded()) { - QString right = nextVisibleBlock.text().trimmed(); + QString right = lastInvisibleBlock.text().trimmed(); if (right.endsWith(QLatin1Char(';'))) { right.chop(1); right = right.trimmed(); diff --git a/src/shared/proparser/registry_p.h b/src/shared/proparser/registry_p.h index 8defcbae959..1267bc04c5d 100644 --- a/src/shared/proparser/registry_p.h +++ b/src/shared/proparser/registry_p.h @@ -35,6 +35,8 @@ #include +QT_BEGIN_NAMESPACE + namespace QMakeInternal { /** @@ -53,3 +55,5 @@ QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey, unsigned long options = 0); } // namespace QMakeInternal + +QT_END_NAMESPACE diff --git a/src/tools/clangbackend/source/clangupdateannotationsjob.cpp b/src/tools/clangbackend/source/clangupdateannotationsjob.cpp index 5a28d64ac2b..bdd05512e66 100644 --- a/src/tools/clangbackend/source/clangupdateannotationsjob.cpp +++ b/src/tools/clangbackend/source/clangupdateannotationsjob.cpp @@ -44,7 +44,7 @@ static QSet unresolvedFilePaths(const QVector & QSet unresolved; for (const DiagnosticContainer &diagnostic : diagnostics) { - if (diagnostic.severity == DiagnosticSeverity::Fatal + if (diagnostic.severity == DiagnosticSeverity::Error && diagnostic.category == Utf8StringLiteral("Lexical or Preprocessor Issue")) { const QString path = re.match(diagnostic.text).captured(1); if (!path.isEmpty()) diff --git a/src/tools/sdktool/addcmakeoperation.cpp b/src/tools/sdktool/addcmakeoperation.cpp index bc8d9a66bcc..893b9c5b612 100644 --- a/src/tools/sdktool/addcmakeoperation.cpp +++ b/src/tools/sdktool/addcmakeoperation.cpp @@ -203,20 +203,13 @@ QVariantMap AddCMakeOperation::addCMake(const QVariantMap &map, const QString &i return QVariantMap(); } - // Sanity check: Make sure displayName is unique. - QStringList nameKeys = FindKeyOperation::findKey(map, DISPLAYNAME_KEY); - QStringList nameList; - foreach (const QString &nameKey, nameKeys) - nameList << GetOperation::get(map, nameKey).toString(); - const QString uniqueName = makeUnique(displayName, nameList); - QVariantMap result = RmKeysOperation::rmKeys(map, {COUNT}); const QString cm = QString::fromLatin1(PREFIX) + QString::number(count); KeyValuePairList data; data << KeyValuePair({cm, ID_KEY}, QVariant(id)); - data << KeyValuePair({cm, DISPLAYNAME_KEY}, QVariant(uniqueName)); + data << KeyValuePair({cm, DISPLAYNAME_KEY}, QVariant(displayName)); data << KeyValuePair({cm, AUTODETECTED_KEY}, QVariant(true)); data << KeyValuePair({cm, PATH_KEY}, QVariant(path)); KeyValuePairList extraList; diff --git a/src/tools/sdktool/adddebuggeroperation.cpp b/src/tools/sdktool/adddebuggeroperation.cpp index e6871cb8b65..3e94603d3c1 100644 --- a/src/tools/sdktool/adddebuggeroperation.cpp +++ b/src/tools/sdktool/adddebuggeroperation.cpp @@ -204,17 +204,11 @@ QVariantMap AddDebuggerOperation::addDebugger(const QVariantMap &map, toRemove << QLatin1String(COUNT); QVariantMap cleaned = RmKeysOperation::rmKeys(map, toRemove); - // Sanity check: Make sure displayName is unique. - QStringList nameKeys = FindKeyOperation::findKey(map, QLatin1String(DISPLAYNAME)); - QStringList nameList; - foreach (const QString &nameKey, nameKeys) - nameList << GetOperation::get(map, nameKey).toString(); - const QString uniqueName = makeUnique(displayName, nameList); - // insert data: KeyValuePairList data; data << KeyValuePair(QStringList() << debugger << QLatin1String(ID), QVariant(id)); - data << KeyValuePair(QStringList() << debugger << QLatin1String(DISPLAYNAME), QVariant(uniqueName)); + data << KeyValuePair(QStringList() << debugger << QLatin1String(DISPLAYNAME), + QVariant(displayName)); data << KeyValuePair(QStringList() << debugger << QLatin1String(AUTODETECTED), QVariant(true)); data << KeyValuePair(QStringList() << debugger << QLatin1String(ABIS), QVariant(abis)); diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp index 9cdba2a0b21..5eef6e7115a 100644 --- a/src/tools/sdktool/addkitoperation.cpp +++ b/src/tools/sdktool/addkitoperation.cpp @@ -623,19 +623,12 @@ QVariantMap AddKitOperation::addKit(const QVariantMap &map, const QVariantMap &t // remove data: QVariantMap cleaned = RmKeysOperation::rmKeys(map, {COUNT, DEFAULT}); - // Sanity check: Make sure displayName is unique. - QStringList nameKeys = FindKeyOperation::findKey(map, DISPLAYNAME); - QStringList nameList; - foreach (const QString &nameKey, nameKeys) - nameList << GetOperation::get(map, nameKey).toString(); - const QString uniqueName = makeUnique(displayName, nameList); - // insert data: - KeyValuePairList data = { KeyValuePair({kit, ID}, QVariant(id)), - KeyValuePair({kit, DISPLAYNAME}, QVariant(uniqueName)), - KeyValuePair({kit, ICON}, QVariant(icon)), - KeyValuePair({kit, AUTODETECTED}, QVariant(true)), - KeyValuePair({kit, SDK}, QVariant(true))}; + KeyValuePairList data = {KeyValuePair({kit, ID}, QVariant(id)), + KeyValuePair({kit, DISPLAYNAME}, QVariant(displayName)), + KeyValuePair({kit, ICON}, QVariant(icon)), + KeyValuePair({kit, AUTODETECTED}, QVariant(true)), + KeyValuePair({kit, SDK}, QVariant(true))}; if (!debuggerId.isEmpty() || !debugger.isEmpty()) { if (debuggerId.isEmpty()) { diff --git a/src/tools/sdktool/addqtoperation.cpp b/src/tools/sdktool/addqtoperation.cpp index c71676433be..30ece83c650 100644 --- a/src/tools/sdktool/addqtoperation.cpp +++ b/src/tools/sdktool/addqtoperation.cpp @@ -296,20 +296,13 @@ QVariantMap AddQtOperation::addQt(const QVariantMap &map, } const QString qt = QString::fromLatin1(PREFIX) + QString::number(versionCount); - // Sanity check: Make sure displayName is unique. - QStringList nameKeys = FindKeyOperation::findKey(map, QLatin1String(DISPLAYNAME)); - QStringList nameList; - foreach (const QString &nameKey, nameKeys) - nameList << GetOperation::get(map, nameKey).toString(); - const QString uniqueName = makeUnique(displayName, nameList); - // Sanitize qmake path: QString saneQmake = QDir::cleanPath(QDir::fromNativeSeparators(qmake)); // insert data: KeyValuePairList data; data << KeyValuePair(QStringList() << qt << QLatin1String(ID), QVariant(-1)); - data << KeyValuePair(QStringList() << qt << QLatin1String(DISPLAYNAME), QVariant(uniqueName)); + data << KeyValuePair(QStringList() << qt << QLatin1String(DISPLAYNAME), QVariant(displayName)); data << KeyValuePair(QStringList() << qt << QLatin1String(AUTODETECTED), QVariant(true)); data << KeyValuePair(QStringList() << qt << QLatin1String(AUTODETECTION_SOURCE), QVariant(sdkId)); data << KeyValuePair(QStringList() << qt << QLatin1String(QMAKE), QVariant(saneQmake)); diff --git a/src/tools/sdktool/addtoolchainoperation.cpp b/src/tools/sdktool/addtoolchainoperation.cpp index 335b72ec763..0f5359cff31 100644 --- a/src/tools/sdktool/addtoolchainoperation.cpp +++ b/src/tools/sdktool/addtoolchainoperation.cpp @@ -253,13 +253,6 @@ QVariantMap AddToolChainOperation::addToolChain(const QVariantMap &map, const QS return QVariantMap(); } - // Sanity check: Make sure displayName is unique. - QStringList nameKeys = FindKeyOperation::findKey(map, DISPLAYNAME); - QStringList nameList; - foreach (const QString &nameKey, nameKeys) - nameList << GetOperation::get(map, nameKey).toString(); - const QString uniqueName = makeUnique(displayName, nameList); - QVariantMap result = RmKeysOperation::rmKeys(map, {COUNT}); const QString tc = QString::fromLatin1(PREFIX) + QString::number(count); @@ -290,7 +283,7 @@ QVariantMap AddToolChainOperation::addToolChain(const QVariantMap &map, const QS data << KeyValuePair({tc, LANGUAGE_KEY}, QVariant(oldLang)); if (!newLang.isEmpty()) data << KeyValuePair({tc, LANGUAGE_KEY_V2}, QVariant(newLang)); - data << KeyValuePair({tc, DISPLAYNAME}, QVariant(uniqueName)); + data << KeyValuePair({tc, DISPLAYNAME}, QVariant(displayName)); data << KeyValuePair({tc, AUTODETECTED}, QVariant(true)); data << KeyValuePair({tc, PATH}, QVariant(path)); data << KeyValuePair({tc, TARGET_ABI}, QVariant(abi)); diff --git a/src/tools/sdktool/operation.cpp b/src/tools/sdktool/operation.cpp index c4f823281a9..68bad3272db 100644 --- a/src/tools/sdktool/operation.cpp +++ b/src/tools/sdktool/operation.cpp @@ -62,15 +62,6 @@ QVariant Operation::valueFromString(const QString &v) return QVariant(); } -QString Operation::makeUnique(const QString &name, const QStringList &inUse) -{ - QString unique = name; - int i = 1; - while (inUse.contains(unique)) - unique = name + QString::number(++i); - return unique; -} - Operation::KeyValuePair::KeyValuePair(const QString &k, const QString &v) : value(valueFromString(v)) { diff --git a/src/tools/sdktool/operation.h b/src/tools/sdktool/operation.h index ad2062cf8f6..99077fb2160 100644 --- a/src/tools/sdktool/operation.h +++ b/src/tools/sdktool/operation.h @@ -63,5 +63,4 @@ public: bool save(const QVariantMap &map, const QString &file) const; static QVariant valueFromString(const QString &v); - static QString makeUnique(const QString &name, const QStringList &inUse); }; diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index 4334e90aa64..1a4eda3bcc9 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -4534,6 +4534,64 @@ void tst_TestCore::testImplicitComponents() QCOMPARE(delegate.nodeSourceType(), ModelNode::NodeWithComponentSource); } +void tst_TestCore::testRevisionedProperties() +{ +#if QT_VERSION > QT_VERSION_CHECK(5, 11, 0) + const char* qmlString + = "import QtQuick 2.12\n" + "import QtQuick.Controls 2.0\n" + "import QtQuick.Layouts 1.0\n" + "\n" + "Item {\n" + "width: 640\n" + "height: 480\n" + "Rectangle {\n" + "gradient: Gradient {\n" + "orientation: Qt.Vertical\n" + "}\n" + "}\n" + "TextEdit {\n" + "leftPadding: 10\n" + "rightPadding: 10\n" + "topPadding: 10\n" + "bottomPadding: 10\n" + "}\n" + "}\n"; + + QPlainTextEdit textEdit; + textEdit.setPlainText(QLatin1String(qmlString)); + NotIndentingTextEditModifier modifier(&textEdit); + + QScopedPointer model(Model::create("QtQuick.Item")); + QVERIFY(model.data()); + QScopedPointer view(new TestView(model.data())); + QVERIFY(view.data()); + model->attachView(view.data()); + + TestRewriterView *testRewriterView = new TestRewriterView(model.data()); + testRewriterView->setCheckSemanticErrors(true); + testRewriterView->setTextModifier(&modifier); + model->attachView(testRewriterView); + + QVERIFY(testRewriterView->errors().isEmpty()); + + ModelNode rootModelNode(view->rootModelNode()); + + QVERIFY(rootModelNode.isValid()); + + NodeMetaInfo metaInfo12 = model->metaInfo("QtQuick.Gradient", 2, 12); + NodeMetaInfo metaInfo11 = model->metaInfo("QtQuick.Gradient", -1, -1); + NodeMetaInfo metaInfoU = model->metaInfo("QtQuick.Gradient", -1, -1); + + QVERIFY(metaInfo12.isValid()); + QVERIFY(metaInfoU.isValid()); + + QVERIFY(metaInfo12.hasProperty("orientation")); + QVERIFY(metaInfoU.hasProperty("orientation")); + +#endif +} + void tst_TestCore::testStatesRewriter() { QPlainTextEdit textEdit; diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.h b/tests/auto/qml/qmldesigner/coretests/tst_testcore.h index cde63a12d1c..3f1eec576b4 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.h +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.h @@ -62,6 +62,7 @@ private slots: void testQtQuick20BasicRectangle(); void testQtQuickControls2(); void testImplicitComponents(); + void testRevisionedProperties(); // // unit tests Model, ModelNode, NodeProperty, AbstractView diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 3afc7fc2a7f..00271bd77e3 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -303,15 +303,22 @@ def createNewQtQuickApplication(workingDir, projectName = None, return checkedTargets, projectName def createNewQtQuickUI(workingDir, qtVersion = "5.6"): - __createProjectOrFileSelectType__(" Other Project", 'Qt Quick UI Prototype') + available = __createProjectOrFileSelectType__(" Other Project", 'Qt Quick UI Prototype') if workingDir == None: workingDir = tempDir() projectName = __createProjectSetNameAndPath__(workingDir) - __createProjectHandleQtQuickSelection__(qtVersion) - __createProjectHandleLastPage__() - progressBarWait(10000) + requiredQt = __createProjectHandleQtQuickSelection__(qtVersion) + __modifyAvailableTargets__(available, requiredQt) + snooze(1) + checkedTargets = __chooseTargets__(available, available) + if len(checkedTargets): + clickButton(waitForObject(":Next_QPushButton")) + __createProjectHandleLastPage__() + progressBarWait(10000) + else: + clickButton(waitForObject("{type='QPushButton' text='Cancel' visible='1'}")) - return projectName + return checkedTargets, projectName def createNewQmlExtension(workingDir, targets=[Targets.DESKTOP_5_6_1_DEFAULT]): available = __createProjectOrFileSelectType__(" Library", "Qt Quick 2 Extension Plugin")