McuSupport: Automatic memory management for mcu sdk

Fix crash while automatically restoring kits during startup.
Change packages container to set to avoid duplicates.
Use RAII for McuSdkRepository.

Change-Id: I4b3f4156f0bc770c8a5ea8a171b1f22f6ffb8f96
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Piotr Mućko
2022-03-28 16:42:51 +02:00
parent 652f130fae
commit a3fbfac814
19 changed files with 229 additions and 265 deletions

View File

@@ -64,6 +64,8 @@ public:
const bool addToPath = false,
const Utils::FilePath &relativePathModifier = Utils::FilePath());
~McuPackage() override = default;
QString label() const override;
const QString &cmakeVariableName() const override;
const QString &environmentVariableName() const override;
@@ -89,7 +91,6 @@ private:
void updatePath();
void updateStatusUi();
QWidget *m_widget = nullptr;
Utils::PathChooser *m_fileChooser = nullptr;
Utils::InfoLabel *m_infoLabel = nullptr;
@@ -113,6 +114,7 @@ private:
class McuToolChainPackage : public McuPackage
{
Q_OBJECT
public:
enum class ToolChainType { IAR, KEIL, MSVC, GCC, ArmGcc, GHS, GHSArm, Unsupported };