forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.12' into 4.13
Conflicts: share/qtcreator/debugger/lldbbridge.py Change-Id: Ia444f6424fb35b9a539e157afcee868161535272
This commit is contained in:
51
dist/changes-4.12.4.md
vendored
Normal file
51
dist/changes-4.12.4.md
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
Qt Creator 4.12.4
|
||||||
|
=================
|
||||||
|
|
||||||
|
Qt Creator version 4.12.4 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.3..v4.12.4
|
||||||
|
|
||||||
|
Editing
|
||||||
|
-------
|
||||||
|
|
||||||
|
* Fixed crash when searching in binary files (QTCREATORBUG-21473, QTCREATORBUG-23978)
|
||||||
|
|
||||||
|
### QML
|
||||||
|
|
||||||
|
* Fixed completion of signals from singletons (QTCREATORBUG-24124)
|
||||||
|
* Fixed import scanning after code model reset (QTCREATORBUG-24082)
|
||||||
|
|
||||||
|
Projects
|
||||||
|
--------
|
||||||
|
|
||||||
|
### CMake
|
||||||
|
|
||||||
|
* Fixed search for `ninja` when it is installed with the online installer (QTCREATORBUG-24082)
|
||||||
|
|
||||||
|
Platforms
|
||||||
|
---------
|
||||||
|
|
||||||
|
### iOS
|
||||||
|
|
||||||
|
* Fixed C++ debugging on devices (QTCREATORBUG-23995)
|
||||||
|
|
||||||
|
### MCU
|
||||||
|
|
||||||
|
* Adapted to changes in Qt for MCU 1.3
|
||||||
|
|
||||||
|
Credits for these changes go to:
|
||||||
|
--------------------------------
|
||||||
|
Alessandro Portale
|
||||||
|
André Pönitz
|
||||||
|
Christian Kamm
|
||||||
|
Christian Stenger
|
||||||
|
Eike Ziller
|
||||||
|
Fawzi Mohamed
|
||||||
|
Friedemann Kleint
|
||||||
|
Robert Löhning
|
||||||
|
Venugopal Shivashankar
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 11 KiB |
@@ -49,9 +49,6 @@
|
|||||||
For a list of Qt for MCU reference implementations, see the
|
For a list of Qt for MCU reference implementations, see the
|
||||||
\l{Qt for MCUs - Supported Target Platforms}{Qt for MCUs} documentation.
|
\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 a debug server provider for debugging on MCUs.
|
|
||||||
|
|
||||||
\section1 Requirements
|
\section1 Requirements
|
||||||
|
|
||||||
To use \QC to develop QML applications for MCUs, you need the following:
|
To use \QC to develop QML applications for MCUs, you need the following:
|
||||||
@@ -61,33 +58,40 @@
|
|||||||
\li The Bare Metal plugin
|
\li The Bare Metal plugin
|
||||||
\li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm}
|
\li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm}
|
||||||
{GNU ARM Embedded Toolchain}
|
{GNU ARM Embedded Toolchain}
|
||||||
\li The hardware-specific requirements vary depending on the hardware platform you are developing for.
|
\endlist
|
||||||
|
|
||||||
|
The hardware-specific requirements vary depending on the hardware platform you are developing for.
|
||||||
For more information see:
|
For more information see:
|
||||||
\list
|
\list
|
||||||
\li \l{Getting Started on NXP}
|
\li \l{Getting Started on NXP}
|
||||||
\li \l{Getting Started on STM}
|
\li \l{Getting Started on STM}
|
||||||
\li \l{Getting Started on Renesas}
|
\li \l{Getting Started on Renesas}
|
||||||
\endlist
|
\endlist
|
||||||
\endlist
|
|
||||||
|
|
||||||
\section1 Setting Up the Development Environment
|
\section1 Setting Up the Development Environment
|
||||||
|
|
||||||
You must download and install the required software and create connections
|
You must download and install the required software and create connections
|
||||||
between \QC and MCUs. For more information, see \l{Getting Started on Windows}.
|
between \QC and MCUs. The following subsections guide you through the
|
||||||
|
setup process.
|
||||||
|
|
||||||
\section2 Enabling Bare Metal and MCU Plugins
|
\section2 MCU and Bare Metal Plugins
|
||||||
|
|
||||||
To be able to develop for MCUs, you must enable the Bare Metal and MCU
|
To be able to develop applications for MCUs, you need the MCU plugin at least.
|
||||||
plugins:
|
This plugin is enabled automatically by the installer when you install the
|
||||||
|
Qt for MCUs SDK.
|
||||||
|
|
||||||
|
The Bare Metal plugin is optional unless you want to configure the
|
||||||
|
debug server provider settings explicitly. For more information
|
||||||
|
see \l{Connecting Bare Metal Devices}.
|
||||||
|
|
||||||
|
To explicitly disable or enable any of these plugins, follow these
|
||||||
|
instructions:
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol Help > \uicontrol {About Plugins} >
|
\li Select \uicontrol Help > \uicontrol {About Plugins} >
|
||||||
\uicontrol {Device Support} > \uicontrol {Bare Metal} and
|
\uicontrol {Device Support} > \uicontrol {Bare Metal} and
|
||||||
\uicontrol {MCU Support} to enable the Bare Metal and MCU
|
\uicontrol {MCU Support} to enable the Bare Metal and MCU
|
||||||
plugins.
|
plugins.
|
||||||
\li Select \uicontrol {Restart Now} to restart \QC and load the plugins.
|
\li Select \uicontrol {Restart Now} to restart \QC and load the plugins.
|
||||||
\li Create connections for debugging on the MCU board, as described in
|
|
||||||
\l{Connecting Bare Metal Devices}.
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Specifying MCU Settings
|
\section2 Specifying MCU Settings
|
||||||
@@ -103,27 +107,30 @@
|
|||||||
to the directory where you installed Qt for MCUs SDK.
|
to the directory where you installed Qt for MCUs SDK.
|
||||||
\li In the \uicontrol {Targets supported by the Qt for MCUs SDK}
|
\li In the \uicontrol {Targets supported by the Qt for MCUs SDK}
|
||||||
field, select your MCU board.
|
field, select your MCU board.
|
||||||
\li In the \uicontrol {GNU ARM Embedded Toolchain} field,
|
\li In the \uicontrol Requirements section, ensure that the
|
||||||
specify the path to the directory where you installed the
|
platform-specific requirements are met. This varies depending
|
||||||
tool chain.
|
on the target chosen:
|
||||||
\li For STM32 boards:
|
|
||||||
\list
|
\list
|
||||||
\li In the \uicontrol {STM32Cube SDK} field, specify the
|
\li For STM32 targets:
|
||||||
path to the directory where you installed the SDK.
|
|
||||||
\li In the \uicontrol {STM32Cube Programmer} field,
|
|
||||||
specify the path to the directory where you
|
|
||||||
installed the tool.
|
|
||||||
\endlist
|
|
||||||
\li For NXP boards:
|
|
||||||
\list
|
\list
|
||||||
\li In the \uicontrol {NXP EVKB-IMXRT 1050 SDK} field,
|
\li The \uicontrol {GNU ARM Embedded Toolchain} path.
|
||||||
specify the path to the directory where you
|
\li The \uicontrol {STM32CubeProgrammer} install path.
|
||||||
installed the SDK.
|
|
||||||
\li In the \uicontrol {SEGGER JLink} field, specify the
|
|
||||||
path to the directory where you installed the tool.
|
|
||||||
\endlist
|
\endlist
|
||||||
\li Select \uicontrol Apply to save the settings and to generate
|
\li For NXP targets:
|
||||||
a MCU device and kit.
|
\list
|
||||||
|
\li The \uicontrol {GNU ARM Embedded Toolchain} path.
|
||||||
|
\li The \uicontrol {MCUXpresso IDE} install path.
|
||||||
|
\endlist
|
||||||
|
\li For Renesas targets:
|
||||||
|
\list
|
||||||
|
\li The \uicontrol {Green Hills Compiler} path.
|
||||||
|
\li The \uicontrol {Renesas Graphics Library} path.
|
||||||
|
\endlist
|
||||||
|
\endlist
|
||||||
|
\li Select \uicontrol{Create Kit} to create a kit. If you have
|
||||||
|
an older kit for the selected target, remove it first using
|
||||||
|
\uicontrol{Remove Kit}.
|
||||||
|
\li Select \uicontrol Apply to save the settings.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Adding MCU Devices
|
\section2 Adding MCU Devices
|
||||||
|
|||||||
@@ -963,7 +963,11 @@ class Dumper(DumperBase):
|
|||||||
|
|
||||||
elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
||||||
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
||||||
|
if self.platform_ == 'remote-ios':
|
||||||
|
self.process = self.target.ConnectRemote(
|
||||||
|
self.debugger.GetListener(),
|
||||||
|
self.remoteChannel_, None, error)
|
||||||
|
else:
|
||||||
f = lldb.SBFileSpec()
|
f = lldb.SBFileSpec()
|
||||||
f.SetFilename(self.executable_)
|
f.SetFilename(self.executable_)
|
||||||
|
|
||||||
|
|||||||
@@ -1622,10 +1622,15 @@ void ModelManagerInterface::resetCodeModel()
|
|||||||
// reset the snapshot
|
// reset the snapshot
|
||||||
m_validSnapshot = Snapshot();
|
m_validSnapshot = Snapshot();
|
||||||
m_newestSnapshot = Snapshot();
|
m_newestSnapshot = Snapshot();
|
||||||
|
m_scannedPaths.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// start a reparse thread
|
// start a reparse thread
|
||||||
updateSourceFiles(documents, false);
|
updateSourceFiles(documents, false);
|
||||||
|
|
||||||
|
// rescan import directories
|
||||||
|
m_shouldScanImports = true;
|
||||||
|
updateImportPaths();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlJS
|
} // namespace QmlJS
|
||||||
|
|||||||
@@ -77,8 +77,11 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
|||||||
environment.set("ICECC", "no");
|
environment.set("ICECC", "no");
|
||||||
|
|
||||||
CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings();
|
CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||||
if (!settings->ninjaPath().isEmpty())
|
if (!settings->ninjaPath().isEmpty()) {
|
||||||
environment.appendOrSetPath(settings->ninjaPath().toString());
|
const Utils::FilePath setting = settings->ninjaPath();
|
||||||
|
const Utils::FilePath path = setting.toFileInfo().isFile() ? setting.parentDir() : setting;
|
||||||
|
environment.appendOrSetPath(path.toString());
|
||||||
|
}
|
||||||
|
|
||||||
cmakeToolId = CMakeKitAspect::cmakeToolId(k);
|
cmakeToolId = CMakeKitAspect::cmakeToolId(k);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: BlackBerry (qt@blackberry.com)
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
**
|
**
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
namespace McuSupport {
|
namespace McuSupport {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
static const int KIT_VERSION = 5; // Bumps up whenever details in Kit creation change
|
static const int KIT_VERSION = 6; // Bumps up whenever details in Kit creation change
|
||||||
|
|
||||||
static QString packagePathFromSettings(const QString &settingsKey,
|
static QString packagePathFromSettings(const QString &settingsKey,
|
||||||
QSettings::Scope scope = QSettings::UserScope,
|
QSettings::Scope scope = QSettings::UserScope,
|
||||||
@@ -95,6 +95,11 @@ QString McuPackage::label() const
|
|||||||
return m_label;
|
return m_label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString McuPackage::defaultPath() const
|
||||||
|
{
|
||||||
|
return m_defaultPath;
|
||||||
|
}
|
||||||
|
|
||||||
QString McuPackage::detectionPath() const
|
QString McuPackage::detectionPath() const
|
||||||
{
|
{
|
||||||
return m_detectionPath;
|
return m_detectionPath;
|
||||||
@@ -331,10 +336,12 @@ QVariant McuToolChainPackage::debuggerId() const
|
|||||||
return debuggerId;
|
return debuggerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
McuTarget::McuTarget(const QString &vendor, const QString &platform, OS os,
|
McuTarget::McuTarget(const QVersionNumber &qulVersion, const QString &vendor,
|
||||||
|
const QString &platform, OS os,
|
||||||
const QVector<McuPackage *> &packages,
|
const QVector<McuPackage *> &packages,
|
||||||
const McuToolChainPackage *toolChainPackage)
|
const McuToolChainPackage *toolChainPackage)
|
||||||
: m_vendor(vendor)
|
: m_qulVersion(qulVersion)
|
||||||
|
, m_vendor(vendor)
|
||||||
, m_qulPlatform(platform)
|
, m_qulPlatform(platform)
|
||||||
, m_os(os)
|
, m_os(os)
|
||||||
, m_packages(packages)
|
, m_packages(packages)
|
||||||
@@ -374,6 +381,11 @@ bool McuTarget::isValid() const
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QVersionNumber McuTarget::qulVersion() const
|
||||||
|
{
|
||||||
|
return m_qulVersion;
|
||||||
|
}
|
||||||
|
|
||||||
int McuTarget::colorDepth() const
|
int McuTarget::colorDepth() const
|
||||||
{
|
{
|
||||||
return m_colorDepth;
|
return m_colorDepth;
|
||||||
@@ -450,9 +462,9 @@ void McuSupportOptions::deletePackagesAndTargets()
|
|||||||
mcuTargets.clear();
|
mcuTargets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QVersionNumber &McuSupportOptions::supportedQulVersion()
|
const QVersionNumber &McuSupportOptions::minimalQulVersion()
|
||||||
{
|
{
|
||||||
static const QVersionNumber v({1, 2});
|
static const QVersionNumber v({1, 3});
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -493,7 +505,7 @@ static void setKitProperties(const QString &kitName, ProjectExplorer::Kit *k,
|
|||||||
k->setValue(KIT_MCUTARGET_VENDOR_KEY, mcuTarget->vendor());
|
k->setValue(KIT_MCUTARGET_VENDOR_KEY, mcuTarget->vendor());
|
||||||
k->setValue(KIT_MCUTARGET_MODEL_KEY, mcuTarget->qulPlatform());
|
k->setValue(KIT_MCUTARGET_MODEL_KEY, mcuTarget->qulPlatform());
|
||||||
k->setValue(KIT_MCUTARGET_COLORDEPTH_KEY, mcuTarget->colorDepth());
|
k->setValue(KIT_MCUTARGET_COLORDEPTH_KEY, mcuTarget->colorDepth());
|
||||||
k->setValue(KIT_MCUTARGET_SDKVERSION_KEY, McuSupportOptions::supportedQulVersion().toString());
|
k->setValue(KIT_MCUTARGET_SDKVERSION_KEY, mcuTarget->qulVersion().toString());
|
||||||
k->setValue(KIT_MCUTARGET_KITVERSION_KEY, KIT_VERSION);
|
k->setValue(KIT_MCUTARGET_KITVERSION_KEY, KIT_VERSION);
|
||||||
k->setValue(KIT_MCUTARGET_OS_KEY, static_cast<int>(mcuTarget->os()));
|
k->setValue(KIT_MCUTARGET_OS_KEY, static_cast<int>(mcuTarget->os()));
|
||||||
k->setAutoDetected(true);
|
k->setAutoDetected(true);
|
||||||
@@ -626,7 +638,7 @@ QString McuSupportOptions::kitName(const McuTarget *mcuTarget)
|
|||||||
? "Desktop"
|
? "Desktop"
|
||||||
: mcuTarget->qulPlatform();
|
: mcuTarget->qulPlatform();
|
||||||
return QString::fromLatin1("Qt for MCUs %1 - %2%3%4")
|
return QString::fromLatin1("Qt for MCUs %1 - %2%3%4")
|
||||||
.arg(supportedQulVersion().toString(), targetName, os, colorDepth);
|
.arg(mcuTarget->qulVersion().toString(), targetName, os, colorDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTarget)
|
QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTarget)
|
||||||
@@ -636,8 +648,6 @@ QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *m
|
|||||||
return Utils::filtered(KitManager::kits(), [mcuTarget](Kit *kit) {
|
return Utils::filtered(KitManager::kits(), [mcuTarget](Kit *kit) {
|
||||||
return kit->isAutoDetected()
|
return kit->isAutoDetected()
|
||||||
&& kit->value(KIT_MCUTARGET_KITVERSION_KEY) == KIT_VERSION
|
&& kit->value(KIT_MCUTARGET_KITVERSION_KEY) == KIT_VERSION
|
||||||
&& kit->value(KIT_MCUTARGET_SDKVERSION_KEY) ==
|
|
||||||
McuSupportOptions::supportedQulVersion().toString()
|
|
||||||
&& (!mcuTarget || (
|
&& (!mcuTarget || (
|
||||||
kit->value(KIT_MCUTARGET_VENDOR_KEY) == mcuTarget->vendor()
|
kit->value(KIT_MCUTARGET_VENDOR_KEY) == mcuTarget->vendor()
|
||||||
&& kit->value(KIT_MCUTARGET_MODEL_KEY) == mcuTarget->qulPlatform()
|
&& kit->value(KIT_MCUTARGET_MODEL_KEY) == mcuTarget->qulPlatform()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: BlackBerry (qt@blackberry.com)
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
**
|
**
|
||||||
@@ -64,6 +64,7 @@ public:
|
|||||||
|
|
||||||
QString path() const;
|
QString path() const;
|
||||||
QString label() const;
|
QString label() const;
|
||||||
|
QString defaultPath() const;
|
||||||
QString detectionPath() const;
|
QString detectionPath() const;
|
||||||
Status status() const;
|
Status status() const;
|
||||||
void setDownloadUrl(const QString &url);
|
void setDownloadUrl(const QString &url);
|
||||||
@@ -135,9 +136,11 @@ public:
|
|||||||
FreeRTOS
|
FreeRTOS
|
||||||
};
|
};
|
||||||
|
|
||||||
McuTarget(const QString &vendor, const QString &platform, OS os,
|
McuTarget(const QVersionNumber &qulVersion, const QString &vendor, const QString &platform,
|
||||||
const QVector<McuPackage *> &packages, const McuToolChainPackage *toolChainPackage);
|
OS os, const QVector<McuPackage *> &packages,
|
||||||
|
const McuToolChainPackage *toolChainPackage);
|
||||||
|
|
||||||
|
QVersionNumber qulVersion() const;
|
||||||
QString vendor() const;
|
QString vendor() const;
|
||||||
QVector<McuPackage *> packages() const;
|
QVector<McuPackage *> packages() const;
|
||||||
const McuToolChainPackage *toolChainPackage() const;
|
const McuToolChainPackage *toolChainPackage() const;
|
||||||
@@ -148,6 +151,7 @@ public:
|
|||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
const QVersionNumber m_qulVersion;
|
||||||
const QString m_vendor;
|
const QString m_vendor;
|
||||||
const QString m_qulPlatform;
|
const QString m_qulPlatform;
|
||||||
const OS m_os = OS::BareMetal;
|
const OS m_os = OS::BareMetal;
|
||||||
@@ -181,7 +185,7 @@ public:
|
|||||||
static void registerQchFiles();
|
static void registerQchFiles();
|
||||||
static void registerExamples();
|
static void registerExamples();
|
||||||
|
|
||||||
static const QVersionNumber &supportedQulVersion();
|
static const QVersionNumber &minimalQulVersion();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void deletePackagesAndTargets();
|
void deletePackagesAndTargets();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: BlackBerry (qt@blackberry.com)
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
**
|
**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: BlackBerry (qt@blackberry.com)
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
**
|
**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: BlackBerry (qt@blackberry.com)
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
**
|
**
|
||||||
@@ -59,8 +59,8 @@ static QString findInProgramFiles(const QString &folder)
|
|||||||
McuPackage *createQtForMCUsPackage()
|
McuPackage *createQtForMCUsPackage()
|
||||||
{
|
{
|
||||||
auto result = new McuPackage(
|
auto result = new McuPackage(
|
||||||
McuPackage::tr("Qt for MCUs %1 SDK").arg(
|
McuPackage::tr("Qt for MCUs %1+ SDK").arg(
|
||||||
McuSupportOptions::supportedQulVersion().toString()),
|
McuSupportOptions::minimalQulVersion().toString()),
|
||||||
QDir::homePath(),
|
QDir::homePath(),
|
||||||
Utils::HostOsInfo::withExecutableSuffix("bin/qmltocpp"),
|
Utils::HostOsInfo::withExecutableSuffix("bin/qmltocpp"),
|
||||||
Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK);
|
Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK);
|
||||||
@@ -202,14 +202,36 @@ static McuPackage *createMcuXpressoIdePackage()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static McuPackage *createFreeRTOSSourcesPackage(const QString &envVar)
|
static McuPackage *createBoardSdkPackage(const QString &envVar)
|
||||||
{
|
{
|
||||||
const QString envVarPrefix = envVar.chopped(strlen("_FREERTOS_DIR"));
|
const QString envVarPrefix = envVar.chopped(strlen("_SDK_PATH"));
|
||||||
|
|
||||||
const QString defaultPath =
|
const QString defaultPath =
|
||||||
qEnvironmentVariableIsSet(envVar.toLatin1()) ?
|
qEnvironmentVariableIsSet(envVar.toLatin1()) ?
|
||||||
qEnvironmentVariable(envVar.toLatin1()) : QDir::homePath();
|
qEnvironmentVariable(envVar.toLatin1()) : QDir::homePath();
|
||||||
|
|
||||||
|
auto result = new McuPackage(
|
||||||
|
QString::fromLatin1("MCU SDK (%1)").arg(envVarPrefix),
|
||||||
|
defaultPath,
|
||||||
|
{},
|
||||||
|
envVar);
|
||||||
|
result->setEnvironmentVariableName(envVar);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static McuPackage *createFreeRTOSSourcesPackage(const QString &envVar, const QString &boardSdkDir,
|
||||||
|
const QString &freeRTOSBoardSdkSubDir)
|
||||||
|
{
|
||||||
|
const QString envVarPrefix = envVar.chopped(strlen("_FREERTOS_DIR"));
|
||||||
|
|
||||||
|
QString defaultPath;
|
||||||
|
if (qEnvironmentVariableIsSet(envVar.toLatin1()))
|
||||||
|
defaultPath = qEnvironmentVariable(envVar.toLatin1());
|
||||||
|
else if (!boardSdkDir.isEmpty() && !freeRTOSBoardSdkSubDir.isEmpty())
|
||||||
|
defaultPath = boardSdkDir + "/" + freeRTOSBoardSdkSubDir;
|
||||||
|
else
|
||||||
|
defaultPath = QDir::homePath();
|
||||||
|
|
||||||
auto result = new McuPackage(
|
auto result = new McuPackage(
|
||||||
QString::fromLatin1("FreeRTOS Sources (%1)").arg(envVarPrefix),
|
QString::fromLatin1("FreeRTOS Sources (%1)").arg(envVarPrefix),
|
||||||
defaultPath,
|
defaultPath,
|
||||||
@@ -229,6 +251,7 @@ struct McuTargetDescription
|
|||||||
QString toolchainId;
|
QString toolchainId;
|
||||||
QString boardSdkEnvVar;
|
QString boardSdkEnvVar;
|
||||||
QString freeRTOSEnvVar;
|
QString freeRTOSEnvVar;
|
||||||
|
QString freeRTOSBoardSdkSubDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescription> &descriptions,
|
static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescription> &descriptions,
|
||||||
@@ -246,13 +269,15 @@ static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescrip
|
|||||||
{{"Renesas"}, createRGLPackage()}
|
{{"Renesas"}, createRGLPackage()}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QHash<QString, McuPackage *> boardSdkPkgs;
|
||||||
QHash<QString, McuPackage *> freeRTOSPkgs;
|
QHash<QString, McuPackage *> freeRTOSPkgs;
|
||||||
QVector<McuTarget *> mcuTargets;
|
QVector<McuTarget *> mcuTargets;
|
||||||
|
|
||||||
for (const auto &desc : descriptions) {
|
for (const auto &desc : descriptions) {
|
||||||
McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId);
|
McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId);
|
||||||
if (desc.toolchainId == "desktop") {
|
if (desc.toolchainId == "desktop") {
|
||||||
auto mcuTarget = new McuTarget(desc.platformVendor, desc.platform,
|
auto mcuTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion),
|
||||||
|
desc.platformVendor, desc.platform,
|
||||||
McuTarget::OS::Desktop, {}, tcPkg);
|
McuTarget::OS::Desktop, {}, tcPkg);
|
||||||
mcuTargets.append(mcuTarget);
|
mcuTargets.append(mcuTarget);
|
||||||
continue;
|
continue;
|
||||||
@@ -262,19 +287,32 @@ static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescrip
|
|||||||
QVector<McuPackage*> required3rdPartyPkgs = {
|
QVector<McuPackage*> required3rdPartyPkgs = {
|
||||||
vendorPkgs.value(desc.platformVendor), tcPkg
|
vendorPkgs.value(desc.platformVendor), tcPkg
|
||||||
};
|
};
|
||||||
|
QString boardSdkDefaultPath;
|
||||||
|
if (!desc.boardSdkEnvVar.isEmpty()
|
||||||
|
&& desc.boardSdkEnvVar != "RGL_DIR") { // Already included in vendorPkgs
|
||||||
|
if (!boardSdkPkgs.contains(desc.boardSdkEnvVar)) {
|
||||||
|
auto boardSdkPkg = createBoardSdkPackage(desc.boardSdkEnvVar);
|
||||||
|
boardSdkPkgs.insert(desc.boardSdkEnvVar, boardSdkPkg);
|
||||||
|
}
|
||||||
|
auto boardSdkPkg = boardSdkPkgs.value(desc.boardSdkEnvVar);
|
||||||
|
boardSdkDefaultPath = boardSdkPkg->defaultPath();
|
||||||
|
required3rdPartyPkgs.append(boardSdkPkg);
|
||||||
|
}
|
||||||
if (os == McuTarget::OS::FreeRTOS) {
|
if (os == McuTarget::OS::FreeRTOS) {
|
||||||
if (desc.freeRTOSEnvVar.isEmpty()) {
|
if (desc.freeRTOSEnvVar.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
if (!freeRTOSPkgs.contains(desc.freeRTOSEnvVar)) {
|
if (!freeRTOSPkgs.contains(desc.freeRTOSEnvVar)) {
|
||||||
auto freeRTOSPkg = createFreeRTOSSourcesPackage(desc.freeRTOSEnvVar);
|
freeRTOSPkgs.insert(desc.freeRTOSEnvVar, createFreeRTOSSourcesPackage(
|
||||||
freeRTOSPkgs.insert(desc.freeRTOSEnvVar, freeRTOSPkg);
|
desc.freeRTOSEnvVar, boardSdkDefaultPath,
|
||||||
|
desc.freeRTOSBoardSdkSubDir));
|
||||||
}
|
}
|
||||||
required3rdPartyPkgs.append(freeRTOSPkgs.value(desc.freeRTOSEnvVar));
|
required3rdPartyPkgs.append(freeRTOSPkgs.value(desc.freeRTOSEnvVar));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto mcuTarget = new McuTarget(desc.platformVendor, desc.platform, os,
|
auto mcuTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion),
|
||||||
|
desc.platformVendor, desc.platform, os,
|
||||||
required3rdPartyPkgs, tcPkg);
|
required3rdPartyPkgs, tcPkg);
|
||||||
if (desc.colorDepths.count() > 1)
|
if (desc.colorDepths.count() > 1)
|
||||||
mcuTarget->setColorDepth(colorDepth);
|
mcuTarget->setColorDepth(colorDepth);
|
||||||
@@ -286,6 +324,7 @@ static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescrip
|
|||||||
packages->append(Utils::transform<QVector<McuPackage *> >(
|
packages->append(Utils::transform<QVector<McuPackage *> >(
|
||||||
tcPkgs.values(), [&](McuToolChainPackage *tcPkg) { return tcPkg; }));
|
tcPkgs.values(), [&](McuToolChainPackage *tcPkg) { return tcPkg; }));
|
||||||
packages->append(vendorPkgs.values().toVector());
|
packages->append(vendorPkgs.values().toVector());
|
||||||
|
packages->append(boardSdkPkgs.values().toVector());
|
||||||
packages->append(freeRTOSPkgs.values().toVector());
|
packages->append(freeRTOSPkgs.values().toVector());
|
||||||
|
|
||||||
return mcuTargets;
|
return mcuTargets;
|
||||||
@@ -297,24 +336,13 @@ static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir)
|
|||||||
return kitsDir.entryInfoList();
|
return kitsDir.entryInfoList();
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString freeRTOSEnvVarForPlatform(const QString &platform)
|
|
||||||
{
|
|
||||||
if (platform == "STM32F769I-DISCOVERY" || platform == "STM32F7508-DISCOVERY")
|
|
||||||
return {"STM32F7_FREERTOS_DIR"};
|
|
||||||
else if (platform == "MIMXRT1050-EVK")
|
|
||||||
return {"IMXRT1050_FREERTOS_DIR"};
|
|
||||||
else if (platform == "MIMXRT1064-EVK")
|
|
||||||
return {"IMXRT1064_FREERTOS_DIR"};
|
|
||||||
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
static McuTargetDescription parseDescriptionJson(const QByteArray &data)
|
static McuTargetDescription parseDescriptionJson(const QByteArray &data)
|
||||||
{
|
{
|
||||||
const QJsonDocument document = QJsonDocument::fromJson(data);
|
const QJsonDocument document = QJsonDocument::fromJson(data);
|
||||||
const QJsonObject target = document.object();
|
const QJsonObject target = document.object();
|
||||||
const QJsonObject toolchain = target.value("toolchain").toObject();
|
const QJsonObject toolchain = target.value("toolchain").toObject();
|
||||||
const QJsonObject boardSdk = target.value("boardSdk").toObject();
|
const QJsonObject boardSdk = target.value("boardSdk").toObject();
|
||||||
|
const QJsonObject freeRTOS = target.value("freeRTOS").toObject();
|
||||||
|
|
||||||
const QString platform = target.value("platform").toString();
|
const QString platform = target.value("platform").toString();
|
||||||
|
|
||||||
@@ -328,8 +356,9 @@ static McuTargetDescription parseDescriptionJson(const QByteArray &data)
|
|||||||
target.value("platformVendor").toString(),
|
target.value("platformVendor").toString(),
|
||||||
colorDepthsVector,
|
colorDepthsVector,
|
||||||
toolchain.value("id").toString(),
|
toolchain.value("id").toString(),
|
||||||
boardSdk.value("boardSdkEnvVar").toString(),
|
boardSdk.value("envVar").toString(),
|
||||||
freeRTOSEnvVarForPlatform(platform) // Workaround for UL-2514: Missing FreeRTOS information
|
freeRTOS.value("envVar").toString(),
|
||||||
|
freeRTOS.value("boardSdkSubDir").toString()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,16 +372,17 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packa
|
|||||||
if (!file.open(QFile::ReadOnly))
|
if (!file.open(QFile::ReadOnly))
|
||||||
continue;
|
continue;
|
||||||
const McuTargetDescription desc = parseDescriptionJson(file.readAll());
|
const McuTargetDescription desc = parseDescriptionJson(file.readAll());
|
||||||
if (!McuSupportOptions::supportedQulVersion()
|
if (QVersionNumber::fromString(desc.qulVersion) < McuSupportOptions::minimalQulVersion())
|
||||||
.isPrefixOf(QVersionNumber::fromString(desc.qulVersion)))
|
|
||||||
return; // Invalid version means invalid SDK installation.
|
return; // Invalid version means invalid SDK installation.
|
||||||
descriptions.append(desc);
|
descriptions.append(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround for missing JSON file for Desktop target:
|
// Workaround for missing JSON file for Desktop target:
|
||||||
if (dir.pathAppended("/lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib").exists()) {
|
if (dir.pathAppended("/lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib").exists()) {
|
||||||
descriptions.prepend({McuSupportOptions::supportedQulVersion().toString(),
|
const QString qulVersion = descriptions.empty() ?
|
||||||
{"Qt"}, {"Qt"}, {32}, {"desktop"}, {}, {}});
|
McuSupportOptions::minimalQulVersion().toString()
|
||||||
|
: descriptions.first().qulVersion;
|
||||||
|
descriptions.prepend({qulVersion, {"Qt"}, {"Qt"}, {32}, {"desktop"}, {}, {}, {}});
|
||||||
}
|
}
|
||||||
|
|
||||||
mcuTargets->append(targetsFromDescriptions(descriptions, packages));
|
mcuTargets->append(targetsFromDescriptions(descriptions, packages));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: BlackBerry (qt@blackberry.com)
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
**
|
**
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ def setKeyboardShortcutForAboutQtC():
|
|||||||
modelIndex = waitForObject("{column='0' text='AboutQtCreator' type='QModelIndex' "
|
modelIndex = waitForObject("{column='0' text='AboutQtCreator' type='QModelIndex' "
|
||||||
"container={column='0' text='QtCreator' type='QModelIndex' "
|
"container={column='0' text='QtCreator' type='QModelIndex' "
|
||||||
"container=%s}}" % objectMap.realName(treewidget))
|
"container=%s}}" % objectMap.realName(treewidget))
|
||||||
|
treewidget.scrollTo(modelIndex)
|
||||||
mouseClick(modelIndex)
|
mouseClick(modelIndex)
|
||||||
shortcutGB = "{title='Shortcut' type='QGroupBox' unnamed='1' visible='1'}"
|
shortcutGB = "{title='Shortcut' type='QGroupBox' unnamed='1' visible='1'}"
|
||||||
record = waitForObject("{container=%s type='Core::Internal::ShortcutButton' unnamed='1' "
|
record = waitForObject("{container=%s type='Core::Internal::ShortcutButton' unnamed='1' "
|
||||||
|
|||||||
@@ -130,5 +130,5 @@ def main():
|
|||||||
test.fail("The checked out project was not being opened.",
|
test.fail("The checked out project was not being opened.",
|
||||||
str(waitForObject(":Cannot Open Project_QTextEdit").plainText))
|
str(waitForObject(":Cannot Open Project_QTextEdit").plainText))
|
||||||
clickButton(waitForObject(":Cannot Open Project.OK_QPushButton"))
|
clickButton(waitForObject(":Cannot Open Project.OK_QPushButton"))
|
||||||
verifyVersionControlView(targetDir, button == "Cancel immediately")
|
verifyVersionControlView(targetDir, button != ":Git Repository Clone.Finish_QPushButton")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
|||||||
Reference in New Issue
Block a user