diff --git a/dist/changes-4.12.2.md b/dist/changes-4.12.2.md new file mode 100644 index 00000000000..06b3eb6e64e --- /dev/null +++ b/dist/changes-4.12.2.md @@ -0,0 +1,79 @@ +Qt Creator 4.12.2 +================= + +Qt Creator version 4.12.2 contains bug fixes. + +The most important changes are listed in this document. For a complete +list of changes, see the Git log for the Qt Creator sources that +you can check out from the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline origin/v4.12.1..v4.12.2 + +General +------- + +* Fixed line and column support for opening files with Locator + +Editing +------- + +### C++ + +* Fixed persistence of license template setting (QTCREATORBUG-24024) +* Fixed persistence of diagnostics configurations (QTCREATORBUG-23717) + +### QML + +* Fixed crash with QML Preview (QTCREATORBUG-24056) + +Projects +-------- + +### Compilation Database + +* Fixed that Kit's toolchain could change (QTCREATORBUG-24047) + +Analyzer +-------- + +### Clang + +* Fixed issue with Clazy 1.6 (QTCREATORBUG-23585) + +Version Control Systems +----------------------- + +### Git + +* Fixed upstream status for branches with slash + +Platforms +--------- + +### Android + +* Fixed possible crash when Qt is missing in Kit + +### WebAssembly + +* Fixed running applications with Qt 5.15 (QTCREATORBUG-24072) + +### MCU + +* Added support for Qt for MCUs 1.2 (UL-1708, UL-2390, QTCREATORBUG-24063, QTCREATORBUG-24052, + QTCREATORBUG-24079) +* Removed support for Qt for MCUs 1.1 + +Credits for these changes go to: +-------------------------------- +Alessandro Portale +André Pönitz +Christian Kandeler +Christian Stenger +Eike Ziller +Leena Miettinen +Nikolai Kosjar +Orgad Shaneh +Tim Jenssen +Ulf Hermann diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-deploying.qdocinc b/doc/qtcreator/src/cmake/creator-projects-cmake-deploying.qdocinc index a9c53ea4e21..abef5908c8c 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-deploying.qdocinc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-deploying.qdocinc @@ -32,7 +32,7 @@ /*! //! [cmake deploying embedded] - \section1 Deploying CMake Projects to Embedded Linux Devices + \section1 Deploying CMake Projects to Generic Remote Linux Devices \QC cannot directly extract files to be installed from a CMake project. Therefore, a special deploy step is created that installs the project into diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc index 3dd3a9197a3..0a76cddc407 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc @@ -152,6 +152,6 @@ \li \l {Opening Projects} \li \l {Specifying Build Settings} \li \l {Specifying Run Settings} - \li \l {Deploying CMake Projects to Embedded Linux Devices} + \li \l {Deploying CMake Projects to Generic Remote Linux Devices} \endlist */ diff --git a/doc/qtcreator/src/external-resources/external-resources.qdoc b/doc/qtcreator/src/external-resources/external-resources.qdoc index 138f8ca09f6..57b8f5885a8 100644 --- a/doc/qtcreator/src/external-resources/external-resources.qdoc +++ b/doc/qtcreator/src/external-resources/external-resources.qdoc @@ -40,8 +40,8 @@ \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-renesas.html + \title Getting Started on Renesas */ /*! \externalpage https://doc.qt.io/QtForMCUs/qtul-getting-started-on-stm.html diff --git a/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc b/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc index 7eeb4f68206..a7efe0ba1a1 100644 --- a/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc +++ b/doc/qtcreator/src/linux-mobile/creator-deployment-embedded-linux.qdoc @@ -38,11 +38,11 @@ \nextpage creator-deployment-qnx.html \endif - \title Deploying Applications to Embedded Linux Devices + \title Deploying Applications to Generic Remote Linux Devices - You can specify settings for deploying applications to generic Linux devices - in the project .pro file. You can view the settings in the - \uicontrol Projects mode, in \uicontrol {Run Settings}. + You can specify settings for deploying applications to generic remote + Linux devices in the project .pro file. You can view the settings in + the \uicontrol Projects mode, in \uicontrol {Run Settings}. \image qtcreator-embedded-linux-deployment-overview.png "Deploy to device" diff --git a/doc/qtcreator/src/linux-mobile/creator-projects-running-generic-linux.qdocinc b/doc/qtcreator/src/linux-mobile/creator-projects-running-generic-linux.qdocinc index f573a0de795..a744b6e9e98 100644 --- a/doc/qtcreator/src/linux-mobile/creator-projects-running-generic-linux.qdocinc +++ b/doc/qtcreator/src/linux-mobile/creator-projects-running-generic-linux.qdocinc @@ -26,14 +26,14 @@ /*! //! [running on embedded linux] - \section1 Running on Embedded Linux Devices + \section1 Running on Generic Remote Linux Devices To build the application and run it on a device: \list 1 \li Specify a connection to the device. For more information, see - \l{Connecting Embedded Linux Devices}. + \l{Connecting Generic Remote Linux Devices}. \li Click the \uicontrol Run button. diff --git a/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc b/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc index ea34ff83def..5a7edda0f50 100644 --- a/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc +++ b/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-b2qt.qdocinc @@ -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. @@ -24,11 +24,11 @@ ****************************************************************************/ /*! -//! [run settings embedded] +//! [run settings boot2qt] - \section1 Specifying Run Settings for Embedded Devices + \section1 Specifying Run Settings for Boot2Qt Devices - To run and debug an application on an embedded device (commercial only), you + To run and debug an application on a Boot2Qt device (commercial only), you must create connections from the development host to the device and add the device configurations to \l{glossary-buildandrun-kit}{kits}. Select \uicontrol {Manage Kits} to add devices to kits. For more information, see @@ -41,7 +41,7 @@ host and on the device. For more information on the deployment steps, see - \l{Deploying Applications to Embedded Linux Devices}. + \l{Deploying Applications to Generic Remote Linux Devices}. -//! [run settings embedded] +//! [run settings boot2qt] */ diff --git a/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-linux.qdocinc b/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-linux.qdocinc index 1d64706acf0..4cb407f630b 100644 --- a/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-linux.qdocinc +++ b/doc/qtcreator/src/linux-mobile/creator-projects-settings-run-linux.qdocinc @@ -33,7 +33,7 @@ host to the device and add the device configurations to \l{glossary-buildandrun-kit}{kits}. Click \uicontrol {Manage Kits} to add devices to kits. For more information, see - \l {Connecting Embedded Linux Devices}. + \l {Connecting Generic Remote Linux Devices}. When you run the application, \QC copies the files to the connected device. diff --git a/doc/qtcreator/src/linux-mobile/linuxdev.qdoc b/doc/qtcreator/src/linux-mobile/linuxdev.qdoc index da7e6cca083..e726841c0a7 100644 --- a/doc/qtcreator/src/linux-mobile/linuxdev.qdoc +++ b/doc/qtcreator/src/linux-mobile/linuxdev.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. @@ -33,19 +33,20 @@ \nextpage creator-developing-ios.html \endif - \title Connecting Embedded Linux Devices + \title Connecting Generic Remote Linux Devices - You can connect embedded Linux devices to the development PC to run, + You can connect generic Linux devices to the development PC to run, debug, and analyze applications built for them from \QC. If you have a tool chain for building applications for embedded Linux devices installed on the development PC, you can add it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit} with \uicontrol {Embedded Linux} device type to - build applications for and run them on embedded Linux devices. + build applications for and run them on the devices. - To be able to run and debug applications on embedded Linux devices, you must - add devices and select them in the \QC \l{glossary-buildandrun-kit}{kit}. + To be able to run and debug applications on generic remote Linux devices, + you must add devices and select them in the \QC \l{glossary-buildandrun-kit} + {kit}. You use a wizard to create the connections. You can edit the settings later in \uicontrol Tools > \uicontrol Options > \uicontrol Devices > @@ -145,7 +146,7 @@ When you run the project, \QC deploys the application as specified by the deploy steps. By default, \QC copies the application files to the device. - For more information, see \l{Deploying Applications to Embedded Linux Devices}. + For more information, see \l{Deploying Applications to Generic Remote Linux Devices}. \endlist diff --git a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc index 00295d01348..268dfde2b41 100644 --- a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc +++ b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc @@ -61,11 +61,12 @@ \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 The hardware specific requirements vary depending on the hardware platform you are developing for. + \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} + \li \l{Getting Started on Renesas} \endlist \endlist @@ -127,6 +128,9 @@ \section2 Adding MCU Devices + \note This optional step is not necessary if you have already + set up the MCU SDK as outlined in \l{Specifying MCU Settings}. + \QC automatically adds a default MCU device when you select \uicontrol Apply in the \uicontrol MCU tab after configuring the MCU tool chain. @@ -145,6 +149,9 @@ \section2 Adding MCU Kits + \note This optional step is not necessary if you have already + set up the MCU SDK as outlined in \l{Specifying MCU Settings}. + \QC automatically adds kits for building applications and running them on the specified MCU boards when you select \uicontrol Apply in the \uicontrol MCU tab after configuring the MCU tool chain. diff --git a/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc b/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc index 21903f7ad53..f1d40a058d8 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-deployment-overview.qdoc @@ -49,7 +49,7 @@ When you deploy the application to an Android device, \QC copies the application files to the device. In addition, you can determine the Qt libraries to use. - \li \l{Deploying Applications to Embedded Linux Devices} + \li \l{Deploying Applications to Generic Remote Linux Devices} When you deploy the application to a generic Linux-based device, \QC copies the application files to the connected device. You can test diff --git a/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc b/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc index 2451a078047..659a837567f 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-mobile-targets.qdoc @@ -69,7 +69,7 @@ to debug applications on them with GDB or a hardware debugger. \endif - \li \l{Connecting Embedded Linux Devices} + \li \l{Connecting Generic Remote Linux Devices} If you have a tool chain for building applications for embedded Linux devices installed on the development diff --git a/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc b/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc index 7013ee6cea0..ce8f01a5b5e 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc @@ -112,7 +112,7 @@ \endlist - \section2 Developing for Embedded Devices + \section2 Developing for Boot2Qt Devices Either Windows 7 or later or Ubuntu Linux 64-bit 12.04 LTS or later is required to install and use Qt for Device Creation. For more information diff --git a/doc/qtcreator/src/overview/creator-only/creator-target-platforms.qdocinc b/doc/qtcreator/src/overview/creator-only/creator-target-platforms.qdocinc index e54514e1c3b..04c2fd936f7 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-target-platforms.qdocinc +++ b/doc/qtcreator/src/overview/creator-only/creator-target-platforms.qdocinc @@ -35,7 +35,7 @@ \li \l{Connecting Android Devices}{Android} \li \l{Connecting Bare Metal Devices}{Bare Metal} \li Boot2Qt - \li \l{Connecting Embedded Linux Devices}{Generic Remote Linux} + \li \l{Connecting Generic Remote Linux Devices}{Generic Remote Linux} \li \l{Connecting iOS Devices}{iOS} \li \l{Connecting MCUs}{Microcontroller Units (MCU)} (commercial only) \li \l{Connecting QNX Devices}{QNX} diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc index c536c91cddc..1e2960eca0b 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-build-run-tutorial.qdoc @@ -43,7 +43,7 @@ the development environment for Android or iOS. For more information, see \l{Connecting Android Devices} and \l{Connecting iOS Devices}. - To run an example application on an embedded device, you must set up + To run an example application on a Boot2Qt device, you must set up Qt for Device Creation on the development host and create connections between the host and devices. For more information, see the \l{http://doc.qt.io/QtForDeviceCreation/qtee-installation-guide.html} @@ -66,7 +66,7 @@ You can also use tags (3) to filter examples. For instance, enter the \uicontrol Boot2Qt tag (commercial only) in the search field - (4) to list examples that you can run on embedded devices. + (4) to list examples that you can run on Boot2Qt devices. \li To check that the application code can be compiled and linked for a device, click the \uicontrol {Kit Selector} and select a diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-generic.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-generic.qdoc index 4a2c4c42ab0..df454aaa6d1 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-generic.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-generic.qdoc @@ -141,10 +141,11 @@ \section1 Providing Deployment Information - If you want to run your application on an embedded Linux device, you first need to - deploy your executable and possibly other files. \QC does that for you - automatically if you provide the necessary information. This works the same - way as explained for CMake \l {Deploying CMake Projects to Embedded Linux Devices}{here}, + If you want to run your application on a generic remote Linux device, + you first need to deploy your executable and possibly other files. + \QC does that for you automatically if you provide the necessary + information. This works the same way as explained for CMake + \l {Deploying CMake Projects to Generic Remote Linux Devices}{here}, except that you also need to include your application binary in the list. \section1 Creating a Run Configuration diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc index 2591640a6d2..3b564ee2835 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc @@ -84,7 +84,7 @@ \include creator-projects-settings-run-android.qdocinc run settings android \include creator-projects-settings-run-linux.qdocinc run settings linux \include creator-projects-settings-run-qnx.qdocinc run settings qnx - \include linux-mobile/creator-projects-settings-run-b2qt.qdocinc run settings embedded + \include linux-mobile/creator-projects-settings-run-b2qt.qdocinc run settings boot2qt \section1 Selecting the Run Environment diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc index d18817cfe4d..caa3d940820 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-targets.qdoc @@ -52,7 +52,7 @@ \li \l{https://doc.qt.io/QtForDeviceCreation/b2qt-installation-guides.html} {Boot2Qt Device} (commercial only) \li \l{Emulator}{Boot2Qt Emulator Device} (commercial only) - \li \l{Connecting Embedded Linux Devices}{Generic Remote Linux Device} + \li \l{Connecting Generic Remote Linux Devices}{Generic Remote Linux Device} \li \l{Connecting iOS Devices}{iOS Device} \li iOS Simulator \li \l{Connecting MCUs}{MCU Device} (commercial only) diff --git a/doc/qtcreator/src/qnx/creator-deployment-qnx.qdoc b/doc/qtcreator/src/qnx/creator-deployment-qnx.qdoc index 19e1217e63d..232a371e26c 100644 --- a/doc/qtcreator/src/qnx/creator-deployment-qnx.qdoc +++ b/doc/qtcreator/src/qnx/creator-deployment-qnx.qdoc @@ -41,7 +41,7 @@ \title Deploying Applications to QNX Neutrino Devices You can deploy applications to QNX Neutrino devices in the way that is - described in \l{Deploying Applications to Embedded Linux Devices}. + described in \l{Deploying Applications to Generic Remote Linux Devices}. \image qtcreator-qnx-deployment.png "Deploy to device" diff --git a/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc b/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc index e535c04e046..6af72ab2536 100644 --- a/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc +++ b/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc @@ -42,8 +42,9 @@ \section1 Adding a QNX Neutrino Device in \QC - Adding a QNX Neutrino device is very similar to \l{Connecting Embedded - Linux Devices}, except you need to select \uicontrol {QNX Device} in the + Adding a QNX Neutrino device is very similar to + \l{Connecting Generic Remote Linux Devices}, except that + you need to select \uicontrol {QNX Device} in the \uicontrol {Device Configuration} wizard. \section1 Adding Kits for QNX Devices diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index 2b17c2c5dab..021b7052f89 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -196,14 +196,14 @@ \li \l{Deploying to Devices} \list \li \l{Deploying Applications to Android Devices} - \li \l{Deploying Applications to Embedded Linux Devices} + \li \l{Deploying Applications to Generic Remote Linux Devices} \li \l{Deploying Applications to QNX Neutrino Devices} \endlist \li \l{Connecting Devices} \list \li \l{Connecting Android Devices} \li \l{Connecting Bare Metal Devices} - \li \l{Connecting Embedded Linux Devices} + \li \l{Connecting Generic Remote Linux Devices} \li \l{Connecting iOS Devices} \li \l{Connecting MCUs} \li \l{Connecting QNX Devices} diff --git a/doc/qtcreator/src/qtquick/qtquick-live-preview-devices.qdoc b/doc/qtcreator/src/qtquick/qtquick-live-preview-devices.qdoc index 8cf7f9303fd..0bf837ee8cf 100644 --- a/doc/qtcreator/src/qtquick/qtquick-live-preview-devices.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-live-preview-devices.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. @@ -34,7 +34,7 @@ To preview UIs on Android devices, you need to enable USB debugging on them and connect them to your system with a USB cable. \endomit - To preview UIs on embedded devices, you need to connect the devices to your + To preview UIs on Boot2Qt devices, you need to connect the devices to your system with a USB cable, or a wired or wireless connection, depending on the device, and configure connections to them. The necessary kits have been predefined and you only need to enable them for your current project. @@ -79,9 +79,9 @@ device. \endomit - \section2 Previewing on Embedded Devices + \section2 Previewing on Boot2Qt Devices - You can preview UIs on embedded devices that are supported by + You can preview UIs on Boot2Qt devices that are supported by \l{Qt for Device Creation}. For a list of supported devices, see \l{https://doc.qt.io/QtForDeviceCreation/qtee-supported-platforms.html#reference-target-devices} {Reference Target Devices}. diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index 307f3af06d3..e35fd1e2674 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -330,10 +330,10 @@ QString FilePath::shortNativePath() const QString FileUtils::fileSystemFriendlyName(const QString &name) { QString result = name; - result.replace(QRegExp(QLatin1String("\\W")), QLatin1String("_")); - result.replace(QRegExp(QLatin1String("_+")), QLatin1String("_")); // compact _ - result.remove(QRegExp(QLatin1String("^_*"))); // remove leading _ - result.remove(QRegExp(QLatin1String("_+$"))); // remove trailing _ + result.replace(QRegularExpression(QLatin1String("\\W")), QLatin1String("_")); + result.replace(QRegularExpression(QLatin1String("_+")), QLatin1String("_")); // compact _ + result.remove(QRegularExpression(QLatin1String("^_*"))); // remove leading _ + result.remove(QRegularExpression(QLatin1String("_+$"))); // remove trailing _ if (result.isEmpty()) result = QLatin1String("unknown"); return result; @@ -341,8 +341,8 @@ QString FileUtils::fileSystemFriendlyName(const QString &name) int FileUtils::indexOfQmakeUnfriendly(const QString &name, int startpos) { - static QRegExp checkRegExp(QLatin1String("[^a-zA-Z0-9_.-]")); - return checkRegExp.indexIn(name, startpos); + static const QRegularExpression checkRegExp(QLatin1String("[^a-zA-Z0-9_.-]")); + return checkRegExp.match(name, startpos).capturedStart(); } QString FileUtils::qmakeFriendlyName(const QString &name) diff --git a/src/libs/utils/namevaluesdialog.cpp b/src/libs/utils/namevaluesdialog.cpp index 2b78dc76610..54c7a4577ea 100644 --- a/src/libs/utils/namevaluesdialog.cpp +++ b/src/libs/utils/namevaluesdialog.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include namespace Utils { diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp index 87a785f6db7..beec2d33089 100644 --- a/src/libs/utils/savedaction.cpp +++ b/src/libs/utils/savedaction.cpp @@ -29,12 +29,12 @@ #include #include -#include -#include - +#include #include +#include #include #include +#include #include #include diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp index 2d8051c8d5a..e74b7a0b5c6 100644 --- a/src/plugins/android/androidbuildapkstep.cpp +++ b/src/plugins/android/androidbuildapkstep.cpp @@ -71,6 +71,7 @@ #include using namespace ProjectExplorer; +using namespace QtSupport; using namespace Utils; using namespace Android::Internal; @@ -519,14 +520,17 @@ void AndroidBuildApkStep::setBuildTargetSdk(const QString &sdk) QVariant AndroidBuildApkStep::data(Core::Id id) const { - QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(target()->kit()); - if (id == Constants::AndroidNdkPlatform) { - return AndroidConfigurations::currentConfig() - .bestNdkPlatformMatch(AndroidManager::minimumSDK(target()), qtVersion).mid(8); + if (auto qtVersion = QtKitAspect::qtVersion(target()->kit())) + return AndroidConfigurations::currentConfig() + .bestNdkPlatformMatch(AndroidManager::minimumSDK(target()), qtVersion).mid(8); + return {}; + } + if (id == Constants::NdkLocation) { + if (auto qtVersion = QtKitAspect::qtVersion(target()->kit())) + return QVariant::fromValue(AndroidConfigurations::currentConfig().ndkLocation(qtVersion)); + return {}; } - if (id == Constants::NdkLocation) - return QVariant::fromValue(AndroidConfigurations::currentConfig().ndkLocation(qtVersion)); if (id == Constants::SdkLocation) return QVariant::fromValue(AndroidConfigurations::currentConfig().sdkLocation()); if (id == Constants::AndroidABIs) diff --git a/src/plugins/clangtools/clangtoolssettings.cpp b/src/plugins/clangtools/clangtoolssettings.cpp index cbd15f512fc..ad704728ac1 100644 --- a/src/plugins/clangtools/clangtoolssettings.cpp +++ b/src/plugins/clangtools/clangtoolssettings.cpp @@ -118,7 +118,8 @@ ClangDiagnosticConfigs importDiagnosticConfigsFromCodeModel() ClangDiagnosticConfigs clangOnlyConfigs; std::tie(tidyClazyConfigs, clangOnlyConfigs) = Utils::partition(configs, [](const ClangDiagnosticConfig &config) { - return config.isClazyEnabled() || config.isClangTidyEnabled(); + return !config.clazyChecks().isEmpty() + || (!config.clangTidyChecks().isEmpty() && config.clangTidyChecks() != "-*"); }); if (!tidyClazyConfigs.isEmpty()) { diff --git a/src/plugins/cpptools/clangdiagnosticconfig.cpp b/src/plugins/cpptools/clangdiagnosticconfig.cpp index 7b318a61f9a..a9427e4e74c 100644 --- a/src/plugins/cpptools/clangdiagnosticconfig.cpp +++ b/src/plugins/cpptools/clangdiagnosticconfig.cpp @@ -166,6 +166,7 @@ static const char diagnosticConfigsArrayKey[] = "ClangDiagnosticConfigs"; static const char diagnosticConfigIdKey[] = "id"; static const char diagnosticConfigDisplayNameKey[] = "displayName"; static const char diagnosticConfigWarningsKey[] = "diagnosticOptions"; +static const char useBuildSystemFlagsKey[] = "useBuildSystemFlags"; static const char diagnosticConfigsTidyChecksKey[] = "clangTidyChecks"; static const char diagnosticConfigsTidyModeKey[] = "clangTidyMode"; static const char diagnosticConfigsClazyModeKey[] = "clazyMode"; @@ -180,6 +181,7 @@ void diagnosticConfigsToSettings(QSettings *s, const ClangDiagnosticConfigs &con s->setValue(diagnosticConfigIdKey, config.id().toSetting()); s->setValue(diagnosticConfigDisplayNameKey, config.displayName()); s->setValue(diagnosticConfigWarningsKey, config.clangOptions()); + s->setValue(useBuildSystemFlagsKey, config.useBuildSystemWarnings()); s->setValue(diagnosticConfigsTidyModeKey, int(config.clangTidyMode())); s->setValue(diagnosticConfigsTidyChecksKey, config.clangTidyChecks()); s->setValue(diagnosticConfigsClazyModeKey, int(config.clazyMode())); @@ -200,6 +202,7 @@ ClangDiagnosticConfigs diagnosticConfigsFromSettings(QSettings *s) config.setId(Core::Id::fromSetting(s->value(diagnosticConfigIdKey))); config.setDisplayName(s->value(diagnosticConfigDisplayNameKey).toString()); config.setClangOptions(s->value(diagnosticConfigWarningsKey).toStringList()); + config.setUseBuildSystemWarnings(s->value(useBuildSystemFlagsKey, false).toBool()); const int tidyModeValue = s->value(diagnosticConfigsTidyModeKey).toInt(); if (tidyModeValue == 0) { // Convert from settings of <= Qt Creator 4.10 config.setClangTidyMode(ClangDiagnosticConfig::TidyMode::UseCustomChecks); diff --git a/src/plugins/cpptools/cppcodemodelsettings.cpp b/src/plugins/cpptools/cppcodemodelsettings.cpp index 8b8874c9580..ee90d178b86 100644 --- a/src/plugins/cpptools/cppcodemodelsettings.cpp +++ b/src/plugins/cpptools/cppcodemodelsettings.cpp @@ -80,6 +80,8 @@ static ClangDiagnosticConfigs removedBuiltinConfigs() "Pedantic checks")); config.setIsReadOnly(true); config.setClangOptions(QStringList{QStringLiteral("-Wpedantic")}); + config.setClangTidyMode(ClangDiagnosticConfig::TidyMode::UseCustomChecks); + config.setClazyMode(ClangDiagnosticConfig::ClazyMode::UseCustomChecks); configs << config; // Everything with exceptions @@ -104,6 +106,8 @@ static ClangDiagnosticConfigs removedBuiltinConfigs() QStringLiteral("-Wno-missing-prototypes"), // Not optimal for C projects. QStringLiteral("-Wno-used-but-marked-unused"), // e.g. QTest::qWait }); + config.setClangTidyMode(ClangDiagnosticConfig::TidyMode::UseCustomChecks); + config.setClazyMode(ClangDiagnosticConfig::ClazyMode::UseCustomChecks); configs << config; return configs; diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp index 37a00673b3e..d98febf6972 100644 --- a/src/plugins/cpptools/cpptoolsreuse.cpp +++ b/src/plugins/cpptools/cpptoolsreuse.cpp @@ -356,6 +356,8 @@ static void addBuiltinConfigs(ClangDiagnosticConfigsModel &model) "-Wall", "-Wextra", }); + config.setClazyMode(ClangDiagnosticConfig::ClazyMode::UseCustomChecks); + config.setClangTidyMode(ClangDiagnosticConfig::TidyMode::UseCustomChecks); model.appendOrUpdate(config); // Warning flags from build system @@ -364,6 +366,8 @@ static void addBuiltinConfigs(ClangDiagnosticConfigsModel &model) config.setDisplayName(QCoreApplication::translate("ClangDiagnosticConfigsModel", "Build-system warnings")); config.setIsReadOnly(true); + config.setClazyMode(ClangDiagnosticConfig::ClazyMode::UseCustomChecks); + config.setClangTidyMode(ClangDiagnosticConfig::TidyMode::UseCustomChecks); config.setUseBuildSystemWarnings(true); model.appendOrUpdate(config); } diff --git a/src/plugins/mcusupport/mcusupport.qrc b/src/plugins/mcusupport/mcusupport.qrc index b45fb8ccc31..59ff76770b0 100644 --- a/src/plugins/mcusupport/mcusupport.qrc +++ b/src/plugins/mcusupport/mcusupport.qrc @@ -8,6 +8,8 @@ wizards/icon@2x.png wizards/application/CMakeLists.txt wizards/application/project.qmlproject.tpl + wizards/application/BareMetal/main.cpp.tpl + wizards/application/FreeRTOS/main.cpp.tpl wizards/application/main.qml.tpl wizards/application/wizard.json diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index ff7304de6d0..a15f63acbc1 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -61,7 +61,7 @@ namespace McuSupport { namespace Internal { -static const int KIT_VERSION = 4; // Bumps up whenever details in Kit creation change +static const int KIT_VERSION = 5; // Bumps up whenever details in Kit creation change static QString packagePathFromSettings(const QString &settingsKey, const QString &defaultPath = {}) { @@ -441,7 +441,7 @@ void McuSupportOptions::deletePackagesAndTargets() const QVersionNumber &McuSupportOptions::supportedQulVersion() { - static const QVersionNumber v({1, 1}); + static const QVersionNumber v({1, 2}); return v; } diff --git a/src/plugins/mcusupport/mcusupportsdk.cpp b/src/plugins/mcusupport/mcusupportsdk.cpp index 7586daf92c0..67fd09e26d3 100644 --- a/src/plugins/mcusupport/mcusupportsdk.cpp +++ b/src/plugins/mcusupport/mcusupportsdk.cpp @@ -99,8 +99,6 @@ static McuToolChainPackage *createArmGccPackage() Utils::HostOsInfo::withExecutableSuffix("bin/arm-none-eabi-g++"), "GNUArmEmbeddedToolchain", McuToolChainPackage::TypeArmGcc); - result->setDownloadUrl( - "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads"); result->setEnvironmentVariableName(envVar); return result; } @@ -294,13 +292,8 @@ static QVector targetsFromDescriptions(const QList +#include + +int main() +{ + Qul::initPlatform(); + Qul::Application app; + static %{ProjectName} item; + app.setRootItem(&item); + app.exec(); + return 0; +} diff --git a/src/plugins/mcusupport/wizards/application/CMakeLists.txt b/src/plugins/mcusupport/wizards/application/CMakeLists.txt index ff5871b9b52..3ad30d99cab 100644 --- a/src/plugins/mcusupport/wizards/application/CMakeLists.txt +++ b/src/plugins/mcusupport/wizards/application/CMakeLists.txt @@ -4,7 +4,7 @@ project(%{ProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM) find_package(Qul) -add_executable(%{ProjectName}) +add_executable(%{ProjectName} ${OS}/main.cpp) qul_target_qml_sources(%{ProjectName} %{MainQmlFile}) target_link_libraries(%{ProjectName} Qul::QuickUltralite) diff --git a/src/plugins/mcusupport/wizards/application/FreeRTOS/main.cpp.tpl b/src/plugins/mcusupport/wizards/application/FreeRTOS/main.cpp.tpl new file mode 100644 index 00000000000..43ca2e706b8 --- /dev/null +++ b/src/plugins/mcusupport/wizards/application/FreeRTOS/main.cpp.tpl @@ -0,0 +1,38 @@ +#include "%{ProjectName}.h" + +#include +#include + +#include +#include +#include + +#ifndef QUL_STACK_SIZE +#error QUL_STACK_SIZE must be defined. +#endif + +static void Qul_Thread(void *argument); + +int main() +{ + Qul::initPlatform(); + + if (xTaskCreate(Qul_Thread, "QulExec", QUL_STACK_SIZE, 0, 4, 0) != pdPASS) { + std::printf("Task creation failed!.\\r\\n"); + configASSERT(false); + } + + vTaskStartScheduler(); + + // Should not reach this point + configASSERT(false); + return 0; +} + +static void Qul_Thread(void *argument) +{ + Qul::Application app; + static %{ProjectName} item; + app.setRootItem(&item); + app.exec(); +} diff --git a/src/plugins/mcusupport/wizards/application/main.qml.tpl b/src/plugins/mcusupport/wizards/application/main.qml.tpl index 595c561f746..8c05a48f660 100644 --- a/src/plugins/mcusupport/wizards/application/main.qml.tpl +++ b/src/plugins/mcusupport/wizards/application/main.qml.tpl @@ -1,4 +1,3 @@ -pragma main; import QtQuick 2.0 Rectangle { diff --git a/src/plugins/mcusupport/wizards/application/wizard.json b/src/plugins/mcusupport/wizards/application/wizard.json index 1c598507e13..b458bb010a8 100644 --- a/src/plugins/mcusupport/wizards/application/wizard.json +++ b/src/plugins/mcusupport/wizards/application/wizard.json @@ -52,6 +52,16 @@ "target": "%{ProjectDirectory}/%{ProjectName}.qmlproject", "openInEditor": false }, + { + "source": "BareMetal/main.cpp.tpl", + "target": "%{ProjectDirectory}/BareMetal/main.cpp", + "openInEditor": false + }, + { + "source": "FreeRTOS/main.cpp.tpl", + "target": "%{ProjectDirectory}/FreeRTOS/main.cpp", + "openInEditor": false + }, { "source": "main.qml.tpl", "target": "%{ProjectDirectory}/%{MainQmlFile}",