McuSupport: Organize namespaces, separate legacy constants

qtc9 will use new implementation for qtForMCUs 2.3 and newer.
Legacy implementation will be used for older versions.

Change-Id: Ibb2919f25d03d6445b8328e20316d4f88203a463
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-06-17 17:15:17 +02:00
parent 7e17119e0a
commit cf147aa4b6
17 changed files with 240 additions and 237 deletions

View File

@@ -27,6 +27,7 @@
#include "mcukitinformation.h"
#include "mcukitmanager.h"
#include "mculegacyconstants.h"
#include "mcupackage.h"
#include "mcusupportconstants.h"
#include "mcusupportplugin.h"
@@ -46,14 +47,13 @@
#include <QMessageBox>
#include <QPushButton>
using namespace ProjectExplorer;
using namespace Utils;
namespace McuSupport::Internal {
McuSupportOptions::McuSupportOptions(const SettingsHandler::Ptr &settingsHandler, QObject *parent)
: QObject(parent)
, qtForMCUsSdkPackage(Sdk::createQtForMCUsPackage(settingsHandler))
, qtForMCUsSdkPackage(createQtForMCUsPackage(settingsHandler))
, settingsHandler(settingsHandler)
{
connect(qtForMCUsSdkPackage.get(),
@@ -122,7 +122,7 @@ void McuSupportOptions::setQulDir(const FilePath &dir)
{
qtForMCUsSdkPackage->updateStatus();
if (qtForMCUsSdkPackage->isValidStatus())
sdkRepository = Sdk::targetsAndPackages(dir, settingsHandler);
sdkRepository = targetsAndPackages(dir, settingsHandler);
else
sdkRepository = McuSdkRepository{};
for (const auto &package : qAsConst(sdkRepository.packages))