diff --git a/dist/changes-4.12.0.md b/dist/changes-4.12.0.md index bcc86dee14e..731fea31cfe 100644 --- a/dist/changes-4.12.0.md +++ b/dist/changes-4.12.0.md @@ -202,6 +202,7 @@ Platforms ### Android +* Discontinued support for Ministro * Added auto-detection of Java JDK (QTCREATORBUG-23407) * Added option to automatically download and install required Android tools (QTCREATORBUG-23285) * Added option to register multiple NDKs (QTCREATORBUG-23286) diff --git a/doc/README.md b/doc/README.md index 49f54c2a279..f3ddd4fe4fd 100644 --- a/doc/README.md +++ b/doc/README.md @@ -14,6 +14,9 @@ the doc folder: - qtcreatordev - qtdesignstudio +For more information, see: +[Writing Documentation](https://doc.qt.io/qtcreator-extending/qtcreator-documentation.html) + The Qt Design Studio Manual is based on the Qt Creator Manual, with additional topics. For more information, see the `README` file in the qtdesignstudio subfolder. @@ -21,16 +24,20 @@ qtdesignstudio subfolder. The Extending Qt Creator Manual has its own sources. In addition, it pulls in API reference documentation from the Qt Creator source files. -# QDoc Warnings +# QDoc All the documents are built when you enter `make docs` on Linux or -macOS or `nmake docs` on Windows. At the time of this writing, this -leads to QDoc warnings being generated, because the Qt Creator Manual -requires QDoc from Qt 5.14 or later (it links to new modules), whereas -the Extending Qt Creator Manual requires QDoc from Qt 5.10 or earlier, -because the doc configuration is not supported when using the Clang -parser. +macOS or `nmake docs` on Windows. -To hide the doc errors and make doc builds faster, enter an option -to write the doc errors to the log. For example, on Windows enter -`nmake docs 2> log.txt`. +Since Qt Creator 4.12, you need to use QDoc Qt 5.14 or later to build +the docs. While building with QDoc from Qt 5.11 or later technically +works, the Qt Creator Manual and Qt Design Studio Manual link to newer +Qt modules, which means link errors will be printed. + +Please make the docs before submitting code changes to make sure that +you do not introduce new QDoc warnings. + +While working on changes that introduce lots of warnings about missing API +documentation, for example, you can enter an option to write the doc +errors to the log. This helps make doc builds faster until you have +fixed the errors. For example, on Windows enter `nmake docs 2> log.txt`. diff --git a/doc/qtcreator/images/qtcreator-android-avd-manager.png b/doc/qtcreator/images/qtcreator-android-avd-manager.png new file mode 100644 index 00000000000..7db5c73bbc9 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-android-avd-manager.png differ diff --git a/doc/qtcreator/images/qtcreator-android-build-steps.png b/doc/qtcreator/images/qtcreator-android-build-steps.png index dda97e83ccf..635ac58dddb 100644 Binary files a/doc/qtcreator/images/qtcreator-android-build-steps.png and b/doc/qtcreator/images/qtcreator-android-build-steps.png differ diff --git a/doc/qtcreator/images/qtcreator-android-cmake-settings.png b/doc/qtcreator/images/qtcreator-android-cmake-settings.png index 6776e4fcba3..7f8026bccab 100644 Binary files a/doc/qtcreator/images/qtcreator-android-cmake-settings.png and b/doc/qtcreator/images/qtcreator-android-cmake-settings.png differ diff --git a/doc/qtcreator/images/qtcreator-android-create-avd.png b/doc/qtcreator/images/qtcreator-android-create-avd.png new file mode 100644 index 00000000000..3fc6627cb87 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-android-create-avd.png differ diff --git a/doc/qtcreator/images/qtcreator-android-deploy-configurations.png b/doc/qtcreator/images/qtcreator-android-deploy-configurations.png index c4602a8538d..b19e032baab 100644 Binary files a/doc/qtcreator/images/qtcreator-android-deploy-configurations.png and b/doc/qtcreator/images/qtcreator-android-deploy-configurations.png differ diff --git a/doc/qtcreator/images/qtcreator-android-manifest-editor.png b/doc/qtcreator/images/qtcreator-android-manifest-editor.png index 67424baae3d..cb03512e596 100644 Binary files a/doc/qtcreator/images/qtcreator-android-manifest-editor.png and b/doc/qtcreator/images/qtcreator-android-manifest-editor.png differ diff --git a/doc/qtcreator/images/qtcreator-android-run-settings.png b/doc/qtcreator/images/qtcreator-android-run-settings.png index 2ed8b065c54..5638b0ad7cc 100644 Binary files a/doc/qtcreator/images/qtcreator-android-run-settings.png and b/doc/qtcreator/images/qtcreator-android-run-settings.png differ diff --git a/doc/qtcreator/images/qtcreator-android-sdk-manager.png b/doc/qtcreator/images/qtcreator-android-sdk-manager.png index 6a0090894a0..4ef61fdf176 100644 Binary files a/doc/qtcreator/images/qtcreator-android-sdk-manager.png and b/doc/qtcreator/images/qtcreator-android-sdk-manager.png differ diff --git a/doc/qtcreator/images/qtcreator-android-select-devices.png b/doc/qtcreator/images/qtcreator-android-select-devices.png index c8edc20ed9a..7c747666808 100644 Binary files a/doc/qtcreator/images/qtcreator-android-select-devices.png and b/doc/qtcreator/images/qtcreator-android-select-devices.png differ diff --git a/doc/qtcreator/images/qtcreator-cppcheck-options.png b/doc/qtcreator/images/qtcreator-cppcheck-options.png deleted file mode 100644 index 56610aa13b7..00000000000 Binary files a/doc/qtcreator/images/qtcreator-cppcheck-options.png and /dev/null differ diff --git a/doc/qtcreator/images/qtcreator-cppcheck-run-configuration.png b/doc/qtcreator/images/qtcreator-cppcheck-run-configuration.png new file mode 100644 index 00000000000..137a2abc44e Binary files /dev/null and b/doc/qtcreator/images/qtcreator-cppcheck-run-configuration.png differ diff --git a/doc/qtcreator/images/qtcreator-ctf-visualizer-statistics.png b/doc/qtcreator/images/qtcreator-ctf-visualizer-statistics.png index 1e58b416116..539172091e1 100644 Binary files a/doc/qtcreator/images/qtcreator-ctf-visualizer-statistics.png and b/doc/qtcreator/images/qtcreator-ctf-visualizer-statistics.png differ diff --git a/doc/qtcreator/images/qtcreator-ctf-visualizer-timeline.png b/doc/qtcreator/images/qtcreator-ctf-visualizer-timeline.png index 8e7db3764a2..a64c7f47e52 100644 Binary files a/doc/qtcreator/images/qtcreator-ctf-visualizer-timeline.png and b/doc/qtcreator/images/qtcreator-ctf-visualizer-timeline.png differ diff --git a/doc/qtcreator/images/qtcreator-debugger-attach-to-running-debug-server.png b/doc/qtcreator/images/qtcreator-debugger-attach-to-running-debug-server.png index f991aa0cc3f..da89073d8a4 100644 Binary files a/doc/qtcreator/images/qtcreator-debugger-attach-to-running-debug-server.png and b/doc/qtcreator/images/qtcreator-debugger-attach-to-running-debug-server.png differ diff --git a/doc/qtcreator/images/qtcreator-heob-settings.png b/doc/qtcreator/images/qtcreator-heob-settings.png index 4f591860b9c..511b98588ef 100644 Binary files a/doc/qtcreator/images/qtcreator-heob-settings.png and b/doc/qtcreator/images/qtcreator-heob-settings.png differ diff --git a/doc/qtcreator/images/qtcreator-mcu-options.png b/doc/qtcreator/images/qtcreator-mcu-options.png index f01f1894379..1ebe08f243b 100644 Binary files a/doc/qtcreator/images/qtcreator-mcu-options.png and b/doc/qtcreator/images/qtcreator-mcu-options.png differ diff --git a/doc/qtcreator/images/qtcreator-options-android-main.png b/doc/qtcreator/images/qtcreator-options-android-main.png new file mode 100644 index 00000000000..a3f12902fcc Binary files /dev/null and b/doc/qtcreator/images/qtcreator-options-android-main.png differ diff --git a/doc/qtcreator/images/qtcreator-options-android-sdk-tools.png b/doc/qtcreator/images/qtcreator-options-android-sdk-tools.png new file mode 100644 index 00000000000..09a4b7dc0db Binary files /dev/null and b/doc/qtcreator/images/qtcreator-options-android-sdk-tools.png differ diff --git a/doc/qtcreator/images/qtcreator-options-android1.png b/doc/qtcreator/images/qtcreator-options-android1.png deleted file mode 100644 index 81a94cb5e49..00000000000 Binary files a/doc/qtcreator/images/qtcreator-options-android1.png and /dev/null differ diff --git a/doc/qtcreator/images/qtcreator-options-android2.png b/doc/qtcreator/images/qtcreator-options-android2.png deleted file mode 100644 index 5289c4b1b05..00000000000 Binary files a/doc/qtcreator/images/qtcreator-options-android2.png and /dev/null differ diff --git a/doc/qtcreator/src/analyze/creator-analyze.qdoc b/doc/qtcreator/src/analyze/creator-analyze.qdoc index 1e8ec44b5fa..1e98c0f2149 100644 --- a/doc/qtcreator/src/analyze/creator-analyze.qdoc +++ b/doc/qtcreator/src/analyze/creator-analyze.qdoc @@ -45,8 +45,9 @@ You can drag and drop the views in the \uicontrol Debug mode to new positions on the screen. The size and position of views are saved for future - sessions. Select \uicontrol {Window > Views > Reset to Default Layout} to - reset the views to their original sizes and positions. + sessions. Select \uicontrol Window > \uicontrol Views > + \uicontrol {Reset to Default Layout} to reset the views to their original + sizes and positions. You can use the following code analysis tools in the \uicontrol Debug mode: diff --git a/doc/qtcreator/src/analyze/creator-cppcheck.qdoc b/doc/qtcreator/src/analyze/creator-cppcheck.qdoc index b19ce718023..ab45382f741 100644 --- a/doc/qtcreator/src/analyze/creator-cppcheck.qdoc +++ b/doc/qtcreator/src/analyze/creator-cppcheck.qdoc @@ -38,20 +38,29 @@ The experimental Cppcheck Diagnostics plugin integrates diagnostics that are generated by the Cppcheck tool into the C++ editor. - To enable running Cppcheck automatically on currently open files: + Cppcheck is automatically run on open files. To select the files to + check in the currently active project, select \uicontrol Analyze > + \uicontrol Cppcheck. + + \section1 Enabling the Cppcheck Plugin + + To enable the Cppcheck plugin: \list 1 \li Select \uicontrol Help > \uicontrol {About Plugins} > \uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the plugin. \li Select \uicontrol {Restart Now} to restart \QC and load the plugin. - \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer - > \uicontrol Cppcheck to specify settings for running Cppcheck. - \image qtcreator-cppcheck-options.png "Cppcheck options" + \endlist + + \section1 Running Cppcheck on Selected Files + + \list 1 + \li Select \uicontrol Analyze > \uicontrol Cppcheck. + \image qtcreator-cppcheck-run-configuration.png "Cppcheck run configuration" \li In the \uicontrol Binary field, enter the path to the Cppcheck executable file. - \li In the \uicontrol Checks group, select the checks to perform on - currently open files. + \li In the \uicontrol Checks group, select the checks to perform. \note By default, Cppcheck uses multiple threads to perform checks. Selecting the \uicontrol {Unused functions} option disables the default behavior. @@ -78,8 +87,14 @@ calculate additional arguments based on current project's settings (such as the language used and standard version) and pass them to Cppcheck. + \li Select the files to run Cppcheck on. + \li Select \uicontrol Analyze. \endlist - \QC automatically runs Cppcheck on currently opened documents and displays - results via text marks or annotations. + \QC runs Cppcheck on the selected files and displays results via text + marks or annotations. + + To specify the settings above for the automatically run checks, + select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer + > \uicontrol Cppcheck. */ diff --git a/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc b/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc index e9680897d3a..5440c34fb94 100644 --- a/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc +++ b/doc/qtcreator/src/analyze/creator-ctf-visualizer.qdoc @@ -97,6 +97,10 @@ To reset the default zoom level, right-click the timeline to open the context menu, and select \uicontrol {Reset Zoom}. + Select the \inlineimage filtericon.png + (\uicontrol {Restrict to Threads}) button (10) to select the threads to + show. + \section2 Selecting Event Ranges You can select an event range (8) to view the time it represents or to zoom diff --git a/doc/qtcreator/src/analyze/creator-heob.qdoc b/doc/qtcreator/src/analyze/creator-heob.qdoc index 72c31913d30..54f0a4cf264 100644 --- a/doc/qtcreator/src/analyze/creator-heob.qdoc +++ b/doc/qtcreator/src/analyze/creator-heob.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -41,12 +41,17 @@ for detecting buffer overruns and memory leaks. You must download and install Heob to run it from \QC. + \image qtcreator-heob-settings.png + To run Heob on the currently open project: \list 1 \li Select \uicontrol Analyze > \uicontrol Heob. + \li Select the Heob settings profile to use, or select \uicontrol New + to create a new profile. + \li In the \uicontrol {Heob path} field, enter the path to the Heob executable. @@ -72,8 +77,6 @@ To specify settings for Heob, select \uicontrol Analyze > \uicontrol Heob. - \image qtcreator-heob-settings.png - In the \uicontrol {Extra arguments} field, enter additional arguments for running Heob. To list the available arguments in the Heob console, enter \c -H in this field and press \key Enter. @@ -83,7 +86,10 @@ leaks visually in the file and the \c -L1024 option to record leak contents up to 1024 bytes in the file. For example, \c {-oleaks.html -g2 -L1024} - Select \uicontrol Save to save the current settings as default. + To save the settings profile, select \uicontrol Save. + + To remove a customized settings profile, select the profile, and then + select \uicontrol Delete. The following sections describe the available options in more detail. diff --git a/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc b/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc index a10ee3f00ed..7c72c362c0d 100644 --- a/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc +++ b/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc @@ -59,9 +59,9 @@ For more information about analyzing applications for which you do not have a project, see \l{Running Valgrind Tools on External Applications}. - To select options for the Valgrind tools, select \uicontrol {Tools > Options > - Analyzer}. You can override the general settings for each project in the - \uicontrol {Run Settings} for the project. + To select options for the Valgrind tools, select \uicontrol Tools > + \uicontrol Options > \uicontrol Analyzer. You can override the general + settings for each project in the \uicontrol {Run Settings} for the project. The following sections describe how to use the Valgrind tools: @@ -74,4 +74,3 @@ \endlist */ - diff --git a/doc/qtcreator/src/analyze/creator-valgrind.qdoc b/doc/qtcreator/src/analyze/creator-valgrind.qdoc index 92c42fd48c9..b2b7cc7f686 100644 --- a/doc/qtcreator/src/analyze/creator-valgrind.qdoc +++ b/doc/qtcreator/src/analyze/creator-valgrind.qdoc @@ -93,8 +93,9 @@ Stack traces can get quite large and confusing, and therefore, reading them from the bottom up can help. If the stack trace is not big enough or it is - too big, select \uicontrol {Tools > Options > Analyzer} and define the - length of the stack trace in the \uicontrol {Backtrace frame count} field. + too big, select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer + and define the length of the stack trace in the + \uicontrol {Backtrace frame count} field. \image qtcreator-valgrind-memcheck-options.png "Memory Analysis options" @@ -138,7 +139,6 @@ */ - /*! \contentspage index.html \previouspage creator-analyzer.html @@ -221,8 +221,9 @@ separately for each project in the \l{Specifying Run Settings}{run settings} of the project. - To specify settings for Valgrind, select \uicontrol {Tools > Options > - Analyzer}. The \uicontrol {Profiling Options} group contains Callgrind options. + To specify settings for Valgrind, select \uicontrol Tools > + \uicontrol Options > \uicontrol Analyzer. The \uicontrol {Profiling Options} + group contains Callgrind options. \image qtcreator-valgrind-callgrind-options.png "Valgrind options" @@ -269,7 +270,6 @@ */ - /*! \contentspage index.html \previouspage creator-cache-profiler.html diff --git a/doc/qtcreator/src/android/androiddev.qdoc b/doc/qtcreator/src/android/androiddev.qdoc index 00737d5ef28..d03ea73b2c7 100644 --- a/doc/qtcreator/src/android/androiddev.qdoc +++ b/doc/qtcreator/src/android/androiddev.qdoc @@ -36,50 +36,42 @@ \title Connecting Android Devices - You can connect Android devices to the development PC to run, debug, - and analyze applications built for them from \QC. Devices with Android + You can connect Android devices to the development PC to build, run, debug, + and analyze applications from \QC. Devices with Android version 4.1 (API level 16) or later are supported. If you have a tool chain for building applications for Android devices installed on the development PC, you can add it to \QC. You can then add a \l{glossary-buildandrun-kit}{kit} - with the Android device type, the tool chain, and the Qt version for Android, - to build applications for and run them on Android devices. You can also - allow \QC to automatically configure the kit. + with the tool chain, and the Qt version for Android for the device's architecture, + to build applications for and run them on Android devices. Starting from Qt 5.14.0, + Qt for Android package contains all the architectures (ABIs) installed as one. + You can also allow \QC to automatically create kits for installed Qt version + and tool chains. The Android Debug Bridge (adb) command line tool is integrated to \QC to enable you to deploy applications to connected Android devices, to run - the applications on them, and to read logs from them. It includes a client - and server that run on the development host and a daemon that runs on the - emulator or device. + them, and to read their logs. It includes a client and server that run on + the development host and a daemon that runs on the emulator or device. \section1 Requirements To use \QC to develop Qt applications for Android, you need the following: \list - - \li \l{http://www.oracle.com/technetwork/java/javase/downloads/index.html} - {Java SE Development Kit (JDK)} version 6, or later. + \li \l{https://www.oracle.com/java/technologies/javase-jdk8-downloads.html} + {Java SE Development Kit (JDK)} version 6 up to 8. You can also use \l{http://openjdk.java.net/}{OpenJDK} on Linux. \note Android SDK Tools have issues with JDK versions later than 8. \li \l{http://www.gradle.org}{Gradle} for building application packages (APK) and app bundles (AAB) for Android devices. Gradle is delivered - with Qt 5.9, and later. Because Gradle scripts are not delivered - with Android SDK tools since version 26.0.0, they are delivered - with Qt 5.9 and 5.6.3. + with Qt 5.9, and later, because Gradle scripts are not delivered + with Android SDK tools since version 26.0.0. \note Using Ant to build APKs is no longer supported. - \li A tool chain for building applications for Android devices provided - by the \l{http://developer.android.com/tools/sdk/ndk/index.html} - {Android NDK} from Google. - - \note To develop with Qt 5.14.0 or later, you need Android NDK r20 - or later. - \li \l{http://developer.android.com/sdk/index.html}{Android SDK Tools} The following Android SDK packages and tools are required for @@ -89,47 +81,94 @@ \li Platform tools \li Build tools \li At least one SDK platform + \li The \l{http://developer.android.com/tools/sdk/ndk/index.html} + {Android NDK} from Google that provides the tool chain for + building applications for Android devices. For a detailed + list of Qt versions and their recommended NDK versions, + see \l{https://doc-snapshots.qt.io/qt5-5.14/android-getting-started.html} + {The Android NDK}. \endlist - \li On Windows, you also need the following: - - \list - - \li Android Debug Bridge (ADB) driver on the Windows platform to - enable USB debugging. The default USB driver on Windows does not - allow debugging. For more information about obtaining the USB - driver, see \l{http://developer.android.com/sdk/win-usb.html}. - - After installing the driver, try running a few basic - \l{http://developer.android.com/tools/help/adb.html}{adb} - commands to check that your device responds to them. - - \endlist - - \note When using the command line tools instead of Android Studio, - it is recommended to create an empty folder and extract the - downloaded archive into this folder. - The sdkmanager will install downloaded packages next to the - \c tools folder that contains all command line tools. - You must specify the path to the folder where you extracted the - files as Android SDK location inside the Android settings. - + \li On Windows, you also need the Android Debug Bridge (ADB) driver + on the Windows platform to enable USB debugging. The default USB + driver on Windows does not allow debugging. For more information + about installing ADB, see \l {ADB windows driver} + {ADB driver installation}. \endlist \section1 Setting Up the Development Environment - You must download and install the latest Android NDK and SDK, and then - update or install the tools and packages needed for development. However, - if your Qt version is earlier than v5.9, use the SDK tools package v25.2.5 - or earlier. + To build Android applications with Qt, install Qt for Android 5.2, or later. - The SDK tool used to update and install the other SDK tools and packages - depends on the Android SDK Tools version that you have installed: + \note You can build a 64-bit version of Qt for Android yourself. However, + for such a Qt version, the minimum required Android version on devices + is 5.0 (API level 21). + + For more information, see \l{Qt for Android}. + + Download and install the latest Android SDK, and then install + or update the NDKs, tools and packages needed for development. + + Starting from \QC 4.12, \QC offers to automatically set up your Android + environment and install all the necessary packages and Tools, then + creating debuggers, tool chains, and kits. For more information, + see \l {Specifying Android Device Settings}. + + Alternatively, use the Android SDK command line tools to install + the required packages. In that case, it is recommended to create an + empty folder and extract the downloaded archive into this folder. + + \note The recommended Android SDK Tools version is 25.3.0, or later. The version + 25.2.5, or earlier, can be used but it is not advised because it cannot be + fully integrated with \QC. \list + \li Android SDK Tools version 25.3.0, or later + + This allows using the + \l{https://developer.android.com/studio/command-line/sdkmanager.html} + {sdkmanager} command line tool for SDK package management and the + \l{https://developer.android.com/studio/command-line/avdmanager.html} + {avdmanager} tool for Android Virtual Device (AVD) management. + + The sdkmanager will install downloaded packages next to the \c tools + folder that contains all command line tools. You must specify the path + to the folder where you extracted the files as Android SDK location + inside the Android settings. + + To install those packages, use the following command: + + \badcode + ./sdkmanager "platform-tools" "platforms;android-29" "build-tools;29.0.2" "ndk-bundle" + \endcode + + For Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1, the following + should be installed instead: + + \badcode + ./sdkmanager "platform-tools" "platforms;android-29" "build-tools;28.0.2" "ndk;19.2.5345600" + \endcode + + \target ADB windows driver + Under Windows, Google's USB drivers can be installed by running: + + \badcode + sdkmanager.bat "extras;google;usb_driver" + \endcode + + For more information about altenative methods of obtaining the USB + driver, see \l{http://developer.android.com/sdk/win-usb.html}. + After the package installation is complete, install the driver from + \c{/extras/google/usb_driver}. Try running a few basic + \l{http://developer.android.com/tools/help/adb.html}{adb} commands now + and check whether your Android device responds to them. \li Android SDK Tools version 25.2.5, or earlier + If your Qt version is earlier than v5.9, use this SDK tools version. + The SDK tool used to install and update the other SDK tools and packages + depends on the Android SDK Tools version that you have installed: + Use the \l{https://developer.android.com/studio/tools/help/android.html} {android} tool that comes with the SDK Tools package. For example, @@ -139,54 +178,97 @@ ./android update sdk \endcode - \li Android SDK Tools version 25.3.0, or later - - Use the - \l{https://developer.android.com/studio/command-line/sdkmanager.html} - {sdkmanager} command line tool for SDK package management and the - \l{https://developer.android.com/studio/command-line/avdmanager.html} - {avdmanager} tool for Android Virtual Device (AVD) management. - \endlist - In addition, you must install Qt for Android as part of Qt 5.2, or later. - - \note You can build a 64-bit version of Qt for Android yourself. However, - for such a Qt version, the minimum required Android version on devices - is 5.0 (API level 21). - - For more information, see \l{Qt for Android}. - \section2 Specifying Android Device Settings - To configure connections between \QC and Android devices: + To configure connections to Android devices and general Android settings: \list 1 \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices > \uicontrol Android. - \image qtcreator-options-android1.png "Android options" + \image qtcreator-options-android-main.png "Android options" - \li In the \uicontrol {JDK location} field, add the path to the JDK. + \li In the \uicontrol {JDK location} field, set the path to the JDK. - Select the \inlineimage icons/download-icon.png - (\uicontrol Download) button to go to the site where you can - download the JDK. \QC checks the JDK installation and reports - errors. + By default, \QC tries to find any valid JDK/OpenJDK installation. + However, if none is found, you must set it manually. Click the + \inlineimage icons/download-icon.png + (\uicontrol Download) button to open the JDK download web page in the + default browser. \QC checks the JDK installation and reports errors. - \li In the \uicontrol {Android Settings} group, add paths to the Android - NDK and SDK. + \li In the \uicontrol {Android Settings} group, set the path to the + Android SDK Tools. - Select \inlineimage icons/download-icon.png - to go to the sites where you can download the Android NDK and SDK. + Select \inlineimage reload_gray.png + button to automatically download and extract the Android SDK Tools + to the selected path. This will do the following: + + \list 1 + \li Download and extract the Android SDK Tools. + \li Install or update the essential packages such as NDKs, + build tools, platform tools. + \endlist + + The SDK Tools download URL, the essential packages list, and the + appropriate NDK for each Qt version are defined in a JSON + configuration file. The file is located under the user's \QC + resource folder: + + \badcode + # Linux and macOS + ~/.config/QtProject/qtcreator/android/sdk_definitions.json + + # Windows + C:\Users\Username\AppData\Local\QtProject\qtcreator\android\sdk_definitions.json + \endcode + + For example, the SDK configuration file defines the NDK version 19.2.5345600 + to be used for Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1 versions: + + \badcode + "specific_qt_versions": [ + { + "versions": ["5.12.[0-5]", "5.13.[0-1]"], + "sdk_essential_packages": ["build-tools;28.0.2", "ndk;19.2.5345600"], + "ndk_path": "ndk/19.2.5345600" + } + ] + \endcode + + The latest version of the configuration file that is up-to-date + with the Android SDK and NDK changes is found + \l{https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/share/qtcreator/android/sdk_definitions.json}{here}. + + The installed NDK versions are listed below the SDK path. + The items with a lock icon are versions installed from the SDK Manager, + and can only be modified from the SDK Manager tab. For more information, + see \l{Managing Android SDK Packages}. Custom NDK paths can be manually + added to the global list of NDKs via the \uicontrol Add button. + This creates custom tool chains and debuggers associated to + that NDK, which can be used to create custom kits defined by the user. + + To manually download the SDK Tools, select \inlineimage icons/download-icon.png + to open the SDK or NDK download web page in the default browser. The SDK Manager checks the Android NDK and SDK installations, reports errors, and offers to install the necessary packages. - \image qtcreator-options-android2.png "Android NDK and SDK checks" + \image qtcreator-options-android-sdk-tools.png "Android NDK and SDK checks" - For more information, see \l {Managing Android SDK Packages}. + \li In the \uicontrol {Android OpenSSL} group, set the path to the + prebuilt OpenSSL libraries. + + For Qt applications that require OpenSSL support, \QC allows to + quickly add the \l{https://marketplace.qt.io/products/android-openssl-support} + {Android OpenSSL support} to your project. For more details, see + \l{Adding External Libraries}. + + Select \inlineimage icons/download-icon.png + to download the OpenSSL repository to the selected path. If the + automatic download fails, the download web page opens for manual download. \li Select the \uicontrol {Automatically create kits for Android tool chains} check box to allow \QC to create the kits for you. \QC displays a @@ -213,12 +295,13 @@ Debugging is enabled in different ways on different Android devices. Look for \uicontrol {USB Debugging} under \uicontrol {Developer Options}. On some devices \uicontrol {Developer Options} is hidden and becomes visible - when you tap the \uicontrol {Build number} field in \uicontrol Settings > - \uicontrol About several times. + only when you tap the \uicontrol {Build number} field in \uicontrol Settings > + \uicontrol About several times. For more details, check + \l{https://developer.android.com/studio/debug/dev-options}{Configure on-device developer options}. \li Connect the Android device to the development PC with a USB cable. You might be asked to select a device in the - \uicontrol {Select Android Devices} dialog. + \l{Selecting Android Devices}{Select Android Devices} dialog. \endlist \section2 Managing Android SDK Packages @@ -230,11 +313,12 @@ removing SDK packages. You can still use sdkmanager for advanced SDK management. - When you add paths to the Anroid NDK and SDK in the device options, the + After you set the path to the Anroid SDK in \uicontrol Tools > + \uicontrol Options > \uicontrol Devices > \uicontrol Android, the SDK Manager checks that all the necessary SDK packages have been installed. If packages are missing or updates are needed, the SDK Manager offers to - add and remove packages, as necessary. Before taking action, it prompts you - to accept the changes it is about to make. In addition, it prompts you to + add or remove those packages. Before taking action, it prompts + you to accept the changes it is about to make. In addition, it prompts you to accept Google licenses, as necessary. To view the installed Android SDK packages, select \uicontrol Tools > @@ -261,13 +345,40 @@ different Android SDK Tools versions. If you have the native SDK Manager installed, you can open it by selecting \uicontrol {Native SDK Manager}. + \section1 Managing Android Virtual Devices (AVD) + + A list of AVDs is shown under \uicontrol Tools > \uicontrol Options > + \uicontrol Devices > \uicontrol Android > \uicontrol {AVD Manager}. This + works only with a valid \uicontrol {SDK Tools} path being set. The value in + \uicontrol {System/data partition size} is used to set the emulator's system + partition size upon execution with \uicontrol {Start}. + + \image qtcreator-android-avd-manager.png "Android NDK and SDK checks" + + \section1 Creating a New AVD + + To create new virtual devices, select \uicontrol Tools > \uicontrol Options > + \uicontrol Devices > \uicontrol Android > \uicontrol {AVD Manager} > \uicontrol {Add}. + + In the \uicontrol {Create new AVD} dialog, you can create a new custom AVD + by setting the name, device type, skin, architecture, API level, and SD card + size. You need to have a valid \uicontrol {System Image} installed + before using this dialog, either from \QC's \uicontrol {SDK Manager} tab or + from Android Studio. + + For more advanced options for creating a new AVD, use the command-line tool + \l{https://developer.android.com/studio/command-line/avdmanager.html}{avdmanager}, + or use Android Studio's native AVD Manager's UI. + + \image qtcreator-android-create-avd.png "Android NDK and SDK checks" + \section1 Selecting Android Devices When you deploy an application to an Android device with Android - version 4.2 or later, the \uicontrol {Select Android Devices} dialog opens. It - lists the devices that are connected to the development PC. and their - status. You can select devices from the \uicontrol {Compatible Devices} list for - deployment. + version 4.2 (API 16) or later, the \uicontrol {Select Android Device} dialog + opens. It lists the devices that are connected to the development PC, as + well as AVDs, and their status. You can select devices or AVDs from the + \uicontrol {Compatible Devices} list for deployment. If \QC determines that a device is not ready for deployment, it places the device in the \uicontrol {Incompatible Devices} list, with information about the @@ -276,34 +387,41 @@ \uicontrol {Refresh Device List}. The device is moved to the \uicontrol {Compatible Devices} list and you can select it for deployment. - Other reasons for placing a device on the \uicontrol {Incompatible Devices} are + Other reasons for showing a device in \uicontrol {Incompatible Devices} are that the Android version on the device is too old or that the tool chain used for building does not match the Android architecture on the device (for example, you cannot deploy an ARM build on an x86 device). \image qtcreator-android-select-devices.png "Select Android Devices dialog" - AVDs are also listed. To create new AVDs, select - \uicontrol {Create Android Virtual Device}. + To \l{Creating a New AVD}{create a new AVD}, select \uicontrol {Create Android Virtual Device}. - To set a device as the default device for a particular Android architecture, - select the \uicontrol {Always use this device for architecture} check box. The - \uicontrol {Select Android Devices} dialog will not appear until you switch to - another project or restart \QC. + To set a device as the default device for a particular Android architecture + for the current project, select the \uicontrol {Always use this device for architecture} + check box. The \uicontrol {Select Android Devices} dialog will not appear + until you switch to another project or restart \QC. \section1 Using the Android Emulator - To run your application on the Android Emulator, you must create Android - virtual devices (AVD). Select \uicontrol Tools > \uicontrol Options > - \uicontrol Devices > \uicontrol Android > - \uicontrol Add. If you run an application without a device connected to the + To run your application on the Android Emulator, you must have an Android + virtual device (AVD). For more information about creating a new one, see + \l{Creating a New AVD}. If you run an application without a device connected to the development PC and without an AVD specified, \QC asks you to add an AVD. - To manage AVDs, select \uicontrol {Start AVD Manager}. + For Android SDK Tools 25.2.5, or earlier, select \uicontrol {Native AVD Manager} + to manage AVDs. \note The Android Emulator has a bug that prevents it from starting on some systems. If the Android Emulator does not start, you can try starting it - manually by running the \c {emulator-arm} command from the command line. + manually by running the following commands: + + \badcode + cd /emulator + ./emulator -avd + \endcode + + For more information, see \l{https://developer.android.com/studio/run/emulator-commandline} + {Start the emulator from the command line}. \section1 Debugging on Android Devices @@ -312,6 +430,9 @@ \note \QC cannot debug applications on Android devices if Android Studio is running. If the following message is displayed in the \uicontrol Output - pane, close Android Studio and try again: \e {Ignoring second debugger - - accepting and dropping.} + pane, close Android Studio and try again: + + \badcode + Ignoring second debugger -accepting and dropping. + \endcode */ diff --git a/doc/qtcreator/src/android/creator-projects-settings-run-android.qdocinc b/doc/qtcreator/src/android/creator-projects-settings-run-android.qdocinc index fa3deeb9073..b5f781c87e1 100644 --- a/doc/qtcreator/src/android/creator-projects-settings-run-android.qdocinc +++ b/doc/qtcreator/src/android/creator-projects-settings-run-android.qdocinc @@ -37,6 +37,18 @@ \uicontrol {Activity manager start options} field. However, if the default options conflict with the added options, the application might not start. + The default arguments for the Activity manager for a normal run: + + \badcode + am start -n org.qtproject.example.notification/org.qtproject.qt5.android.bindings.QtActivity + \endcode + + The default arguments for the Activity manager for the debugger mode: + + \badcode + am start -n org.qtproject.example.notification/org.qtproject.qt5.android.bindings.QtActivity -D + \endcode + For example, to run the application as a particular user, enter the start option \c {--user 10}, where \c 10 is the user ID of the user account. diff --git a/doc/qtcreator/src/android/deploying-android.qdoc b/doc/qtcreator/src/android/deploying-android.qdoc index 7690b435a6a..966b1d629e4 100644 --- a/doc/qtcreator/src/android/deploying-android.qdoc +++ b/doc/qtcreator/src/android/deploying-android.qdoc @@ -46,19 +46,14 @@ \QC supports the following methods of deployment for Android applications: - \list - + \list \li As a stand-alone, distributable application package (APK). - - \li As a minimal APK that contains a dependency to the Ministro tool. - The Ministro tool downloads the necessary Qt libraries from a - repository of your choice. - \li Since Qt 5.14.0, as an app bundle (AAB), intended for distribution in the Google Play store. - \endlist + \note Since \QC 4.12, Ministro is not supported. + To specify settings for application packages, select \uicontrol Projects > \uicontrol {Build Android APK} > \uicontrol Details. @@ -67,23 +62,6 @@ see \l {Specifying Run Settings for Android Devices}. \endif - \section1 Using Ministro to Install Qt Libraries - - To minimize the size of your APK, you can package the application with an - external dependency called Ministro. If a user downloads your application, - and it is the first application on their device to depend on Ministro, they - are asked to install Ministro before they can run your application. - - Ministro serves as a central repository for Qt libraries. This enables - several applications to share the libraries, which only need to be installed - once. To use this deployment method, you must set up a repository for the - libraries that you want to distribute. To specify the - repository URL, edit the file \c {android/res/values/libs.xml}, which is - created by \QC. - - To use Ministro to install the Qt libraries, select the - \uicontrol {Use Ministro service to install Qt} option. - \section1 Packaging Applications Because bundling applications as APK packages is not @@ -126,8 +104,8 @@ The packages are deployed on the connected Android devices. To switch the device used as a default device for the selected kit, select - \uicontrol Projects > \uicontrol Run > - \uicontrol {Reset Default Devices}. The setting applies until you restart \QC. + \uicontrol Projects > \uicontrol Run > \uicontrol {Deploy to Android device} + > \uicontrol {Reset Default Devices}. The setting applies until you restart \QC. For more information, see \l{Selecting Android Devices}. For more information about the \c androiddeployqt tool, see @@ -137,7 +115,7 @@ You can specify settings for the \c androiddeployqt tool in \QC and in the project .pro file. To specify settings in \QC, select \uicontrol Projects > - \uicontrol {Build Android APK} > \uicontrol Details. + \uicontrol Build > \uicontrol {Build Android APK} > \uicontrol Details. \image qtcreator-android-deploy-configurations.png "Deploy configurations" @@ -150,6 +128,22 @@ the \uicontrol {Compile Output} pane. To view additional information, select the \uicontrol {Verbose output} check box. + \section3 Selecting API Level + + In the \uicontrol {Android build SDK} field, you can select the API level to use + for building the application. Usually, you should select the newest API + level available. + + \note For Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1, Android build SDK 28 should + be used. For recent versions than the latter, build SDK 29, or the most recent + should be used. + + This field does not specify the minimum supported API level nor the target + API level, which you can specify in the Android manifest. See + \l{Editing Manifest Files}. For more information about Android API levels, see + \l{http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels} + {What is API Level?}. + \section3 Building AABs For testing the application locally, use the APK format, because @@ -167,18 +161,6 @@ \image qtcreator-android-build-steps.png "Android Build Steps" - \section3 Selecting API Level - - In the \uicontrol {Android build SDK} field, you can select the API level to use - for building the application. Usually, you should select the newest API - level available. - - This field does not specify the minimum supported API level nor the target - API level, which you can specify in the Android manifest file. - For more information about Android API levels, see - \l{http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels} - {What is API Level?}. - \section3 Signing Android Packages To publish your application, you must sign it by using a \e {public-private @@ -211,9 +193,9 @@ \list 1 - \li In the \uicontrol Keystore field, select \uicontrol Create to create a new - keystore that contains one key pair in the \uicontrol {Create Keystore and - a Certificate} dialog: + \li In the \uicontrol Keystore field, select \uicontrol Create to create + a new keystore that contains one key pair in the + \uicontrol {Create a Keystore and a Certificate} dialog: \image qtcreator-android-certificate.png @@ -238,8 +220,8 @@ \endlist - To sign an Android package by using a key pair, specify settings in the - \uicontrol {Sign package} group: + To sign an Android package by using a key pair, set the \uicontrol {Sign package} + group settings described in \l{Specifying Settings for Packages}: \list 1 @@ -258,21 +240,29 @@ \QC automatically detects which Qt libraries the application uses and adds them as dependencies. If the application needs external libraries, specify - them in the \uicontrol {Additional Libraries} field. The libraries are copied into + them in \uicontrol Projects > \uicontrol Build > \uicontrol {Build Android APK} + > \uicontrol {Additional Libraries} field. The libraries are copied into your application's library folder and loaded on startup. - For example, to enable OpenSSL in your application, add the paths to the - required \c libssl.so and \c libcrypto.so libraries to the - \uicontrol {Additional Libraries} field. + To add OpenSSL libraries, select \uicontrol {Include prebuilt OpenSSL libraries} + in the \uicontrol {Additional Libraries} group. This will add the OpenSSL + include project defined in \l{Specifying Android Device Settings}{device settings} + in \uicontrol {Android OpenSSL} group. This can be used for QMake and CMake + projects. - \section3 Editing Manifest Files + Otherwise, you can manually add the paths to the required \c libssl.so and + \c libcrypto.so libraries to the \uicontrol {Additional Libraries} field. + + \section1 Editing Manifest Files You can use the qmake variables to specify all the settings you need for the \c androiddeployqt tool and you do not need an - Android manifest file until you want to publish the package in an - application store. To specify additional settings for APK packages, you can - create an Android manifest file and edit it in \QC. Select - \uicontrol {Create Templates} to create the file and to open it in the + Android manifest file unless you need to specify Android specific settings + like the application's icon. Also, the manifest file is needed if you want + to publish the package in the Play Store. + You can create an Android manifest file and edit it in \QC. Select + \uicontrol Projects > \uicontrol Build > \uicontrol {Build Android APK} + > \uicontrol {Create Templates} to create the file and to open it in the Android Manifest Editor. \image qtcreator-android-manifest-editor.png "Android Manifest Editor" @@ -292,9 +282,10 @@ field, specify the version number that is shown to users. \li In the \uicontrol {Minimum required SDK} field, select the minimum API level - required to run the application. The minimum supported API level is - android-9. \QC does not allow you to select an API - level that the Qt version specified for the kit does not support. + required to run the application. The minimum supported API level for \QC is + android-9. However, Qt versions might have different minimum API levels, and + therefore \QC does not allow you to select an API level that the Qt version + specified for the kit does not support. \li In the \uicontrol {Target SDK} field, select the targeted API level of the application. This affects the activation of some compatibility features in @@ -302,42 +293,49 @@ means that the overflow button in the system navigation bar will not be enabled by default. - \li In the \uicontrol Application group, you can give the application a name and - select an icon for it. The three icon fields can contain different versions - of the icon with low, medium, and high DPI values, from left to right. - You can also give an activity a name and select the activity to run. + \li In the \uicontrol Application group, you can set the application's name. + You can also give an activity a name and select the activity to run. + + \li The \uicontrol {Style extraction} combo box sets the used method that Qt + uses to extract style information. It has the following values: + \list + \li \uicontrol Default or \uicontrol Full: Use this when working with + Qt Widgets or Qt Quick Controls 1. + + \note This method uses some Android non-SDK interfaces, + that are being restricted by Google starting from Android 9.0 + (API 28). + \li \uicontrol minimal: Use this when working with Qt Quick Controls 2 + with no Qt Widgets or Qt Quick Controls 1. This is faster than + \uicontrol full or \uicontrol default. + \li \uicontrol none: Use this if you're not working with Qt Widgets, + or Qt Quick Controls 1 or 2 in your project. + \endlist + + \li In \uicontrol {Application icon}, select an icon. Click the + \uicontrol {Master icon} button to select an icon with the highest resolution, + then, it will resize and set the three icon fields for low, medium, and high DPI icons + as needed. \li In the \uicontrol Permissions field, you can specify the permissions that your - application needs. Users are asked to grant the permissions when they - install the application. Android OS then grants the application access to - the appropriate data and features. + application needs. Starting from Android 6.0 (API 23), permissions have to be + requested at runtime (See \l{QtAndroidExtras}{requestPermissionsSync} or + \l{QtAndroidExtras}{requestPermissions}). For lower Android API levels, + users are asked to grant the permissions when they install the application. + Android OS then grants the application access to the appropriate data and features. \li Select the \uicontrol {Include default permissions for Qt modules} and \uicontrol {Include default features for Qt modules} check boxes to add the - permissions needed by Qt libraries. + permissions needed by Qt libraries. This can be + android.permission.WRITE_EXTERNAL_STORAGE for QtCore, or + android.permission.ACCESS_COARSE_LOCATION for QtLocation. - \li To add permissions, select them in the list, and then select \uicontrol Add. + \li To add a permission, select it from the list, and then click \uicontrol Add. \endlist - Select the \uicontrol {XML Source} tab to edit the file in XML format. - - \section1 Installing Ministro - - The easiest way to install Ministro is to do it on the device via Google - Play. When you run the application for the first time, a dialog pops up and - guides you through the installation. - - To use \QC to install Ministro, you must first download the Ministro .apk - from the Google Market or from the - \l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page. - - Then select \uicontrol Projects > \uicontrol Run > \uicontrol {Install Ministro from APK}. - - You can use this option also to install any Android package (.apk). - - You can use this option to install applications on an Android Virtual - Device (AVD). + On the top header, select the \uicontrol {XML Source} tab to edit the file + in XML format. */ diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index 78ac325ab46..3df294cfdb4 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -380,6 +380,11 @@ debugger at the main function. \li In the \uicontrol {Server start script} field, specify a script file to run when the server starts. + \li In the \uicontrol {Init commands} field, enter the commands + to execute immediately after the connection to a target has + been established. + \li In the \uicontrol {Reset commands} field, enter the commands + to execute when resetting the connection to a target. \li In the \uicontrol {Debug information} field, specify the location for storing debug information. You cannot use an empty path. \li In the \uicontrol {Override server channel} field, specify a @@ -620,6 +625,9 @@ To save space on the screen, select \uicontrol Window > \uicontrol Views > \uicontrol {Automatically Hide View Titlebars}. + To show and hide columns in views, toggle \uicontrol {Show Column} in + the context menu. + Once the program starts running under the control of the debugger, it behaves and performs as usual. You can interrupt a running C++ program by selecting \uicontrol Debug > \uicontrol Interrupt. The program is diff --git a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc index 6bb11abf254..f646e752c9d 100644 --- a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc +++ b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc @@ -79,8 +79,8 @@ the \uicontrol {Enable QML} check box to enable QML debugging. - \li Select \uicontrol {Build > Rebuild Project} to clean and rebuild the - project. + \li Select \uicontrol Build > \uicontrol {Rebuild Project} to clean and + rebuild the project. \li To debug applications on \l{glossary-device}{devices}, check that Qt 5.0, or later, libraries are installed on the device and @@ -144,7 +144,8 @@ the application from running until the debug client connects to the server. This enables debugging from the start. - \li Select \uicontrol {Debug > Start Debugging > Attach to QML Port}. + \li Select \uicontrol Debug > \uicontrol {Start Debugging} > + \uicontrol {Attach to QML Port}. Choose the kit configured for the device where the application to be debugged is running. The port number to use is displayed in the diff --git a/doc/qtcreator/src/editors/creator-editors-options-text.qdoc b/doc/qtcreator/src/editors/creator-editors-options-text.qdoc index 4ef6e256fa9..41a394b3d13 100644 --- a/doc/qtcreator/src/editors/creator-editors-options-text.qdoc +++ b/doc/qtcreator/src/editors/creator-editors-options-text.qdoc @@ -42,7 +42,8 @@ \title Specifying Text Editor Settings Set the font preferences and apply color schemes for syntax highlighting in - \uicontrol {Tools > Options > Text Editor > Font & Colors}. + \uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} > + \uicontrol {Font & Colors}. \image qtcreator-font-colors.png "Text editor options" diff --git a/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc b/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc index eb796422dd3..1f5e6bb1754 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc @@ -69,7 +69,8 @@ \list 1 - \li Select \uicontrol {Tools > Options > Environment > MIME Types}. + \li Select \uicontrol Tools > \uicontrol Options > + \uicontrol Environment > \uicontrol {MIME Types}. \image qtcreator-mime-types.png "MIME Types" diff --git a/doc/qtcreator/src/external-resources/external-resources.qdoc b/doc/qtcreator/src/external-resources/external-resources.qdoc index bcc9b366409..138f8ca09f6 100644 --- a/doc/qtcreator/src/external-resources/external-resources.qdoc +++ b/doc/qtcreator/src/external-resources/external-resources.qdoc @@ -34,3 +34,24 @@ \title macOS \internal */ + +/*! + \externalpage https://doc.qt.io/QtForMCUs/qtul-environment.html + \title Qt for MCUs - Supported Target Platforms +*/ +/*! + \externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-stm.html + \title Getting Started on STM +*/ +/*! + \externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-stm.html + \title Getting Started on STM +*/ +/*! + \externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-nxp.html + \title Getting Started on NXP +*/ +/*! + \externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-windows.html + \title Getting Started on Windows +*/ diff --git a/doc/qtcreator/src/howto/creator-external-tools.qdoc b/doc/qtcreator/src/howto/creator-external-tools.qdoc index def82871b49..84e49851015 100644 --- a/doc/qtcreator/src/howto/creator-external-tools.qdoc +++ b/doc/qtcreator/src/howto/creator-external-tools.qdoc @@ -70,8 +70,8 @@ \uicontrol Linguist > \uicontrol {Release Translations (lrelease)}. By default, the project .pro file is passed to the tools as an argument. To - specify other command line arguments for the tools, select \uicontrol {Tools > - External > Configure}. + specify other command line arguments for the tools, select \uicontrol Tools > + \uicontrol External > \uicontrol Configure}. To open TS files in Qt Linguist, right-click a TS file in the \uicontrol Projects or \uicontrol {File System} view and select @@ -111,9 +111,10 @@ \list 1 - \li Select \uicontrol {Tools > External > Configure}. + \li Select \uicontrol Tools > \uicontrol External > + \uicontrol Configure. - \li Select \uicontrol {Add > Add Tool} + \li Select \uicontrol Add > \uicontrol {Add Tool} to add a new tool. You can also select \uicontrol {Add Category} to add a new category. @@ -163,7 +164,8 @@ \endlist - The category and tool are added to the \uicontrol {Tools > External} menu. + The category and tool are added to the \uicontrol Tools > + \uicontrol External menu. If you change the configuration of preconfigured tools, you can later revert the changes by selecting the \uicontrol Reset button. diff --git a/doc/qtcreator/src/howto/creator-help.qdoc b/doc/qtcreator/src/howto/creator-help.qdoc index abf949be08b..fdaa0e2717f 100644 --- a/doc/qtcreator/src/howto/creator-help.qdoc +++ b/doc/qtcreator/src/howto/creator-help.qdoc @@ -78,11 +78,11 @@ \section1 Viewing Function Tooltips - To hide function tooltips by default, select \uicontrol {Tools > Options > - Text Editor > Behavior > Show help tooltips using the mouse > - On Shift+Mouseover}. You - can still view the tooltips by pressing and holding down the \key Shift - key. + To hide function tooltips by default, select \uicontrol Tools > + \uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior > + \uicontrol {Show help tooltips using the mouse} > + \uicontrol {On Shift+Mouseover}. You can still view the tooltips by pressing + and holding down the \key Shift key. To use a keyboard shortcut for viewing help tooltips, select \uicontrol {Show help tooltips using keyboard shortcut (Alt)}. @@ -256,7 +256,8 @@ \list 1 - \li Select \uicontrol {Tools > Options > Help > Filters > Add}. + \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Help > + \uicontrol Filters > \uicontrol Add. \li Enter a name for the filter and press \uicontrol {OK}. diff --git a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc index 59048bf5eec..661d8495bab 100644 --- a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc +++ b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc @@ -50,8 +50,8 @@ To view all functions available in \QC and the keyboard shortcuts defined for them, select - \uicontrol {Tools > Options > Environment > Keyboard}. The shortcuts are listed by - category. To find a keyboard + \uicontrol Tools > \uicontrol Options > \uicontrol Environment > + \uicontrol Keyboard. The shortcuts are listed by category. To find a keyboard shortcut in the list, enter a function name or shortcut in the \uicontrol Filter field. diff --git a/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc b/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc index d210b00618f..b96d23be879 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc @@ -255,7 +255,8 @@ create your own locator filters. That way you can locate files in a directory structure you have defined. - To create locator filters, select \uicontrol {Tools > Options > Locator > Add}. + To create locator filters, select \uicontrol Tools > \uicontrol Options > + \uicontrol Locator > \uicontrol Add. For more information, see \l{Creating Locator Filters}. @@ -275,9 +276,9 @@ \section1 Add a license header template for C++ code A file containing a license header for C++ can be specified under - \uicontrol{Tools > Options > C++ > License Template}. It may contain special - placeholders enclosed in \c{%%} that are replaced when generating a - new file: + \uicontrol Tools > \uicontrol Options > \uicontrol C++ > + \uicontrol {License Template}. It may contain special placeholders enclosed + in \c{%%} that are replaced when generating a new file: \list 1 diff --git a/doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc b/doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc index e58ba61f4a7..0c939f5d27b 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-sessions.qdoc @@ -39,7 +39,8 @@ When you exit \QC, a snapshot of your current workspace is stored as a \e session. To restore the session automatically when you start \QC, - select \uicontrol {File > Sessions > Manage > Restore last session on startup}. + select \uicontrol File > \uicontrol Sessions > \uicontrol Manage > + \uicontrol {Restore last session on startup}. When you open or create any of the following items, they automatically become a part of the session: diff --git a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc index 6928e6ed939..19dae2d72ed 100644 --- a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc +++ b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc @@ -55,9 +55,9 @@ compiler. What should I do?} Make sure that the application is in your system PATH when starting \QC. - Also select \uicontrol {Tools > Options} to check the settings specified - for the application. Many plugins specify either the path to the tool they - need or the environment they run in. + Also select \uicontrol Tools > \uicontrol Options to check the settings + specified for the application. Many plugins specify either the path to the + tool they need or the environment they run in. This is especially relevant for the \macos where \c {/usr/local/bin} might not be in the path when \QC is started. @@ -66,9 +66,10 @@ \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. Select - \uicontrol {Restart Now} to restart \QC and have the change take effect. + To change the language, select \uicontrol Tools > \uicontrol Options > + \uicontrol Environment and select a language in the \uicontrol Language + field. Select \uicontrol {Restart Now} to restart \QC and have the change + take effect. \b {Has a reported issue been addressed?} @@ -172,8 +173,9 @@ \uicontrol Help mode. To view the documentation that is available and to add documentation, - select \uicontrol {Tools > Options > Help > Documentation}. For more - information, see \l{Adding External Documentation}. + select \uicontrol Tools > \uicontrol Options > \uicontrol Help > + \uicontrol Documentation. For more information, see + \l{Adding External Documentation}. \section1 Debugger Questions @@ -195,10 +197,11 @@ \b {How do I generate a core file in \QC?} To trigger the GDB command that generates a core file while debugging, - select \uicontrol {Window > Views > Debugger Log}. In the \uicontrol Command field, - type \c gcore and press \key Enter. The core file is created in the - current working directory. You can specify another location for the file, - including a relative or absolute path, as an argument of the command. + select \uicontrol Window > \uicontrol Views > \uicontrol {Debugger Log}. + In the \uicontrol Command field, type \c gcore and press \key Enter. The + core file is created in the current working directory. You can specify + another location for the file, including a relative or absolute path, as an + argument of the command. \omit To generate a temporary core file, select \uicontrol {Create Snapshot} in the @@ -272,8 +275,8 @@ type of application, \c qDebug() and related functions use standard output and error output. - We recommend that you select \uicontrol {Projects > Run Settings > Run in - terminal} for console applications. + We recommend that you select \uicontrol Projects > \uicontrol {Run Settings} > + \uicontrol {Run in terminal} for console applications. For GUI applications, \c qDebug() and related functions use the Windows API function \c OutputDebugString(). The output is displayed in the diff --git a/doc/qtcreator/src/howto/creator-ui.qdoc b/doc/qtcreator/src/howto/creator-ui.qdoc index 68d0d4e6fb4..543c1405605 100644 --- a/doc/qtcreator/src/howto/creator-ui.qdoc +++ b/doc/qtcreator/src/howto/creator-ui.qdoc @@ -386,7 +386,7 @@ \else \l{Using Git}{Version Control} \endif - panes, select \uicontrol {Window > Output Panes}. + panes, select \uicontrol Window > \uicontrol {Output Panes}. \if defined(qtcreator) To display the \uicontrol {To-Do Entries} pane, enable the Todo plugin. \endif diff --git a/doc/qtcreator/src/howto/creator-views.qdoc b/doc/qtcreator/src/howto/creator-views.qdoc index 1ae508d3401..fe7c8254f3f 100644 --- a/doc/qtcreator/src/howto/creator-views.qdoc +++ b/doc/qtcreator/src/howto/creator-views.qdoc @@ -120,7 +120,8 @@ (\uicontrol {Filter Tree}) and select \uicontrol{Simplify Tree}. \li To hide source files which are automatically generated by the build - system, select \uicontrol {Filter Tree > Hide Generated Files}. + system, select \uicontrol {Filter Tree} > + \uicontrol {Hide Generated Files}. \li To hide source files which are not enabled for the current target, select \uicontrol {Filter Tree} > \uicontrol {Hide Disabled Files}. diff --git a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc index 3290df28efd..c59259638de 100644 --- a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc +++ b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc @@ -47,22 +47,11 @@ Linux, and macOS. However, the Qt for MCU SDK is currently only available for Windows. - The following MCU boards are currently supported: - - \list - \li \l{https://www.st.com/en/evaluation-tools/stm32f7508-dk.html} - {STM32F7508-DK} - \li \l{https://www.st.com/en/evaluation-tools/32f769idiscovery.html} - {STM32F769I-DISCO} - \li \l{https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK} - {NXP i.MX RT1050 EVK} - \endlist - - For a list of Qt for MCU reference implementations, see the Qt for MCU - documentation. + For a list of Qt for MCU reference implementations, see the + \l{Qt for MCUs - Supported Target Platforms}{Qt for MCUs} documentation. You use the \l{Connecting Bare Metal Devices}{Bare metal plugin} to connect - to OpenOCD or ST-LINK Utility for debugging on MCUs. + to a debug server provider for debugging on MCUs. \section1 Requirements @@ -73,25 +62,18 @@ \li The Bare Metal plugin \li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm} {GNU ARM Embedded Toolchain} - \li For STM32 boards: - \list - \li \l{https://www.st.com/en/embedded-software/stm32cubef7.html} - {STM32Cube SDK} - \li \l{https://www.st.com/en/development-tools/stm32cubeprog.html} - {STM32Cube Programmer} - \endlist - \li For NXP boards: - \list - \li \l{https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK} - {NXP EVKB-IMXRT 1050 SDK} - \li \l{https://www.segger.com/downloads/jlink}{SEGGER JLink} - \endlist + \li The hardware specific requirements vary depending on the hardware platform you are developing for. + For more information see: + \list + \li \l{Getting Started on NXP} + \li \l{Getting Started on STM} + \endlist \endlist \section1 Setting Up the Development Environment You must download and install the required software and create connections - between \QC and MCUs. + between \QC and MCUs. For more information, see \l{Getting Started on Windows}. \section2 Enabling Bare Metal and MCU Plugins @@ -117,7 +99,10 @@ \image qtcreator-mcu-options.png "MCU options" \list 1 - \li In the \uicontrol {MCU board} field, select your MCU board. + \li In the \uicontrol {Qt for MCUs SDK} field, specify the path + to the directory where you installed Qt for MCUs SDK. + \li In the \uicontrol {Targets supported by the Qt for MCUs SDK} + field, select your MCU board. \li In the \uicontrol {GNU ARM Embedded Toolchain} field, specify the path to the directory where you installed the tool chain. @@ -137,8 +122,6 @@ \li In the \uicontrol {SEGGER JLink} field, specify the path to the directory where you installed the tool. \endlist - \li In the \uicontrol {Qt MCU SDK} field, specify the path to the - directory where you installed Qt MCU. \li Select \uicontrol Apply to save the settings and to generate a MCU device and kit. \endlist diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc index b4af895cc52..b1bb63a20ca 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc @@ -60,7 +60,8 @@ \image qtcreator-kit-selector.png "Kit selector" - \li Choose \uicontrol {Build > Build Project} or press \key {Ctrl+B}. + \li Choose \uicontrol Build > \uicontrol {Build Project} or press + \key {Ctrl+B}. You can also select the \uicontrol Run button (2) to also deploy and run the application after building it. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index c830180c901..209ae104737 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -478,8 +478,9 @@ subproject in the \uicontrol{Project Management} dialog. However, the root project must specify that qmake uses the \c subdirs template to build the project. - To create a root project, select \uicontrol {File > New File or Project > - Other Project > Subdirs Project > Choose}. + To create a root project, select \uicontrol File > + \uicontrol {New File or Project} > \uicontrol {Other Project} > + \uicontrol {Subdirs Project} > \uicontrol Choose. On the \uicontrol Summary page, select \uicontrol {Finish & Add Subproject} to create the root project and to add another project, such as a C++ library. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc index ff99faefaa2..0a6371601d9 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc @@ -124,7 +124,8 @@ \li In the \uicontrol Projects view, right-click the project name to open the context menu and select - \uicontrol {Add Library > Internal Library > Next}. + \uicontrol {Add Library} > \uicontrol {Internal Library} > + \uicontrol Next. \li In the \uicontrol Library field, select \b mylib and click \uicontrol Next. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc index 798a43a774a..142671563a4 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc @@ -164,8 +164,8 @@ \section2 Adding Custom Build Steps - To add custom steps to the build settings, select \uicontrol {Add Build Step > - Custom Process Step}. + To add custom steps to the build settings, select + \uicontrol {Add Build Step} > \uicontrol {Custom Process Step}. By default, custom steps are enabled. To disable a custom step, select the \inlineimage buildstepdisable.png diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc index 525e7965f4a..2fd798458aa 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc @@ -59,7 +59,7 @@ \image qtcreator-code-style-clang-format.png "Clang Format Code Style settings in Projects mode" To specify global code style settings sets for C++ files, select - \uicontrol {Tools > Options > C++}. + \uicontrol Tools > \uicontrol Options > \uicontrol C++. To specify global code style settings sets for QML files, select \uicontrol {Tools > Options > Qt Quick}. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc index 76c051d1e59..a2f8c374807 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc @@ -43,8 +43,8 @@ You can configure the text editor according to your needs. You can specify editor behavior either globally for all projects or separately for each - project. To specify global editor behavior, select \uicontrol {Tools > Options - > Text Editor > Behavior}. + project. To specify global editor behavior, select \uicontrol Tools > + \uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior. To configure the text editor behavior for the current project: diff --git a/doc/qtcreator/src/qtcreator.qdoc b/doc/qtcreator/src/qtcreator.qdoc index 8a17cf193b5..46a55f1801a 100644 --- a/doc/qtcreator/src/qtcreator.qdoc +++ b/doc/qtcreator/src/qtcreator.qdoc @@ -29,7 +29,6 @@ // Run the fixnavi.pl script to adjust the links to the index order. // ********************************************************************** - /*! \contentspage{index.html}{Qt Creator} \page index.html @@ -132,7 +131,7 @@ \row \li {4,1} \note To report bugs and suggestions to the \l{https://bugreports.qt.io/}{Qt Project Bug Tracker}, - select \uicontrol {Help > Report Bug}. + select \uicontrol Help > \uicontrol {Report Bug}. To copy and paste detailed information about your system to the bug report, select \uicontrol Help > \uicontrol {System Information}. diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc index ad08875411d..1cde5d74197 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc @@ -184,9 +184,12 @@ support for \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html} {Qt Virtual Keyboard} to the application. + \note \l{http://doc.qt.io/qt-5/qtvirtualkeyboard-index.html} + {Qt Virtual Keyboard} is not supported for Android and iOS. + \li Select \l{glossary-buildandrun-kit}{kits} for the platforms that you want to build the application for. To build applications for - mobile devices, select kits for Android ARM and iPhone OS, and + mobile devices, select kits for Android ARM and iOS, and click \uicontrol{Next}. \note Kits are listed if they have been specified in \uicontrol diff --git a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc index 7b8936b911e..1e126a35fd2 100644 --- a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc @@ -99,8 +99,8 @@ \note To profile applications on \l{glossary-device}{devices}, you must install Qt 4.7.4 or later libraries on them. - \li Select \uicontrol {Analyze > QML Profiler} to profile the current - application. + \li Select \uicontrol Analyze > \uicontrol {QML Profiler} to profile the + current application. \li Select the \inlineimage qtcreator-analyze-start-button.png @@ -169,9 +169,9 @@ \section1 Attaching to Running Qt Quick Applications To profile Qt Quick applications that are not launched by \QC, select - \uicontrol {Analyze > QML Profiler (External)}. You must enable QML debugging and profiling for - the application in the project build settings. For more information, see - \l{Setting Up QML Debugging}. + \uicontrol Analyze > \uicontrol {QML Profiler (External)}. You must enable + QML debugging and profiling for the application in the project build + settings. For more information, see \l{Setting Up QML Debugging}. In the \uicontrol {QML Profiler} dialog, \uicontrol Port field, specify the port to listen to. diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc index 9c253adcda8..3dfc772b45e 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs.qdoc @@ -97,10 +97,10 @@ You can also select \uicontrol Tools and then select \uicontrol {Create Repository} in the submenu for the version control system. - To import a project that is under version control, choose \uicontrol {File > - New File or Project > Project from Version Control} and select the - version control system that you use. Follow the instructions of the - wizard to import the project. + To import a project that is under version control, choose \uicontrol File > + \uicontrol {New File or Project} > \uicontrol {Project from Version Control} + and select the version control system that you use. Follow the instructions + of the wizard to import the project. \section1 Using Common Functions @@ -121,8 +121,8 @@ \endlist The \uicontrol{Version Control} output pane displays the commands that are - executed, a timestamp, and the relevant output. Select \uicontrol {Window > Output - Panes > Version Control} to open the pane. + executed, a timestamp, and the relevant output. Select \uicontrol Window > + \uicontrol {Output Panes} > \uicontrol {Version Control} to open the pane. \image qtcreator-vcs-pane.png diff --git a/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc index cca4674da38..71c225f31b3 100644 --- a/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc +++ b/doc/qtcreator/src/widgets/qtdesigner-app-tutorial.qdoc @@ -48,8 +48,9 @@ \list 1 - \li Select \uicontrol{File > New File or Project > Application > Qt Widgets - Application > Choose}. + \li Select \uicontrol File > \uicontrol {New File or Project} > + \uicontrol Application > \uicontrol {Qt Widgets Application} > + \uicontrol Choose. \image qtcreator-new-qt-gui-application.png "New File or Project dialog" @@ -190,8 +191,8 @@ \li Right-click the \uicontrol Find button to open a context-menu. - \li Select \uicontrol {Go to Slot > clicked()}, and then select - \uicontrol OK. + \li Select \uicontrol {Go to Slot} > \uicontrol {clicked()}, and + then select \uicontrol OK. A private slot, \c{on_findButton_clicked()}, is added to the header file, textfinder.h and a private function, @@ -282,8 +283,8 @@ \list 1 - \li Select \uicontrol{File > New File or Project > Qt > Qt Resource File > - Choose}. + \li Select \uicontrol File > \uicontrol {New File or Project} > + \uicontrol Qt > \uicontrol {Qt Resource File} > \uicontrol Choose. \image qtcreator-add-resource-wizard.png "New File or Project dialog" @@ -305,12 +306,13 @@ and click \uicontrol{Finish} or \uicontrol Done to open the file in the code editor. - \li Select \uicontrol{Add > Add Prefix}. + \li Select \uicontrol Add > \uicontrol {Add Prefix}. \li In the \uicontrol{Prefix} field, replace the default prefix with a slash (/). - \li Select \uicontrol{Add > Add Files}, to locate and add input.txt. + \li Select \uicontrol Add > \uicontrol {Add Files}, to locate and add + input.txt. \image qtcreator-add-resource.png "Editing resource files" diff --git a/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc b/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc index 0ddf27a7fca..1e43501b631 100644 --- a/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc +++ b/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc @@ -141,8 +141,8 @@ building applications is configured and built to use the MinGW/g++ compiler. Plugins built by using this version of Qt cannot be loaded by \QC because the build-keys do not match. The plugins can only be used in the standalone - version of \QD. Choose \uicontrol{Help > About \QC} to check the Qt version \QC - was built with. + version of \QD. Choose \uicontrol Help > \uicontrol {About \QC} to check the + Qt version \QC was built with. To use \QD plugins that were built for the shipped Qt version, make sure that \QC is built with the same compiler by either recompiling \QC using diff --git a/doc/qtcreatordev/src/external-tool-spec.qdoc b/doc/qtcreatordev/src/external-tool-spec.qdoc index 62c02162dbf..773a1f234ed 100644 --- a/doc/qtcreatordev/src/external-tool-spec.qdoc +++ b/doc/qtcreatordev/src/external-tool-spec.qdoc @@ -30,7 +30,7 @@ \title External Tool Specification Files An external tool specification file describes a tool that can be run from - the \uicontrol { Tools > External } menu. + the \uicontrol Tools > \uicontrol External menu. It specifies the name of the tool, the executable to run, optional arguments, and how to handle the output from the tool. diff --git a/doc/qtcreatordev/src/qtcreator-dev.qdoc b/doc/qtcreatordev/src/qtcreator-dev.qdoc index 7c5f7891cd0..74ba98bcb26 100644 --- a/doc/qtcreatordev/src/qtcreator-dev.qdoc +++ b/doc/qtcreatordev/src/qtcreator-dev.qdoc @@ -121,8 +121,8 @@ \list \li \l{https://doc.qt.io/qtcreator/creator-highlighting.html#generic-highlighting} {Generic Highlighting} - \li \l{http://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/} - {Writing a Syntax Highlighting File} + \li \l{https://docs.kde.org/stable5/en/applications/katepart/highlight.html} + {Working with Syntax Highlighting} \endlist \section2 Custom Text Editors diff --git a/doc/qtcreatordev/src/qtcreator-documentation.qdoc b/doc/qtcreatordev/src/qtcreator-documentation.qdoc index 1d54a869128..1ebe44adfa3 100644 --- a/doc/qtcreatordev/src/qtcreator-documentation.qdoc +++ b/doc/qtcreatordev/src/qtcreator-documentation.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -61,40 +61,59 @@ \li API documentation, which is generated from code comments \endlist - \section1 Configuring the Documentation Project + \section1 Configuring Documentation Projects \QC documentation is written by using QDoc. For more information about using QDoc, see the \l{http://doc.qt.io/qt-5/qdoc-index.html}{QDoc Manual}. QDoc finds the new topics automatically, when you place them as \c {.qdoc} - files in the correct folder. However, to make the topics accessible to - readers, you must also add them to the table of contents - (\c {doc\src\qtcreator-toc.qdoc}) and fix the next page and previous page - links to them from other topics. + files in a doc source folder. However, to make the topics accessible to + readers, you must also add them to the table of contents and fix the next + page and previous page links to them from other topics. - \section2 Creating Folders and Files + \section1 Creating Folders and Files - These instructions apply only to the \QC Manual. Add API documentation - directly to the code source files. However, you can write an API overview - also as a separate \c {.qdoc} file. + The \c qtcreator repository contains the sources for building the following + documents: - Create a subfolder for your documentation in the \QC project folder in the - \c {doc\src} folder. Create a separate file for each topic. + \list + \li \QC Manual + \li Extending \QC Manual + \li \QDS Manual + \endlist + + The sources for each project are stored in the following subfolders of + the \QC project folder: + + \list + \li \c \doc\qtcreator\src + \li \c \doc\qtcreatordev\src + \li \c \doc\qtdesignstudio\src + \endlist + + The \QDS Manual is based on the \QC Manual, with additional topics. + + The Extending \QC Manual has its own sources. In addition, it + pulls in API reference documentation from the \QC source files. Add + code documentation directly to the code source files. However, you can + write an API overview also as a separate \c {.qdoc} file. + + Create a subfolder for your documentation in the appropriate \c src folder. + Create a separate file for each topic. The easiest way is probably to copy an existing file, save it as a new file, and modify it. This way, you already have samples of the necessary bits and pieces in place, such as topic start and end commands, copyright statement, links to next and previous topics, and topic title. - \section2 Integrating Topics to Documentation + \section1 Integrating Topics to Documentation - You must integrate your new topics to the \QC Manual and Extending \QC - Manual by adding links to them to the table of contents and to other - relevant topics. + You must integrate your new topics to the manuals by adding links to them + to the table of contents and to other relevant topics. To link to the topic, you can use the topic title. For example: - \code + \badcode \l{Integrating Topics to Documentation} \endcode @@ -102,32 +121,148 @@ title, the link breaks. You can avoid this risk by adding the \c {\target} command to your topic and then linking to the target. + \section2 Showing and Hiding Information + + \QDS uses only a subset of \QC plugins and it has its own special plugins. + This means that their manuals have somewhat different structures. Which, in + turn breaks the navigation links to previous and next pages. + + This also means that some of the \QC Manual source files are not needed at + all and some contain information that does not apply to the \QDS Manual. If + QDoc parsed all the \QC Manual sources, it would generate HTML files for each + topic and include those files and all the images that they refer to in the + \QDS help compilation files. This would unnecessarily increase the size of + the \QDS help database and pollute the help index with references to files + that are not actually listed in the table of contents of the \QDS Manual. + To avoid this, some files are excluded from the \QDS Manual builds. + + \section3 Excluding Souce Files from \QDS Manual Builds + + The directories to exclude from \QDS Manual builds are + listed as values of the \c excludedirs option in + \c {\doc\qtdesignstudio\config\qtdesignstudio.qdocconf}. + + You only need to edit the values of the option if you want to show or hide + all the contents of a directory. For example, if you add support for a \QC + plugin that was previously not supported by \QDS, you should remove the + directory that contains the documentation for the plugin from the values. + + To hide or show individual topics within individual \c {.qdoc} files, you + need to move the files in the \QC Manual source (\c \doc\qtcreator\src) to + or from the excluded directories. + + For example, if support for iOS were added, you would need to check whether + the information about iOS support is applicable to \QDS Manual. If yes, + you would need to remove the following line from the \c excludedirs value: + + \badcode + ../../src/ios \ + \endcode + + You would then use defines to hide any \QC specific information from the + source file in the directory. + + If a directory contains some files that are needed in both manuals and some + that are only needed in the \QC Manual, the latter are located in a + subdirectory called \c {creator-only}, which is excluded from the \QDS + Manual builds. + + \section3 Hiding Text in \QC Manual Sources + + The \c qtcreator define is specified as a value of the + \c defines option in the \QC QDoc configuration file, + \c {\doc\qtcreator\config\qtcreator-project.qdocconf}. + It is mostly used in the \QC Manual sources to hide \QC + specific information when the \QDS Manual is built. + + The \c {\else} command is sometimes used to replace some \QC specific text + with text that applies to \QDS. For example, the following \c if-else + statement is needed in the \QC Manual sources, because the project wizards + in \QDS are different from those in \QC, and are therefore described in + a new topic that is located in the \QDS Manual sources: + + \badcode + For more information, see + \if defined(qtcreator) + \l{Creating Qt Quick Projects}. + \else + \l{Creating UI Prototype Projects}. + \endif + \endcode + + \note Section titles in the two manuals can be identical only if the page is + excluded from the \QDS Manual. In this case, QDoc can correctly determine + the link target. If you add a link to a section title that appears twice in + the doc source files, QDoc uses the first reference to that title in the + \c {.index} file. + + \section3 Writing About \QDS Specific Features + + \QDS specific plugins and features are described in a set of doc + source files located in the \c {\doc\qtdesignstudio\src} directory. Some + files are used to include subsections in topics in the \QC Manual sources. + + Screenshots and other illustrations are stored in the + \c {\qtdesignstudio\images} directory. + + If you add new topics to the \QDS Manual, add links to them to the table + of contents in \c {qtdesignstudio-toc.qdoc} and check the values of the + navigation links around them. + + \section3 Including Sections in \QC Manual Sources + + \QMLD is an integral part of both \QC and \QDS. Therefore, most topics that + describe it are needed in the manuals of both tools. You can use the + \c {\include} command in the \QC Manual sources to include \c {.qdocinc} + files from the \QDS Manual sources when building the \QDS Manual. + + For example, the following lines in the + \c {\doc\qtcreator\src\qtquick\qtquick-components.qdoc} + file add information about creating and using \QDS Components + to the \e {Creating Components} topic that is pulled from the + \QC Manual sources: + + \badcode + \if defined(qtdesignstudio) + \include qtdesignstudio-components.qdocinc creating studio components + \include qtdesignstudio-components.qdocinc studio components + \endif + \endcode + + Similarly, you can use include files to include subsections in different + main level topics in the two manuals. + \section2 Updating Next and Previous Links When you add new topics to a document, you must also change the navigation - links of the topics around them. This is very error prone when done - manually, and therefore we have a script called \c {fixnavi.pl} for it. For - the script to work, you must add the \c {\nextpage} and \c {\previouspage} - commands to the topic, with dummy values (for example, - \c {\nextpage=anything.html}). + links of the topics around them. - \note The script creates the links according to the TOC in the topic set as - the value of the \c indexTitle configuration parameter - (\c {doc\src\qtcreator-toc.qdoc}). If your topics are not listed in the TOC, - the script removes the \c {\nextpage} and \c {\previouspage} commands from - them. + The navigation order of the topics in the \QC Manual is specified in + \c {\doc\qtcreator\src\qtcreator-toc.qdoc} and that of the topics in the + \QDS Manual in \c {\doc\qtdesignstudio\src\qtdesignstudio-toc.qdoc}. If + you add topics to or move them around in a TOC file, you must adjust the + navigation links accordingly. - To run the script, you must have Perl installed. If you build Qt yourself, - you should already have it. Otherwise, download and install - \l{http://www.perl.org/}{Perl}. + The \c qtdesignstudio define is specified as a value of + the \c defines option in the \QDS Manual configuration file, + \c {qtcreator\doc\qtdesignstudio\config\qtdesignstudio.qdocconf}. + It is mostly used in the \QC Manual sources to specify values for the + \c {\previouspage} and \c {\nextpage} commands depending on whether + the \QDS Manual or \QC Manual is being built. For example, the + following \c if-else statement is needed, because only the Git + version control system is integrated to \QDS, and information about + the other systems integrated to \QC is hidden: - To run the script, enter the following command in the doc folder: - - \list - \li nmake fixnavi (on Windows) - - \li make fixnavi (on Linux) - \endlist + \badcode + \page creator-vcs-git.html + \if defined(qtdesignstudio) + \previouspage studio-projects.html + \nextpage studio-importing-designs.html + \else + \previouspage creator-vcs-cvs.html + \nextpage creator-vcs-mercurial.html + \endif + \endcode \section1 Writing Text @@ -153,7 +288,7 @@ Use the \c {\image} and \c {\inlineimage} QDoc commands to refer to images from the text. You do not need to add paths to image names. For example: - \code + \badcode \image riot.png \endcode @@ -182,7 +317,7 @@ image also in the screen capture tool). \li To highlight parts of the screen shot, use the images of numbers - that are stored in \c{doc\images\numbers} in the \QC repository. + that are stored in \c{doc/images/numbers} in the \QC repository. \li Before you submit the images to the repository, optimize them to save space. @@ -201,9 +336,9 @@ you can just insert the number of the element you are referring to in brackets. - You can find a set of images that show the numbers from 1 to 10 in the - \c doc\images\numbers directory (or in the \c qtdoc module sources in - \c doc\images\numbers). + You can find a set of images that show the numbers from 1 to 10 in the + \c doc/images/numbers directory (or in the \c qtdoc module sources in + \c doc/images/numbers). To use the numbers, copy-paste the number images on the screenshot to the places that you want to refer to from text. @@ -211,7 +346,7 @@ \section2 Optimizing Images Save images in the PNG format in the \QC project folder in the - \c {doc\images} folder. Binary images can easily add megabytes to the Git + \c {doc/images} folder. Binary images can easily add megabytes to the Git history. To keep the history as small as possible, the Git post-commit hooks remind you to try to keep image size below 50 kilobytes. To achieve this goal, crop images so that only relevant information is visible in them. @@ -262,31 +397,38 @@ folder (or any folder that contains your project). To optimize a screenshot, enter the following command (here, from the \QC project folder): - \code + \badcode optipng -o 7 -strip all doc/images/ \endcode \section1 Building Documentation - You use QDoc to build the documentation. Build the documentation from time - to time, to check its structure and the validity of the QDoc commands. - The error messages that QDoc issues are generally very useful for - troubleshooting. + You use QDoc to build the documentation. Build the documentation before + submitting any documentation patches, to check its structure, contents, + and the validity of the QDoc commands. The error messages that QDoc + issues are generally very useful for troubleshooting. - For more information about setting up the build environment if you do not - want to build the whole Qt, see + \section2 Setting Up Documentation Builds + + You can run \c qmake from an installed Qt to build documentation. + + \note Since \QC version 4.12, only Qt 5.14.0 or later is supported + for building documentation. + + For more information about setting up the build environment with a + self-built Qt if you do not want to build the whole Qt, see \l{https://wiki.qt.io/Building_Qt_Documentation}{Building Qt Documentation} on the Qt wiki. The content and formatting of documentation are separated in QDoc. The documentation configuration, style sheets, and templates have - changed over time, so they differ between Qt and \QC versions. Since \QC - version 3.3, only Qt 5 is supported for building documentation. The - templates to use are defined by the - \c {qt5\qtbase\doc\global\qt-html-templates-offline.qdocconf} and - \c {qt5\qtbase\doc\global\qt-html-templates-online.qdocconf} configuration - file. They are fetched from Qt sources by adding the following lines to the - qdocconf file: + changed over time, so they differ between Qt and \QC versions. + + The templates to use are defined by the + \c {qt5/qtbase/doc/global/qt-html-templates-offline.qdocconf} + and \c {qt5/qtbase/doc/global/qt-html-templates-online.qdocconf} + configuration file. They are fetched from Qt sources by adding + the following lines to the qdocconf file: \list \li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)} @@ -299,45 +441,82 @@ running it on a web server. \note If the styles look wrong to you when reading help files in \QC or \QA, - you might be looking at them in the QTextBrowser instead of the Qr WebEngine + you might be looking at them in the QTextBrowser instead of the Qt WebEngine browser. This happens if you do not have Qt WebEngine installed. + \section2 Documentation Build Commands + To build documentation for the sources from the qtcreator master branch, use - build scripts defined in the doc.pri file. To build all \QC docs in the - help format and to create help files (.qch), enter the following build + build scripts defined in the doc.pri file. To build the docs in the + HTML format and to create help files (.qch), enter the following build commands from the project folder (after running qmake): \list - \li nmake docs (on Windows) + \li \c {nmake docs} (on Windows) - \li make docs (on Linux and \macos) + \li \c {make docs} (on Linux and \macos) \endlist - The \QC Manual HTML files are generated in the \c {doc/qtcreator} directory. - The Extending \QC Manual files are generated in the - \c {doc/qtcreator-dev} directory. The help files (\c {.qch}) are generated in the + The HTML documentation is generated in the following folders: + + \list + \li \c doc/html/qtcreator + \li \c doc/html/qtcreatordev + \li \c doc/html/qtdesignstudio + \endlist + + The help files (\c {.qch}) are generated in the \c {share/doc/qtcreator} directory in the \QC build directory on Windows and Linux, and in the \c {bin/Qt Creator.app/Contents/Resources/app} directory - on \macos. You can view the HTML files in a browser and the help files in + on \macos. + + You can view the HTML files in a browser and the help files in the \QC \uicontrol Help mode. For more information about adding the help files to \QC, see \l{http://doc.qt.io/qtcreator/creator-help.html#adding-external-documentation} {Adding External Documentation}. - Besides \c docs, you have the following options: + Besides \c docs, you have the following options for building a particular + document in a particular format: \list - \li html_docs_qtcreator - build \QC Manual in help format, but do not + \li \c html_docs_qtcreator - build \QC Manual in help format, but do not generate a help file - \li html_docs_qtcreator-dev - build Extending \QC Manual in help + \li \c html_docs_qtcreator-dev - build Extending \QC Manual in help format, but do not generate a help file - \li qch_docs_qtcreator - build \QC Manual in help format and generate + \li \c qch_docs_qtcreator - build \QC Manual in help format and generate a help file (.qch) - \li qch_docs_qtcreator-dev - build Extending \QC Manual in help format + \li \c qch_docs_qtcreator-dev - build Extending \QC Manual in help format and generate a help file (.qch) \endlist + \section3 Building the \QDS Manual + + To get the correct product name and version, you must run \c {qmake -r} on + \c {qtcreator.pro} with the \c IDE_BRANDING_PRI option set to the absolute + path of \c {ide_branding.pri} in the \QDS (private) repository. + + For example, on Windows enter (all on one line): + + \badcode + C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.14.1\msvc2017_64\bin\qmake.exe + qtcreator.pro -r + IDE_BRANDING_PRI=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri + \endcode + + To build the \QDS Manual: + + \list 1 + \li Run \c qmake from Qt 5.14.0, or later with the path to the branding + information as an option (all on one line): + + \c {/qmake.exe + qtcreator.pro -r + IDE_BRANDING_PRI=ide_branding.pri} + \li Run \c {make docs} on Linux and macOS or \c {nmake docs} + on Windows. + \endlist */ diff --git a/doc/qtdesignstudio/README.md b/doc/qtdesignstudio/README.md index 74a5f5c7410..c23a21a9a2f 100644 --- a/doc/qtdesignstudio/README.md +++ b/doc/qtdesignstudio/README.md @@ -6,151 +6,23 @@ Manual are pulled in from Qt Creator sources. This is enabled by creating separate table of contents files for each Manual and by using defines to hide and show information depending on which Manual is being built. -This readme file describes how to build the Qt Design Studio Manual and how to -edit or add source files when necessary. +Because branding information is needed to use the correct product name and +version, you must run `qmake -r` on `qtcreator.pro` with the `IDE_BRANDING_PRI` +option set to the absolute path of `ide_branding.pri` in the Qt Design Studio +repository. + +For example, on Windows enter (all on one line): + +`C:\dev\qtc-super\qtcreator>..\..\..\Qt\5.14.1\msvc2017_64\bin\qmake.exe + qtcreator.pro -r + IDE_BRANDING_PRI=C:\dev\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri` ## Building the Qt Design Studio Manual -1. Edit qtcreator\qtcreator.pri as follows: - `isEmpty(IDE_DISPLAY_NAME): IDE_DISPLAY_NAME = Qt Design Studio` - `isEmpty(IDE_ID): IDE_ID = qtdesignstudio` - `isEmpty(IDE_CASED_ID): IDE_CASED_ID = QtDesignStudio` -2. Switch to the `qtcreator\doc\qtdesignstudio` directory. -4. Run `qmake` from Qt 5.14.0, or later - (because you need the Qt Timeline and Qt Quick 3D module docs) +1. Run `qmake` from Qt 5.14.0, or later with the path to the branding + information as a parameter: + `\qmake.exe qtcreator.pro -r IDE_BRANDING_PRI=\tqtc-plugin-qtquickdesigner\studiodata\branding\ide_branding.pri` 5. Run `make docs` on Linux and macOS or `nmake docs` on Windows. -The docs are generated in `qtcreator\doc\qtdesignstudio\doc\qtdesignstudio` - -## Showing and Hiding Information - -Qt Design Studio uses only a subset of Qt Creator plugins and it has its -own special plugins. This means that their manuals have somewhat different -structures. Which, in turn breaks the navigation links to previous and next -pages. - -This also means that some of the Qt Creator doc source files are not needed at -all and some contain information that does not apply to the Qt Design Studio -Manual. If QDoc parses all the Qt Creator doc sources, it would generate -HTML files for each topic and include those files and all the images that they -refer to in the help compilation files. This would unnecessarily increase the -size of the help database and pollute the help index with references to files -that are not actually listed in the table of contents of the manual. To avoid -this, the files that are not needed are excluded from doc builds in the doc -build configuration file. - -### Fixing the Navigation Links - -The navigation order of the topics in the Qt Design Studio Manual is specified -in `qtcreator\doc\qtdesignstudio\src\qtdesignstudio-toc.qdoc`. The -order of the topics in the Qt Creator Manual is specified in -`qtcreator\doc\src\qtcreator-toc.qdoc`. If you add topics to or move them -around in the TOC file, you must adjust the navigation links accordingly. - -The `qtdesignstudio` define is specified as a value of the `defines` option in -the Qt Design Studio doc configuration file, -`qtcreator\doc\qtdesignstudio\config\qtdesignstudio.qdocconf`. It is -mostly used in the Qt Creator doc sources to specify values for the -\previouspage and \nextpage commands depending on whether the Qt Design Studio -Manual or Qt Creator Manual is being built. For example, the following if-else -statement is needed, because the `quick-buttons.html` is excluded from the -Qt Design Studio Manual: - -`\page quick-components.html` -`\previouspage creator-using-qt-quick-designer.html` -`\if defined(qtdesignstudio)` -`\nextpage qtquick-navigator.html` -`\else` -`\nextpage quick-buttons.html` -`\endif` - -### Excluding Souce Files from Builds - -The directories to exclude from Qt Design Studio Manual builds are listed as -values of the `excludedirs` option in `\config\qtdesignstudio.qdocconf`. - -You only need to edit the values of the option if you want to show or hide all -the contents of a directory. For example, if you add support for a Qt Creator -plugin that was previously not supported by Qt Design Studio, you should remove -the directory that contains the documentation for the plugin from the values. - -To hide or show individual topics within individual `.qdoc` files, you need to -move the files in the Qt Creator doc source (`qtcreator\doc\src`) to or from -excluded directories. - -For example, if support for iOS were added, you would need to check whether the -information about iOS support is applicable to Qt Design Studio Manual. If yes, -you would need to remove the following line from the `excludedirs` value: - -`../../src/ios \` - -You would then use defines to hide any Qt Creator specific information from the -source file in the directory. - -If a directory contains some files that are needed in both manuals and some that -are only needed in the Qt Creator Manual, the latter are located in a -subdirectory called `creator-only`, which is excluded from the Qt Design Studio -doc builds. - -### Hiding Text in Qt Creator Doc Sources - -The `qtcreator` define is specified as a value of the `defines` option in the -Qt Creator doc configuration file, -`qtcreator\doc\src\config\qtcreator-project.qdocconf`. It is mostly used in the -Qt Creator doc sources to hide Qt Creator specific information when the Qt -Design Studio Manual is built. - -The `\else` command is sometimes used to replace some Qt Creator specific text -with text that applies to Qt Design Studio. For example, the following if-else -statement is needed in the Qt Creator doc sources, because the project wizards -in Qt Design Studio are different from those in Qt Creator, and are therefore -described in a new topic that is located in the Qt Design Studio doc sources: - -`For more information, see` -`\if defined(qtcreator)` -`\l{Creating Qt Quick Projects}.` -`\else` -`\l{Creating UI Prototype Projects}.` -`\endif` - -Note that titles in the two manuals can be identical only if the page is -excluded from the Qt Design Studio Manual. In this case, QDoc can correctly -determine the link target. If you add a link to a section title that appears -twice in the doc source files, QDoc uses the first reference to that title -in the `.index` file. - -## Writing About Qt Design Studio Specific Features - -Qt Design Studio specific plugins and features are described in a set of doc -source files located in the `qtcreator\doc\qtdesignstudio\src` directory. Some -files are used to include subsections in topics in the Qt Creator doc sources. - -Screenshots and other illustrations are stored in the `\qtdesignstudio\images` -directory. - -### Adding Topics - -If you add new topics to the Qt Design Studio Manual, add links to them to the -table of contents in `qtdesignstudio-toc.qdoc` and check the values of the -navigation links around them. - -### Including Sections in Qt Creator Doc Sources - -Qt Quick Designer is an integral part of both Qt Creator and Qt Design Studio. -Therefore, most topics that describe it are needed in the manuals of both tools. -You can use the `\include` command in the Qt Creator doc sources to include -`.qdocinc` files from the Qt Design Studio doc sources when building the -Qt Design Studio Manual. - -For example, the following lines in the -`qtcreator\doc\src\qtquick\qtquick-components.qdoc` file add information about -creating and using Qt Design Studio Components to the `Creating Components` -topic that is pulled from the Qt Creator doc sources: - -`\if defined(qtdesignstudio)` -`\include qtdesignstudio-components.qdocinc creating studio components` -`\include qtdesignstudio-components.qdocinc studio components` -`\endif` - -Similarly, you can use include files to include subsections in different main -level topics in the two manuals. +The docs are generated in `qtcreator\doc\html\qtdesignstudio` with the +Qt Design Studio branding. diff --git a/doc/qtdesignstudio/config/style/qt5-sidebar.html b/doc/qtdesignstudio/config/style/qt5-sidebar.html index ea8aeab5787..cc4f709bc3a 100644 --- a/doc/qtdesignstudio/config/style/qt5-sidebar.html +++ b/doc/qtdesignstudio/config/style/qt5-sidebar.html @@ -7,7 +7,7 @@
  • Getting Started
  • Managing Projects
  • -
  • Creating UIs
  • +
  • Creating UIs
  • Adding Dynamics
  • Editing 3D Scenes
  • Previewing
  • diff --git a/doc/qtdesignstudio/images/studio-navigator-view3d.png b/doc/qtdesignstudio/images/studio-navigator-view3d.png new file mode 100644 index 00000000000..a3bce1238bc Binary files /dev/null and b/doc/qtdesignstudio/images/studio-navigator-view3d.png differ diff --git a/doc/qtdesignstudio/images/studio-qtquick-3d-components.png b/doc/qtdesignstudio/images/studio-qtquick-3d-components.png index 0958ee4e15d..07ca30b5509 100644 Binary files a/doc/qtdesignstudio/images/studio-qtquick-3d-components.png and b/doc/qtdesignstudio/images/studio-qtquick-3d-components.png differ diff --git a/doc/qtdesignstudio/images/studio-qtquick-3d-model.png b/doc/qtdesignstudio/images/studio-qtquick-3d-model.png new file mode 100644 index 00000000000..fa9422a26f6 Binary files /dev/null and b/doc/qtdesignstudio/images/studio-qtquick-3d-model.png differ diff --git a/doc/qtdesignstudio/images/studio-qtquick-3d-view.png b/doc/qtdesignstudio/images/studio-qtquick-3d-view.png new file mode 100644 index 00000000000..77a130d8cdc Binary files /dev/null and b/doc/qtdesignstudio/images/studio-qtquick-3d-view.png differ diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-model.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-model.qdoc index 3e9b31bad91..6e6effcab9a 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-model.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-model.qdoc @@ -40,12 +40,14 @@ types: cube, cone, cylinder, plane (rectangle) or sphere. You can drag and drop a model from the \uicontrol Library to a 3D scene. - \image studio-qtquick-3d-components.png + \image studio-qtquick-3d-components.png "Library view QML Types tab Qt Quick 3D section" You can change the model type in the \uicontrol Source field in the \uicontrol Properties view. Select the \inlineimage plus.png button to add custom model types to the list. + \image studio-qtquick-3d-model.png "Model properties" + To enable picking the model against the scene, select the \uicontrol Pickable check box. Picking transforms the screen space x and y coordinates to a ray cast towards the specified diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc index ae1e50e0d33..8a3930a3f15 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-view.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Design Studio documentation. @@ -31,6 +31,13 @@ \title Adding 3D Views + To display \l {Qt Quick 3D} types in the \uicontrol Library, select + \uicontrol Library > \uicontrol {QML Imports} > \uicontrol {Add Import} > + \uicontrol QtQuick3D. The types are displayed in the \uicontrol {QML Types} + tab. + + \image studio-qtquick-3d-components.png + To add a 3D view to the scene, drag and drop a \uicontrol {View 3D} component from \uicontrol Library > \uicontrol {QML Types} > \uicontrol {Qt Quick 3D} to the 3D editor or to the \uicontrol Navigator. @@ -38,6 +45,8 @@ and model. A default material is attached to the model. You can attach textures to materials. + \image studio-navigator-view3d.png "View 3D component in the Navigator" + By default, a directional light and a perspective camera are used. To use other light and camera types, change the type of the component in the \uicontrol Type field in the \uicontrol Properties view. For example, @@ -49,6 +58,8 @@ or in the \uicontrol Navigator and modify the property values in the \uicontrol Properties view. + \image studio-qtquick-3d-view.png "View 3D component properties" + For more information about the available components and their properties, see \l{Using 3D Components}. */ diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index b9806054516..2995256b1ad 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -879,7 +879,35 @@ class Dumper(DumperBase): self.debugger.SetCurrentPlatformSDKRoot(self.sysRoot_) exefile = None if self.attachPid_ > 0 else self.executable_ - self.target = self.debugger.CreateTarget(exefile, None, None, True, error) + + self.target = self.debugger.CreateTarget( + exefile, None, self.platform_, True, error) + + if not error.Success(): + self.report(self.describeError(error)) + self.reportState('enginerunfailed') + return + + if (self.startMode_ == DebuggerStartMode.AttachToRemoteServer + or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess): + + + remote_channel = 'connect://' + self.remoteChannel_ + connect_options = lldb.SBPlatformConnectOptions(remote_channel) + + res = self.target.GetPlatform().ConnectRemote(connect_options) + DumperBase.warn("CONNECT: %s %s %s" % (res, + self.target.GetPlatform().GetName(), + self.target.GetPlatform().IsConnected())) + + + broadcaster = self.target.GetBroadcaster() + listener = self.debugger.GetListener() + broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged) + listener.StartListeningForEvents(broadcaster, lldb.SBProcess.eBroadcastBitStateChanged) + broadcaster.AddListener(listener, lldb.SBTarget.eBroadcastBitBreakpointChanged) + listener.StartListeningForEvents( + broadcaster, lldb.SBTarget.eBroadcastBitBreakpointChanged) if self.nativeMixed: self.interpreterEventBreakpoint = \ @@ -918,17 +946,29 @@ class Dumper(DumperBase): self.reportState('enginerunandinferiorrunok') elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess): - self.process = self.target.ConnectRemote( - self.debugger.GetListener(), - self.remoteChannel_, None, error) + + f = lldb.SBFileSpec() + f.SetFilename(self.executable_) + + launchInfo = lldb.SBLaunchInfo(self.processArgs_) + #launchInfo.SetWorkingDirectory(self.workingDirectory_) + launchInfo.SetWorkingDirectory('/tmp') + launchInfo.SetExecutableFile(f, True) + + DumperBase.warn("TARGET: %s" % self.target) + self.process = self.target.Launch(launchInfo, error) + DumperBase.warn("PROCESS: %s" % self.process) + if not error.Success(): self.report(self.describeError(error)) self.reportState('enginerunfailed') return + # Even if it stops it seems that LLDB assumes it is running # and later detects that it did stop after all, so it is be # better to mirror that and wait for the spontaneous stop. self.reportState('enginerunandinferiorrunok') + elif self.startMode_ == DebuggerStartMode.AttachCore: coreFile = args.get('coreFile', '') self.process = self.target.LoadCore(coreFile) @@ -949,14 +989,6 @@ class Dumper(DumperBase): return self.report('pid="%s"' % self.process.GetProcessID()) self.reportState('enginerunandinferiorrunok') - if self.target is not None: - broadcaster = self.target.GetBroadcaster() - listener = self.debugger.GetListener() - broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged) - listener.StartListeningForEvents(broadcaster, lldb.SBProcess.eBroadcastBitStateChanged) - broadcaster.AddListener(listener, lldb.SBTarget.eBroadcastBitBreakpointChanged) - listener.StartListeningForEvents( - broadcaster, lldb.SBTarget.eBroadcastBitBreakpointChanged) def loop(self): event = lldb.SBEvent() diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml index b42bf4cc2ce..0d9641fa724 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/IconGizmo.qml @@ -25,7 +25,6 @@ import QtQuick 2.0 import QtQuick3D 1.15 -import QtGraphicalEffects 1.12 Item { id: iconGizmo @@ -45,7 +44,6 @@ Item { } property alias iconSource: iconImage.source - //property alias overlayColor: colorOverlay.color signal positionCommit() signal clicked(Node node, bool multi) @@ -91,15 +89,6 @@ Item { acceptedButtons: Qt.LeftButton } } -// ColorOverlay doesn't work correctly with hidden windows so commenting it out for now -// ColorOverlay { -// id: colorOverlay -// anchors.fill: parent -// cached: true -// source: iconImage -// color: "#00000000" -// opacity: 0.6 -// } } } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml index 9a956c67236..434c5f5c804 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml @@ -30,19 +30,17 @@ IconGizmo { id: lightGizmo property Model lightModel: null + property color overlayColor: targetNode ? targetNode.color : "transparent" iconSource: targetNode ? targetNode instanceof DirectionalLight - ? "qrc:///qtquickplugin/mockfiles/images/directional_light_gradient.png" + ? "image://IconGizmoImageProvider/directional_light_gradient.png:" + overlayColor : targetNode instanceof AreaLight - ? "qrc:///qtquickplugin/mockfiles/images/area_light_gradient.png" + ? "image://IconGizmoImageProvider/area_light_gradient.png:" + overlayColor : targetNode instanceof PointLight - ? "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png" - : "qrc:///qtquickplugin/mockfiles/images/spot_light_gradient.png" - : "qrc:///qtquickplugin/mockfiles/images/point_light_gradient.png" - - // ColorOverlay doesn't work correctly with hidden windows so commenting it out for now - //overlayColor: targetNode ? targetNode.color : "transparent" + ? "image://IconGizmoImageProvider/point_light_gradient.png:" + overlayColor + : "image://IconGizmoImageProvider/spot_light_gradient.png:" + overlayColor + : "image://IconGizmoImageProvider/point_light_gradient.png:" + overlayColor function connectModel(model) { @@ -57,6 +55,9 @@ IconGizmo { model.targetNode = targetNode; model.targetNode = Qt.binding(function() {return targetNode;}); + model.color = lightGizmo.overlayColor; + model.color = Qt.binding(function() {return lightGizmo.overlayColor;}); + model.visible = visible; model.visible = Qt.binding(function() {return visible;}); } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/LightModel.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/LightModel.qml index 86bebf19d28..9255e77ddef 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/LightModel.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/LightModel.qml @@ -35,6 +35,7 @@ Model { property Node targetNode: null property Node scene: null property bool selected: false + property color color function updateGeometry() { @@ -49,7 +50,7 @@ Model { materials: [ DefaultMaterial { id: defaultMaterial - emissiveColor: lightModel.selected ? "#FF0000" : "#555555" + emissiveColor: lightModel.selected ? lightModel.color : "#555555" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri index 9a5be562e3c..755aef73e25 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/editor3d.pri @@ -4,7 +4,8 @@ HEADERS += $$PWD/generalhelper.h \ $$PWD/lightgeometry.h \ $$PWD/gridgeometry.h \ $$PWD/selectionboxgeometry.h \ - $$PWD/linegeometry.h + $$PWD/linegeometry.h \ + $$PWD/icongizmoimageprovider.h SOURCES += $$PWD/generalhelper.cpp \ $$PWD/mousearea3d.cpp \ @@ -12,4 +13,5 @@ SOURCES += $$PWD/generalhelper.cpp \ $$PWD/lightgeometry.cpp \ $$PWD/gridgeometry.cpp \ $$PWD/selectionboxgeometry.cpp \ - $$PWD/linegeometry.cpp + $$PWD/linegeometry.cpp \ + $$PWD/icongizmoimageprovider.cpp diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/icongizmoimageprovider.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/icongizmoimageprovider.cpp new file mode 100644 index 00000000000..2e5a2b0d0a0 --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/icongizmoimageprovider.cpp @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#include "icongizmoimageprovider.h" + +namespace QmlDesigner { +namespace Internal { + +IconGizmoImageProvider::IconGizmoImageProvider() + : QQuickImageProvider(QQuickImageProvider::Image) +{ +} + +QImage IconGizmoImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize) +{ + // id format: : + QStringList parts = id.split(':'); + if (parts.size() == 2) { + QImage image(QStringLiteral("://qtquickplugin/mockfiles/images/%1").arg(parts[0])); + + // Recolorize non-transparent image pixels + QColor targetColor(parts[1]); + int r = targetColor.red(); + int g = targetColor.green(); + int b = targetColor.blue(); + int size = image.sizeInBytes(); + uchar *byte = image.bits(); + for (int i = 0; i < size; i += 4) { + // Skip if alpha is zero + if (*(byte + 3) != 0) { + // Average between target color and current color + *byte = uchar((int(*byte) + b) / 2); + ++byte; + *byte = uchar((int(*byte) + g) / 2); + ++byte; + *byte = uchar((int(*byte) + r) / 2); + ++byte; + // Preserve alpha + ++byte; + } else { + byte += 4; + } + } + return image; + } else { + return {}; + } +} + +} +} diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/icongizmoimageprovider.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/icongizmoimageprovider.h new file mode 100644 index 00000000000..e4833e3b20d --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/icongizmoimageprovider.h @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include + +namespace QmlDesigner { +namespace Internal { + +class IconGizmoImageProvider : public QQuickImageProvider +{ +public: + IconGizmoImageProvider(); + + QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override; +}; +} +} diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp index 034a809b16f..48830caee64 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/iconrenderer/iconrenderer.cpp @@ -150,10 +150,10 @@ void IconRenderer::setupRender() QTimer::singleShot(1000, qGuiApp, &QGuiApplication::quit); }); } else { - qGuiApp->quit(); + QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit); } } else { - qGuiApp->quit(); + QTimer::singleShot(0, qGuiApp, &QGuiApplication::quit); } } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index 1c6601784b8..7fabfcf9032 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -753,10 +753,14 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC Q_UNUSED(disableComponentComplete) QQmlComponent component(context->engine(), fixComponentPathForIncompatibleQt(componentPath)); - QObject *object = component.beginCreate(context); - QmlPrivateGate::tweakObjects(object); - component.completeCreate(); + QObject *object = nullptr; + if (!component.isError()) { + object = component.beginCreate(context); + QmlPrivateGate::tweakObjects(object); + component.completeCreate(); + QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); + } if (component.isError()) { qDebug() << componentPath; @@ -764,8 +768,6 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC qWarning() << error; } - QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); - return object; } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index 4331e35ddc8..798baa61acb 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -71,6 +71,7 @@ #include "../editor3d/gridgeometry.h" #include "../editor3d/selectionboxgeometry.h" #include "../editor3d/linegeometry.h" +#include "../editor3d/icongizmoimageprovider.h" #include #include @@ -114,6 +115,8 @@ void Qt5InformationNodeInstanceServer::createEditView3D() QObject::connect(helper, &QmlDesigner::Internal::GeneralHelper::toolStateChanged, this, &Qt5InformationNodeInstanceServer::handleToolStateChanged); engine()->rootContext()->setContextProperty("_generalHelper", helper); + engine()->addImageProvider(QLatin1String("IconGizmoImageProvider"), + new QmlDesigner::Internal::IconGizmoImageProvider); m_3dHelper = helper; m_editView3D = new QQuickView(quickView()->engine(), quickView()); diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml index 23c801eca39..9641d74b1b4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml @@ -37,7 +37,7 @@ Section { SectionLayout { Label { text: qsTr("Running") - tooltip: qsTr("Sets whether the animation should run to completion when it is stopped.") + tooltip: qsTr("Sets whether the animation is currently running.") } CheckBox { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml index 8381513548f..e609297149d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml @@ -41,7 +41,7 @@ Item { property bool block: false - signal clicked + signal updateColor signal rightMouseButtonClicked onAlphaChanged: invalidateColor(); @@ -216,7 +216,7 @@ Item { } onReleased: { if (mouse.button === Qt.LeftButton) - colorButton.clicked() + colorButton.updateColor() } acceptedButtons: Qt.LeftButton | Qt.RightButton @@ -245,7 +245,7 @@ Item { if (colorButton.hue !== value) colorButton.hue = value } - onClicked: colorButton.clicked() + onClicked: colorButton.updateColor() } Row { @@ -278,7 +278,7 @@ Item { var tmp = redSlider.value / 255.0 if (colorButton.color.r !== tmp && !colorButton.block) { colorButton.color.r = tmp - colorButton.clicked() + colorButton.updateColor() } } } @@ -307,7 +307,7 @@ Item { var tmp = greenSlider.value / 255.0 if (colorButton.color.g !== tmp && !colorButton.block) { colorButton.color.g = tmp - colorButton.clicked() + colorButton.updateColor() } } } @@ -336,7 +336,7 @@ Item { var tmp = blueSlider.value / 255.0 if (colorButton.color.b !== tmp && !colorButton.block) { colorButton.color.b = tmp - colorButton.clicked() + colorButton.updateColor() } } } @@ -359,7 +359,7 @@ Item { onValueModified: { if (colorButton.alpha !== alphaSlider.value && !colorButton.block) { colorButton.alpha = alphaSlider.value - colorButton.clicked() + colorButton.updateColor() } } } @@ -384,7 +384,7 @@ Item { onValueModified: { if (colorButton.hue !== hueSlider2.value && !colorButton.block) { colorButton.hue = hueSlider2.value - colorButton.clicked() + colorButton.updateColor() } } } @@ -406,7 +406,7 @@ Item { onValueModified: { if (colorButton.saturation !== saturationSlider.value && !colorButton.block) { colorButton.saturation = saturationSlider.value - colorButton.clicked() + colorButton.updateColor() } } } @@ -428,7 +428,7 @@ Item { onValueModified: { if (colorButton.lightness !== lightnessSlider.value && !colorButton.block) { colorButton.lightness = lightnessSlider.value - colorButton.clicked() + colorButton.updateColor() } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml index a1b5672ebb3..536877b58ed 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml @@ -626,7 +626,7 @@ Column { sliderMargins: 4 - onClicked: { + onUpdateColor: { colorEditor.color = colorButton.color if (contextMenu.opened) contextMenu.close() diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml index e79b399ede4..3d692af671c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml @@ -38,53 +38,69 @@ QtObject { readonly property string actionIcon: "\u0021" readonly property string actionIconBinding: "\u0022" - readonly property string addFile: "\u0023" - readonly property string alignBottom: "\u0024" - readonly property string alignCenterHorizontal: "\u0025" - readonly property string alignCenterVertical: "\u0026" - readonly property string alignLeft: "\u0027" - readonly property string alignRight: "\u0028" - readonly property string alignTo: "\u0029" - readonly property string alignTop: "\u002A" - readonly property string anchorBaseline: "\u002B" - readonly property string anchorBottom: "\u002C" - readonly property string anchorFill: "\u002D" - readonly property string anchorLeft: "\u002E" - readonly property string anchorRight: "\u002F" - readonly property string anchorTop: "\u0030" - readonly property string annotationBubble: "\u0031" - readonly property string annotationDecal: "\u0032" - readonly property string centerHorizontal: "\u0033" - readonly property string centerVertical: "\u0034" - readonly property string closeCross: "\u0035" - readonly property string distributeBottom: "\u0036" - readonly property string distributeCenterHorizontal: "\u0037" - readonly property string distributeCenterVertical: "\u0038" - readonly property string distributeLeft: "\u0039" - readonly property string distributeOriginBottomRight: "\u003A" - readonly property string distributeOriginCenter: "\u003B" - readonly property string distributeOriginNone: "\u003C" - readonly property string distributeOriginTopLeft: "\u003D" - readonly property string distributeRight: "\u003E" - readonly property string distributeSpacingHorizontal: "\u003F" - readonly property string distributeSpacingVertical: "\u0040" - readonly property string distributeTop: "\u0041" - readonly property string edit: "\u0042" - readonly property string fontStyleBold: "\u0043" - readonly property string fontStyleItalic: "\u0044" - readonly property string fontStyleStrikethrough: "\u0045" - readonly property string fontStyleUnderline: "\u0046" - readonly property string testIcon: "\u0047" - readonly property string textAlignBottom: "\u0048" - readonly property string textAlignCenter: "\u0049" - readonly property string textAlignLeft: "\u004A" - readonly property string textAlignMiddle: "\u004B" - readonly property string textAlignRight: "\u004C" - readonly property string textAlignTop: "\u004D" - readonly property string tickIcon: "\u004E" - readonly property string triState: "\u004F" - readonly property string upDownIcon: "\u0050" - readonly property string upDownSquare2: "\u0051" + readonly property string addColumnAfter: "\u0023" + readonly property string addColumnBefore: "\u0024" + readonly property string addFile: "\u0025" + readonly property string addRowAfter: "\u0026" + readonly property string addRowBefore: "\u0027" + readonly property string addTable: "\u0028" + readonly property string alignBottom: "\u0029" + readonly property string alignCenterHorizontal: "\u002A" + readonly property string alignCenterVertical: "\u002B" + readonly property string alignLeft: "\u002C" + readonly property string alignRight: "\u002D" + readonly property string alignTo: "\u002E" + readonly property string alignTop: "\u002F" + readonly property string anchorBaseline: "\u0030" + readonly property string anchorBottom: "\u0031" + readonly property string anchorFill: "\u0032" + readonly property string anchorLeft: "\u0033" + readonly property string anchorRight: "\u0034" + readonly property string anchorTop: "\u0035" + readonly property string annotationBubble: "\u0036" + readonly property string annotationDecal: "\u0037" + readonly property string centerHorizontal: "\u0038" + readonly property string centerVertical: "\u0039" + readonly property string closeCross: "\u003A" + readonly property string deleteColumn: "\u003B" + readonly property string deleteRow: "\u003C" + readonly property string deleteTable: "\u003D" + readonly property string distributeBottom: "\u003E" + readonly property string distributeCenterHorizontal: "\u003F" + readonly property string distributeCenterVertical: "\u0040" + readonly property string distributeLeft: "\u0041" + readonly property string distributeOriginBottomRight: "\u0042" + readonly property string distributeOriginCenter: "\u0043" + readonly property string distributeOriginNone: "\u0044" + readonly property string distributeOriginTopLeft: "\u0045" + readonly property string distributeRight: "\u0046" + readonly property string distributeSpacingHorizontal: "\u0047" + readonly property string distributeSpacingVertical: "\u0048" + readonly property string distributeTop: "\u0049" + readonly property string edit: "\u004A" + readonly property string fontStyleBold: "\u004B" + readonly property string fontStyleItalic: "\u004C" + readonly property string fontStyleStrikethrough: "\u004D" + readonly property string fontStyleUnderline: "\u004E" + readonly property string mergeCells: "\u004F" + readonly property string redo: "\u0050" + readonly property string splitColumns: "\u0051" + readonly property string splitRows: "\u0052" + readonly property string testIcon: "\u0053" + readonly property string textAlignBottom: "\u0054" + readonly property string textAlignCenter: "\u0055" + readonly property string textAlignLeft: "\u0056" + readonly property string textAlignMiddle: "\u0057" + readonly property string textAlignRight: "\u0058" + readonly property string textAlignTop: "\u0059" + readonly property string textBulletList: "\u005A" + readonly property string textFullJustification: "\u005B" + readonly property string textNumberedList: "\u005C" + readonly property string tickIcon: "\u005D" + readonly property string triState: "\u005E" + readonly property string undo: "\u005F" + readonly property string upDownIcon: "\u0060" + readonly property string upDownSquare2: "\u0061" readonly property font iconFont: Qt.font({ "family": controlIcons.name, diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf index 28840afacf6..d65b0651952 100644 Binary files a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf and b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf differ diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index fadb50acbcb..80c23fbef15 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -325,6 +325,11 @@ void DebuggerRunTool::setSymbolFile(const FilePath &symbolFile) m_runParameters.symbolFile = symbolFile; } +void DebuggerRunTool::setLldbPlatform(const QString &platform) +{ + m_runParameters.platform = platform; +} + void DebuggerRunTool::setRemoteChannel(const QString &channel) { m_runParameters.remoteChannel = channel; @@ -1078,9 +1083,9 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat setStarter([this, runControl, mainRunnable, portsGatherer] { QTC_ASSERT(portsGatherer, reportFailure(); return); - Runnable gdbserver; - gdbserver.environment = mainRunnable.environment; - gdbserver.workingDirectory = mainRunnable.workingDirectory; + Runnable debugServer; + debugServer.environment = mainRunnable.environment; + debugServer.workingDirectory = mainRunnable.workingDirectory; QStringList args = QtcProcess::splitArgs(mainRunnable.commandLineArguments, OsTypeLinux); @@ -1092,23 +1097,31 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat portsGatherer->qmlServer())); } if (isQmlDebugging && !isCppDebugging) { - gdbserver.executable = mainRunnable.executable; // FIXME: Case should not happen? + debugServer.executable = mainRunnable.executable; // FIXME: Case should not happen? } else { - gdbserver.executable = FilePath::fromString(runControl->device()->debugServerPath()); - if (gdbserver.executable.isEmpty()) - gdbserver.executable = FilePath::fromString("gdbserver"); + debugServer.executable = FilePath::fromString(runControl->device()->debugServerPath()); + if (debugServer.executable.isEmpty()) + debugServer.executable = FilePath::fromString("gdbserver"); args.clear(); - if (m_useMulti) - args.append("--multi"); - if (m_pid.isValid()) - args.append("--attach"); - args.append(QString(":%1").arg(portsGatherer->gdbServer().port())); - if (m_pid.isValid()) - args.append(QString::number(m_pid.pid())); + if (debugServer.executable.toString().contains("lldb-server")) { + args.append("platform"); + args.append("--listen"); + args.append(QString("*:%1").arg(portsGatherer->gdbServer().port())); + args.append("--server"); + } else { + // Something resembling gdbserver + if (m_useMulti) + args.append("--multi"); + if (m_pid.isValid()) + args.append("--attach"); + args.append(QString(":%1").arg(portsGatherer->gdbServer().port())); + if (m_pid.isValid()) + args.append(QString::number(m_pid.pid())); + } } - gdbserver.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux); + debugServer.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux); - doStart(gdbserver, runControl->device()); + doStart(debugServer, runControl->device()); }); } diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h index 80b877a67a8..adc9de8fef6 100644 --- a/src/plugins/debugger/debuggerruncontrol.h +++ b/src/plugins/debugger/debuggerruncontrol.h @@ -92,6 +92,7 @@ public: void setSysRoot(const Utils::FilePath &sysRoot); void setSymbolFile(const Utils::FilePath &symbolFile); + void setLldbPlatform(const QString &platform); void setRemoteChannel(const QString &channel); void setRemoteChannel(const QString &host, int port); void setRemoteChannel(const QUrl &url); diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index c8d9ff30de2..70f2c708814 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -278,6 +278,7 @@ void LldbEngine::setupEngine() cmd2.arg("workingdirectory", rp.inferior.workingDirectory); cmd2.arg("environment", rp.inferior.environment.toStringList()); cmd2.arg("processargs", toHex(QtcProcess::splitArgs(rp.inferior.commandLineArguments).join(QChar(0)))); + cmd2.arg("platform", rp.platform); if (terminal()) { const qint64 attachedPID = terminal()->applicationPid(); diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index 0cd35c047bb..d88e8dea7d5 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -471,7 +471,7 @@ void AbstractProcessStep::slotProcessFinished(int, QProcess::ExitStatus) const QString stdOutLine = process ? QString::fromLocal8Bit(process->readAllStandardOutput()) : QString(); for (const QString &l : stdOutLine.split('\n')) - stdError(l); + stdOutput(l); cleanUp(process); } diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index 41bcc17ccc8..08bfa57de03 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -652,7 +652,7 @@ void BuildManager::nextBuildQueue() void BuildManager::progressChanged(int percent, const QString &text) { if (d->m_progressFutureInterface) - d->m_progressFutureInterface->setProgressValueAndText(percent, text); + d->m_progressFutureInterface->setProgressValueAndText(percent + 100 * d->m_progress, text); } void BuildManager::nextStep() diff --git a/src/plugins/projectexplorer/treescanner.cpp b/src/plugins/projectexplorer/treescanner.cpp index 7c7f634d1a8..14f10c66db1 100644 --- a/src/plugins/projectexplorer/treescanner.cpp +++ b/src/plugins/projectexplorer/treescanner.cpp @@ -51,6 +51,8 @@ TreeScanner::TreeScanner(QObject *parent) : QObject(parent) TreeScanner::~TreeScanner() { + disconnect(&m_futureWatcher, nullptr, nullptr, nullptr); // Do not trigger signals anymore! + if (!m_futureWatcher.isFinished()) { m_futureWatcher.cancel(); m_futureWatcher.waitForFinished(); diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index f6c58a2bb13..2be3ca1d900 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -536,10 +536,20 @@ void QbsBuildSystem::handleQbsParsingDone(bool success) bool dataChanged = false; bool envChanged = m_lastParseEnv != m_qbsProjectParser->environment(); m_lastParseEnv = m_qbsProjectParser->environment(); + const bool isActiveBuildSystem = project()->activeTarget() + && project()->activeTarget()->buildSystem() == this; if (success) { const QJsonObject projectData = m_qbsProjectParser->session()->projectData(); if (projectData != m_projectData) { m_projectData = projectData; + dataChanged = isActiveBuildSystem; + } else if (isActiveBuildSystem + && (!project()->rootProjectNode() || static_cast( + project()->rootProjectNode())->projectData() != projectData)) { + // This is needed to trigger the necessary updates when switching targets. + // Nothing has changed on the BuildSystem side, but this build system's data now + // represents the project, so the data has changed from the overall project's + // point of view. dataChanged = true; } } else { diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dactions.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dactions.cpp index a249f78a126..ce1e40a9365 100644 --- a/src/plugins/qmldesigner/components/edit3d/edit3dactions.cpp +++ b/src/plugins/qmldesigner/components/edit3d/edit3dactions.cpp @@ -85,6 +85,7 @@ QByteArray Edit3DAction::category() const bool Edit3DAction::isVisible(const SelectionContext &selectionContext) const { + Q_UNUSED(selectionContext) return true; } diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp index 9998bfc03d6..c9482272335 100644 --- a/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp +++ b/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp @@ -143,6 +143,7 @@ void Edit3DWidget::showCanvas(bool show) void Edit3DWidget::linkActivated(const QString &link) { + Q_UNUSED(link) if (m_view) m_view->addQuick3DImport(); } diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index 94844430844..be6cdcdf567 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -46,6 +46,8 @@ namespace QmlDesigner { +const int flowBlockSize = 200; + FormEditorScene *FormEditorItem::scene() const { return qobject_cast(QGraphicsItem::scene()); } @@ -646,17 +648,71 @@ void FormEditorTransitionItem::setDataModelPositionInBaseState(const QPointF &) } +class ResolveConnection +{ +public: + ResolveConnection(const QmlItemNode &node) : + from({}) + ,to(node.modelNode().bindingProperty("to").resolveToModelNode()) + ,areaNode(ModelNode()) + { + if (node.modelNode().hasBindingProperty("from")) + from = node.modelNode().bindingProperty("from").resolveToModelNode(); + const QmlFlowItemNode to = node.modelNode().bindingProperty("to").resolveToModelNode(); + + if (from.isValid()) { + for (const QmlFlowActionAreaNode &area : from.flowActionAreas()) { + ModelNode target = area.targetTransition(); + if (target == node.modelNode()) { + areaNode = area; + } else { + const ModelNode decisionNode = area.decisionNodeForTransition(node.modelNode()); + if (decisionNode.isValid()) { + from = decisionNode; + areaNode = ModelNode(); + } + } + } + if (from.modelNode().hasAuxiliaryData("joinConnection")) + joinConnection = from.modelNode().auxiliaryData("joinConnection").toBool(); + } else { + if (from == node.rootModelNode()) { + isStartLine = true; + } else { + for (const ModelNode wildcard : QmlFlowViewNode(node.rootModelNode()).wildcards()) { + if (wildcard.bindingProperty("target").resolveToModelNode() == node.modelNode()) { + from = wildcard; + isWildcardLine = true; + } + } + } + } + } + + bool joinConnection = false; + + bool isStartLine = false; + + bool isWildcardLine = false; + + QmlFlowItemNode from; + QmlFlowItemNode to; + QmlFlowActionAreaNode areaNode; +}; + void FormEditorTransitionItem::updateGeometry() { FormEditorItem::updateGeometry(); - const ModelNode from = qmlItemNode().modelNode().bindingProperty("from").resolveToModelNode(); - const ModelNode to = qmlItemNode().modelNode().bindingProperty("to").resolveToModelNode(); + ResolveConnection resolved(qmlItemNode()); - QPointF fromP = QmlItemNode(from).flowPosition(); - QRectF sizeTo = QmlItemNode(to).instanceBoundingRect(); + QPointF fromP = QmlItemNode(resolved.from).flowPosition(); + QRectF sizeTo = resolved.to.instanceBoundingRect(); - QPointF toP = QmlItemNode(to).flowPosition(); + QPointF toP = QmlItemNode(resolved.to).flowPosition(); + + if (QmlItemNode(resolved.to).isFlowDecision()) + sizeTo = QRectF(0, 0, flowBlockSize, flowBlockSize); qreal x1 = fromP.x(); qreal x2 = toP.x(); @@ -923,83 +979,44 @@ void FormEditorTransitionItem::paint(QPainter *painter, const QStyleOptionGraphi if (!qmlItemNode().modelNode().isValid()) return; - if (!(qmlItemNode().modelNode().hasBindingProperty("from") - && qmlItemNode().modelNode().hasBindingProperty("to"))) + if (!qmlItemNode().modelNode().hasBindingProperty("to")) return; painter->save(); - QmlFlowItemNode from = qmlItemNode().modelNode().bindingProperty("from").resolveToModelNode(); - const QmlFlowItemNode to = qmlItemNode().modelNode().bindingProperty("to").resolveToModelNode(); + ResolveConnection resolved(qmlItemNode()); - QmlFlowActionAreaNode areaNode = ModelNode(); - - bool joinConnection = false; - - bool isStartLine = false; - - bool isWildcardLine = false; - - if (from.isValid()) { - for (const QmlFlowActionAreaNode &area : from.flowActionAreas()) { - ModelNode target = area.targetTransition(); - if (target == qmlItemNode().modelNode()) { - areaNode = area; - } else { - const ModelNode decisionNode = area.decisionNodeForTransition(qmlItemNode().modelNode()); - if (decisionNode.isValid()) { - from = decisionNode; - areaNode = ModelNode(); - } - } - } - if (from.modelNode().hasAuxiliaryData("joinConnection")) - joinConnection = from.modelNode().auxiliaryData("joinConnection").toBool(); - } else { - if (from == qmlItemNode().rootModelNode()) { - isStartLine = true; - } else { - for (const ModelNode wildcard : QmlFlowViewNode(qmlItemNode().rootModelNode()).wildcards()) { - if (wildcard.bindingProperty("target").resolveToModelNode() == qmlItemNode().modelNode()) { - from = wildcard; - isWildcardLine = true; - } - } - - } - } - - if (!from.modelNode().isValid()) + if (!resolved.from.modelNode().isValid()) return; - QRectF fromRect = QmlItemNode(from).instanceBoundingRect(); - if (QmlItemNode(from).isFlowDecision()) - fromRect = QRectF(0,0,200,200); + QRectF fromRect = QmlItemNode(resolved.from).instanceBoundingRect(); + if (QmlItemNode(resolved.from).isFlowDecision()) + fromRect = QRectF(0, 0, flowBlockSize, flowBlockSize); - if (QmlItemNode(from).isFlowWildcard()) - fromRect = QRectF(0,0,200,200); - fromRect.translate(QmlItemNode(from).flowPosition()); + if (QmlItemNode(resolved.from).isFlowWildcard()) + fromRect = QRectF(0, 0, flowBlockSize, flowBlockSize); + fromRect.translate(QmlItemNode(resolved.from).flowPosition()); - if (isStartLine) { + if (resolved.isStartLine) { fromRect = QRectF(0,0,100,100); - fromRect.translate(QmlItemNode(to).flowPosition()- QPoint(200, 0)); + fromRect.translate(QmlItemNode(resolved.to).flowPosition()- QPoint(200, 0)); } - if (!joinConnection && areaNode.isValid()) { - fromRect = QmlItemNode(areaNode).instanceBoundingRect(); - fromRect.translate(QmlItemNode(from).flowPosition()); - fromRect.translate(areaNode.instancePosition()); + if (!resolved.joinConnection && resolved.areaNode.isValid()) { + fromRect = QmlItemNode(resolved.areaNode).instanceBoundingRect(); + fromRect.translate(QmlItemNode(resolved.from).flowPosition()); + fromRect.translate(resolved.areaNode.instancePosition()); } - QRectF toRect = QmlItemNode(to).instanceBoundingRect(); - if (QmlItemNode(to).isFlowDecision()) - toRect = QRectF(0,0,200,200); + QRectF toRect = QmlItemNode(resolved.to).instanceBoundingRect(); + if (QmlItemNode(resolved.to).isFlowDecision()) + toRect = QRectF(0, 0, flowBlockSize,flowBlockSize); - toRect.translate(QmlItemNode(to).flowPosition()); + toRect.translate(QmlItemNode(resolved.to).flowPosition()); - if (isStartLine) { + if (resolved.isStartLine) { fromRect = QRectF(0,0,50,50); - fromRect.translate(QmlItemNode(to).flowPosition() + QPoint(-120, toRect.height() / 2 - 25)); + fromRect.translate(QmlItemNode(resolved.to).flowPosition() + QPoint(-120, toRect.height() / 2 - 25)); } toRect.translate(-pos()); @@ -1021,9 +1038,12 @@ void FormEditorTransitionItem::paint(QPainter *painter, const QStyleOptionGraphi QColor color = "#e71919"; - if (isStartLine) + if (resolved.isStartLine) color = "blue"; + if (resolved.isWildcardLine) + color = "green"; + bool dash = false; if (qmlItemNode().modelNode().hasAuxiliaryData("color")) @@ -1048,7 +1068,7 @@ void FormEditorTransitionItem::paint(QPainter *painter, const QStyleOptionGraphi paintConnection(painter, fromRect, toRect, width, adjustedWidth ,color, dash, outOffset, inOffset, breakOffset); - if (isStartLine) { + if (resolved.isStartLine) { QPen pen; pen.setCosmetic(true); @@ -1094,7 +1114,7 @@ QTransform FormEditorItem::viewportTransform() const void FormEditorFlowDecisionItem::updateGeometry() { prepareGeometryChange(); - m_selectionBoundingRect = QRectF(0,0, 200, 200); + m_selectionBoundingRect = QRectF(0,0, flowBlockSize, flowBlockSize); m_paintedBoundingRect = m_selectionBoundingRect; m_boundingRect = m_paintedBoundingRect; setTransform(qmlItemNode().instanceTransformWithContentTransform()); @@ -1104,6 +1124,8 @@ void FormEditorFlowDecisionItem::updateGeometry() void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option) + Q_UNUSED(widget) if (!painter->isActive()) return; @@ -1162,6 +1184,7 @@ void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGrap bool FormEditorFlowDecisionItem::flowHitTest(const QPointF &point) const { + Q_UNUSED(point) return true; } diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimporter.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimporter.cpp index 37f3acd4aa4..ee290d01f39 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimporter.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimporter.cpp @@ -275,6 +275,11 @@ void ItemLibraryAssetImporter::parseQuick3DAsset(const QString &file, const QVar QString targetDirPath = targetDir.filePath(assetName); + if (outDir.exists(assetName)) { + addWarning(tr("Skipped import of duplicate asset: \"%1\"").arg(assetName)); + return; + } + if (targetDir.exists(assetName)) { if (!confirmAssetOverwrite(assetName)) { addWarning(tr("Skipped import of existing asset: \"%1\"").arg(assetName)); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp index 3714f2bf076..7f2558220f0 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -290,13 +291,15 @@ void ItemLibraryModel::addRoleNames() void ItemLibraryModel::sortSections() { + int nullPointerSectionCount = m_sections.removeAll(QPointer()); + QTC_ASSERT(nullPointerSectionCount == 0,;); auto sectionSort = [](ItemLibrarySection *first, ItemLibrarySection *second) { return QString::localeAwareCompare(first->sortingName(), second->sortingName()) < 1; }; std::sort(m_sections.begin(), m_sections.end(), sectionSort); - foreach (ItemLibrarySection *itemLibrarySection, m_sections) + for (auto itemLibrarySection : m_sections) itemLibrarySection->sortItems(); } diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp index 994f72f1844..b1db4d128e5 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp @@ -74,7 +74,7 @@ bool ItemLibrarySection::updateSectionVisibility(const QString &searchText, bool *changed = false; - foreach(ItemLibraryItem *itemLibraryItem, m_sectionEntries.items()) { + for (auto itemLibraryItem : m_sectionEntries.items()) { bool itemVisible = itemLibraryItem->itemName().toLower().contains(searchText) || itemLibraryItem->typeName().toLower().contains(searchText); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp index 5a60dd1eb78..6f7e57763c3 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp @@ -27,6 +27,8 @@ #include "itemlibraryitem.h" +#include + #include namespace QmlDesigner { @@ -79,13 +81,15 @@ void ItemLibrarySectionModel::addItem(ItemLibraryItem *element) element->setVisible(true); } -const QList &ItemLibrarySectionModel::items() const +const QList> &ItemLibrarySectionModel::items() const { return m_itemList; } void ItemLibrarySectionModel::sortItems() { + int nullPointerSectionCount = m_itemList.removeAll(QPointer()); + QTC_ASSERT(nullPointerSectionCount == 0,;); auto itemSort = [](ItemLibraryItem *first, ItemLibraryItem *second) { return QString::localeAwareCompare(first->itemName(), second->itemName()) < 1; }; diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h index 6e1771a52f0..4995e0c8c58 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.h @@ -28,6 +28,7 @@ #include "itemlibrarymodel.h" #include +#include namespace QmlDesigner { @@ -47,7 +48,7 @@ public: void addItem(ItemLibraryItem *item); - const QList &items() const; + const QList > &items() const; void sortItems(); void resetModel(); @@ -56,7 +57,7 @@ private: // functions void addRoleNames(); private: // variables - QList m_itemList; + QList> m_itemList; QHash m_roleNames; }; diff --git a/src/plugins/qmldesigner/qmldesignericons.h b/src/plugins/qmldesigner/qmldesignericons.h index 34c9061072e..b112b11d140 100644 --- a/src/plugins/qmldesigner/qmldesignericons.h +++ b/src/plugins/qmldesigner/qmldesignericons.h @@ -48,37 +48,37 @@ const Utils::Icon NO_SNAPPING_AND_ANCHORING({ {QLatin1String(":/icon/layout/snapping_and_anchoring.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_LIGHT_ON({ - {QLatin1String(":/edit3d/images/edit_light_on.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/edit_light_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_LIGHT_OFF({ {QLatin1String(":/edit3d/images/edit_light_off.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_GRID_ON({ - {QLatin1String(":/edit3d/images/grid_on.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/grid_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_GRID_OFF({ {QLatin1String(":/edit3d/images/grid_off.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_SELECTION_MODE_ON({ - {QLatin1String(":/edit3d/images/select_group.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/select_group.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_SELECTION_MODE_OFF({ {QLatin1String(":/edit3d/images/select_item.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_MOVE_TOOL_ON({ - {QLatin1String(":/edit3d/images/move_on.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/move_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_MOVE_TOOL_OFF({ {QLatin1String(":/edit3d/images/move_off.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_ROTATE_TOOL_ON({ - {QLatin1String(":/edit3d/images/rotate_on.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/rotate_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_ROTATE_TOOL_OFF({ {QLatin1String(":/edit3d/images/rotate_off.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_SCALE_TOOL_ON({ - {QLatin1String(":/edit3d/images/scale_on.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/scale_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_SCALE_TOOL_OFF({ {QLatin1String(":/edit3d/images/scale_off.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_FIT_SELECTED_OFF({ {QLatin1String(":/edit3d/images/fit_selected.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_EDIT_CAMERA_ON({ - {QLatin1String(":/edit3d/images/perspective_camera.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/perspective_camera.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_EDIT_CAMERA_OFF({ {QLatin1String(":/edit3d/images/orthographic_camera.png"), Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_ORIENTATION_ON({ - {QLatin1String(":/edit3d/images/global.png"), Utils::Theme::IconsBaseColor}}); + {QLatin1String(":/edit3d/images/global.png"), Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_ORIENTATION_OFF({ {QLatin1String(":/edit3d/images/local.png"), Utils::Theme::IconsBaseColor}}); diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index b9806996416..654b937aaec 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -41,14 +41,15 @@ LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl) setUsePortsGatherer(isCppDebugging(), isQmlDebugging()); addQmlServerInferiorCommandLineArgumentIfNeeded(); - auto gdbServer = new DebugServerRunner(runControl, portsGatherer()); - gdbServer->setEssential(true); + auto debugServer = new DebugServerRunner(runControl, portsGatherer()); + debugServer->setEssential(true); - addStartDependency(gdbServer); + addStartDependency(debugServer); setStartMode(AttachToRemoteServer); setCloseMode(KillAndExitMonitorAtClose); setUseExtendedRemote(true); + setLldbPlatform("remote-linux"); } } // namespace Internal diff --git a/src/shared/proparser/prowriter.cpp b/src/shared/proparser/prowriter.cpp index 52d49751f29..e3fcc5f6008 100644 --- a/src/shared/proparser/prowriter.cpp +++ b/src/shared/proparser/prowriter.cpp @@ -471,12 +471,17 @@ QList ProWriter::removeVarValues(ProFile *profile, QStringList *lines, // This code expects proVars to be sorted by the variables' appearance in the file. int delta = 1; - for (const VarLocation &loc : qAsConst(varLocations)) { + for (int varIndex = 0; varIndex < varLocations.count(); ++varIndex) { + const VarLocation &loc = varLocations[varIndex]; bool first = true; int lineNo = loc.second - delta; typedef QPair ContPos; QList contPos; - while (lineNo < lines->count()) { + const auto nextSegmentStart = [varIndex, lines, &delta, &varLocations] { + return varIndex == varLocations.count() - 1 + ? lines->count() : varLocations[varIndex + 1].second - delta; + }; + while (lineNo < nextSegmentStart()) { QString &line = (*lines)[lineNo]; int lineLen = line.length(); bool killed = false; diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt index cab493e9942..178cf942238 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt @@ -107,6 +107,7 @@ extend_qtc_executable(qml2puppet gridgeometry.cpp gridgeometry.h selectionboxgeometry.cpp selectionboxgeometry.h linegeometry.cpp linegeometry.h + icongizmoimageprovider.cpp icongizmoimageprovider.h ) extend_qtc_executable(qml2puppet diff --git a/src/tools/qml2puppet/qml2puppet.qbs b/src/tools/qml2puppet/qml2puppet.qbs index 5ca88541b00..8a264579012 100644 --- a/src/tools/qml2puppet/qml2puppet.qbs +++ b/src/tools/qml2puppet/qml2puppet.qbs @@ -217,6 +217,8 @@ QtcTool { "editor3d/selectionboxgeometry.h", "editor3d/linegeometry.cpp", "editor3d/linegeometry.h", + "editor3d/icongizmoimageprovider.cpp", + "editor3d/icongizmoimageprovider.h", "iconrenderer/iconrenderer.cpp", "iconrenderer/iconrenderer.h", "qml2puppetmain.cpp", diff --git a/tests/system/suite_CSUP/tst_CSUP02/test.py b/tests/system/suite_CSUP/tst_CSUP02/test.py index f5e7894d62d..ba8fce83c13 100644 --- a/tests/system/suite_CSUP/tst_CSUP02/test.py +++ b/tests/system/suite_CSUP/tst_CSUP02/test.py @@ -88,9 +88,5 @@ def main(): "- Content of editor:\n%s" % editorWidget.plainText) invokeMenuItem('File', 'Revert "main.cpp" to Saved') clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) - snooze(1) # 'Close "main.cpp"' might still be disabled - # editor must be closed to get the second code model applied on re-opening the file - invokeMenuItem('File', 'Close "main.cpp"') - # exit qt creator invokeMenuItem("File", "Exit") waitForCleanShutdown() diff --git a/tests/system/suite_CSUP/tst_CSUP03/test.py b/tests/system/suite_CSUP/tst_CSUP03/test.py index 7565af28307..441c14f354c 100644 --- a/tests/system/suite_CSUP/tst_CSUP03/test.py +++ b/tests/system/suite_CSUP/tst_CSUP03/test.py @@ -83,7 +83,7 @@ def main(): continue if not startCreatorVerifyingClang(useClang): continue - projectName = createNewNonQtProject(tempDir(), "project_csup03", + projectName = createNewNonQtProject(tempDir(), "project-csup03", [Targets.DESKTOP_4_8_7_DEFAULT]) checkCodeModelSettings(useClang) openDocument("%s.Sources.main\\.cpp" % projectName) @@ -120,7 +120,5 @@ def main(): test.compare(modifiedCode, expectedCode, "Verifying whether code matches expected.") # reverting to initial state of main.cpp revertMainCpp() - snooze(1) # "Close All" might be disabled - invokeMenuItem('File', 'Close All') invokeMenuItem('File', 'Exit') waitForCleanShutdown() diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py index 99ec6ae8db3..167db47f51b 100644 --- a/tests/system/suite_CSUP/tst_CSUP04/test.py +++ b/tests/system/suite_CSUP/tst_CSUP04/test.py @@ -76,6 +76,5 @@ def main(): # wait until search finished and verify search results waitForSearchResults() validateSearchResult(5 if JIRA.isBugStillOpen(2863) else 3) - invokeMenuItem("File", "Close All") invokeMenuItem("File", "Exit") waitForCleanShutdown() diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py index 2bd3dd846c7..f784a15cd31 100644 --- a/tests/system/suite_CSUP/tst_CSUP05/test.py +++ b/tests/system/suite_CSUP/tst_CSUP05/test.py @@ -91,7 +91,6 @@ def main(): clickButton(waitForObject(":Qt Creator.CloseFind_QToolButton")) test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar", False), "Verifying if: Find/Replace tab is closed.") - invokeMenuItem("File", "Close All") - clickButton(waitForObject(":Save Changes.Do not Save_QPushButton")) invokeMenuItem("File", "Exit") + clickButton(waitForObject(":Save Changes.Do not Save_QPushButton")) waitForCleanShutdown() diff --git a/tests/system/suite_CSUP/tst_CSUP06/test.py b/tests/system/suite_CSUP/tst_CSUP06/test.py index 3ac52088425..7f6afe7af0c 100644 --- a/tests/system/suite_CSUP/tst_CSUP06/test.py +++ b/tests/system/suite_CSUP/tst_CSUP06/test.py @@ -172,8 +172,5 @@ def main(): checkSymbolCompletion(editor, useClang) invokeMenuItem('File', 'Revert "main.cpp" to Saved') clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) - snooze(1) # 'Close "main.cpp"' might still be disabled - # editor must be closed to get the second code model applied on re-opening the file - invokeMenuItem('File', 'Close "main.cpp"') invokeMenuItem("File", "Exit") waitForCleanShutdown() diff --git a/tests/system/suite_editors/tst_memberoperator/test.py b/tests/system/suite_editors/tst_memberoperator/test.py index f7e7ed67375..3c3625b61b5 100644 --- a/tests/system/suite_editors/tst_memberoperator/test.py +++ b/tests/system/suite_editors/tst_memberoperator/test.py @@ -96,7 +96,5 @@ def main(): __verifyLineUnderCursor__(cppwindow, record) invokeMenuItem("File", 'Revert "main.cpp" to Saved') clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) - snooze(1) - invokeMenuItem("File", "Close All") invokeMenuItem("File", "Exit") waitForCleanShutdown() diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py index 0b2331926eb..d5f99f6ea6b 100644 --- a/tests/system/suite_tools/tst_git_local/test.py +++ b/tests/system/suite_tools/tst_git_local/test.py @@ -226,8 +226,6 @@ def main(): waitFor('str(changed.plainText) != "Waiting for data..."', 5000) test.compare(str(changed.plainText), "Retrieving data failed.", "Showing an invalid commit can't succeed but Creator survived.") - - invokeMenuItem("File", "Close All Projects and Editors") invokeMenuItem("File", "Exit") def deleteProject():