Merge remote-tracking branch 'origin/4.12'

Change-Id: Id1c063ae716c3acf5e6201c15663637040aa9a35
This commit is contained in:
Eike Ziller
2020-06-03 12:22:18 +02:00
38 changed files with 238 additions and 76 deletions

79
dist/changes-4.12.2.md vendored Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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"

View File

@@ -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.

View File

@@ -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]
*/

View File

@@ -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.

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt 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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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"

View File

@@ -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

View File

@@ -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}

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
@@ -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}.

View File

@@ -35,7 +35,7 @@
#include <QDebug>
#include <QDateTime>
#include <QOperatingSystemVersion>
#include <QRegExp>
#include <QRegularExpression>
#include <QTimer>
#include <QUrl>
#include <qplatformdefs.h>
@@ -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)

View File

@@ -31,6 +31,7 @@
#include <QDialogButtonBox>
#include <QLabel>
#include <QPlainTextEdit>
#include <QSet>
#include <QVBoxLayout>
namespace Utils {

View File

@@ -29,12 +29,12 @@
#include <utils/pathchooser.h>
#include <utils/pathlisteditor.h>
#include <QDebug>
#include <QSettings>
#include <QActionGroup>
#include <QCheckBox>
#include <QDebug>
#include <QGroupBox>
#include <QLineEdit>
#include <QSettings>
#include <QSpinBox>
#include <QTextEdit>

View File

@@ -71,6 +71,7 @@
#include <memory>
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)

View File

@@ -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()) {

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -8,6 +8,8 @@
<file>wizards/icon@2x.png</file>
<file>wizards/application/CMakeLists.txt</file>
<file>wizards/application/project.qmlproject.tpl</file>
<file>wizards/application/BareMetal/main.cpp.tpl</file>
<file>wizards/application/FreeRTOS/main.cpp.tpl</file>
<file>wizards/application/main.qml.tpl</file>
<file>wizards/application/wizard.json</file>
</qresource>

View File

@@ -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;
}

View File

@@ -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<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescrip
static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir)
{
// Workaround for UL-2390: Instead of "./kits/", walk through "./lib/cmake/Qul/boards/"
QFileInfoList result;
QDirIterator it(dir.toString() + "/lib/cmake/Qul/boards/", {QLatin1String("*.json")},
QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext())
result.append(it.next());
return result;
const QDir kitsDir(dir.toString() + "/kits/", "*.json");
return kitsDir.entryInfoList();
}
static QString freeRTOSEnvVarForPlatform(const QString &platform)

View File

@@ -0,0 +1,14 @@
#include "%{ProjectName}.h"
#include <qul/application.h>
#include <qul/qul.h>
int main()
{
Qul::initPlatform();
Qul::Application app;
static %{ProjectName} item;
app.setRootItem(&item);
app.exec();
return 0;
}

View File

@@ -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)

View File

@@ -0,0 +1,38 @@
#include "%{ProjectName}.h"
#include <qul/application.h>
#include <qul/qul.h>
#include <cstdio>
#include <FreeRTOS.h>
#include <task.h>
#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();
}

View File

@@ -1,4 +1,3 @@
pragma main;
import QtQuick 2.0
Rectangle {

View File

@@ -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}",