forked from qt-creator/qt-creator
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:
@@ -51,23 +51,21 @@ namespace Internal {
|
||||
|
||||
class McuAbstractPackage;
|
||||
|
||||
class McuSdkRepository
|
||||
class McuSdkRepository final
|
||||
{
|
||||
public:
|
||||
Packages packages;
|
||||
Targets mcuTargets;
|
||||
void deletePackagesAndTargets();
|
||||
Packages packages;
|
||||
};
|
||||
|
||||
class McuSupportOptions : public QObject
|
||||
class McuSupportOptions final : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit McuSupportOptions(QObject *parent = nullptr);
|
||||
~McuSupportOptions() override;
|
||||
|
||||
McuAbstractPackage *qtForMCUsSdkPackage = nullptr;
|
||||
McuPackagePtr qtForMCUsSdkPackage{nullptr};
|
||||
McuSdkRepository sdkRepository;
|
||||
|
||||
void setQulDir(const Utils::FilePath &dir);
|
||||
@@ -90,8 +88,6 @@ public:
|
||||
static bool automaticKitCreationFromSettings();
|
||||
|
||||
private:
|
||||
void deletePackagesAndTargets();
|
||||
|
||||
bool m_automaticKitCreation = true;
|
||||
signals:
|
||||
void packagesChanged();
|
||||
|
||||
Reference in New Issue
Block a user