McuSupport: Move McuBuildStep to .cpp

Not needed publicly.

Change-Id: I0e8ddd3e260fb87bedc9ea1478e440e99bd2e203
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-05-23 16:23:17 +02:00
parent 06b276f68f
commit beea9ec157
2 changed files with 27 additions and 29 deletions

View File

@@ -2,18 +2,21 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "mcubuildstep.h"
#include "mcukitmanager.h"
#include "mculegacyconstants.h"
#include "mcusupportconstants.h"
#include <cmakeprojectmanager/cmakekitinformation.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/task.h>
#include <projectexplorer/taskhub.h>
@@ -23,12 +26,25 @@
#include <qtsupport/qtsupportconstants.h>
#include <utils/aspects.h>
#include <utils/filepath.h>
#include <QTemporaryDir>
#include <QVersionNumber>
namespace McuSupport::Internal {
class DeployMcuProcessStep : public ProjectExplorer::AbstractProcessStep
{
public:
static const Utils::Id id;
static void showError(const QString &text);
DeployMcuProcessStep(ProjectExplorer::BuildStepList *bc, Utils::Id id);
private:
QString findKitInformation(ProjectExplorer::Kit *kit, const QString &key);
QTemporaryDir m_tmpDir;
};
const Utils::Id DeployMcuProcessStep::id = "QmlProject.Mcu.DeployStep";
void DeployMcuProcessStep::showError(const QString &text)
@@ -117,13 +133,6 @@ QString DeployMcuProcessStep::findKitInformation(ProjectExplorer::Kit *kit, cons
return {};
}
MCUBuildStepFactory::MCUBuildStepFactory()
: BuildStepFactory()
{
setDisplayName(QmlProjectManager::Tr::tr("Qt for MCUs Deploy Step"));
registerStep<DeployMcuProcessStep>(DeployMcuProcessStep::id);
}
ProjectExplorer::Kit *MCUBuildStepFactory::findMostRecentQulKit()
{
ProjectExplorer::Kit *mcuKit = nullptr;
@@ -166,4 +175,11 @@ void MCUBuildStepFactory::updateDeployStep(ProjectExplorer::Target *target, bool
}
}
MCUBuildStepFactory::MCUBuildStepFactory()
{
setDisplayName(QmlProjectManager::Tr::tr("Qt for MCUs Deploy Step"));
registerStep<DeployMcuProcessStep>(DeployMcuProcessStep::id);
}
} // namespace McuSupport::Internal

View File

@@ -1,35 +1,17 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/project.h>
#include <utils/id.h>
#include <QTemporaryDir>
namespace McuSupport::Internal {
class DeployMcuProcessStep : public ProjectExplorer::AbstractProcessStep
{
public:
static const Utils::Id id;
static void showError(const QString &text);
DeployMcuProcessStep(ProjectExplorer::BuildStepList *bc, Utils::Id id);
private:
QString findKitInformation(ProjectExplorer::Kit *kit, const QString &key);
QTemporaryDir m_tmpDir;
};
class MCUBuildStepFactory : public ProjectExplorer::BuildStepFactory
{
public:
MCUBuildStepFactory();
static ProjectExplorer::Kit *findMostRecentQulKit();
static void updateDeployStep(ProjectExplorer::Target *target, bool enabled);
};