McuSupport: Auto manage memory of McuPackage's version detector

Use smart pointer for member of McuPackage.

Change-Id: I2474fc791b91c489be77aee3aab86401aaef76e8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Piotr Mućko
2022-06-02 16:13:08 +02:00
parent 8b6aeb9d16
commit 1c4abbf069
4 changed files with 8 additions and 8 deletions

View File

@@ -26,6 +26,7 @@
#pragma once
#include "mcuabstractpackage.h"
#include "mcusupportversiondetection.h"
#include "settingshandler.h"
#include <utils/filepath.h>
@@ -102,7 +103,7 @@ private:
const Utils::FilePath m_defaultPath;
const Utils::FilePath m_detectionPath;
const QString m_settingsKey;
const McuPackageVersionDetector *m_versionDetector;
QScopedPointer<const McuPackageVersionDetector> m_versionDetector;
Utils::FilePath m_path;
Utils::FilePath m_relativePathModifier; // relative path to m_path to be returned by path()