forked from qt-creator/qt-creator
GenericProjectManager: De-QObjectify GenericBuildConfiguration
Change-Id: I29ae16c04f17a134363a64532cc160d58127f34d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -3,45 +3,48 @@
|
||||
|
||||
#include "genericbuildconfiguration.h"
|
||||
|
||||
#include "genericmakestep.h"
|
||||
#include "genericproject.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "genericprojectmanagertr.h"
|
||||
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectexplorertr.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <utils/aspects.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace GenericProjectManager {
|
||||
namespace Internal {
|
||||
namespace GenericProjectManager::Internal {
|
||||
|
||||
GenericBuildConfiguration::GenericBuildConfiguration(Target *parent, Utils::Id id)
|
||||
: BuildConfiguration(parent, id)
|
||||
class GenericBuildConfiguration final : public BuildConfiguration
|
||||
{
|
||||
setConfigWidgetDisplayName(GenericProjectManager::Tr::tr("Generic Manager"));
|
||||
setBuildDirectoryHistoryCompleter("Generic.BuildDir.History");
|
||||
public:
|
||||
GenericBuildConfiguration(Target *target, Id id)
|
||||
: BuildConfiguration(target, id)
|
||||
{
|
||||
setConfigWidgetDisplayName(GenericProjectManager::Tr::tr("Generic Manager"));
|
||||
setBuildDirectoryHistoryCompleter("Generic.BuildDir.History");
|
||||
|
||||
setInitializer([this](const BuildInfo &) {
|
||||
buildSteps()->appendStep(Constants::GENERIC_MS_ID);
|
||||
cleanSteps()->appendStep(Constants::GENERIC_MS_ID);
|
||||
updateCacheAndEmitEnvironmentChanged();
|
||||
});
|
||||
|
||||
setInitializer([this](const BuildInfo &) {
|
||||
buildSteps()->appendStep(Constants::GENERIC_MS_ID);
|
||||
cleanSteps()->appendStep(Constants::GENERIC_MS_ID);
|
||||
updateCacheAndEmitEnvironmentChanged();
|
||||
});
|
||||
}
|
||||
|
||||
updateCacheAndEmitEnvironmentChanged();
|
||||
}
|
||||
void addToEnvironment(Environment &env) const final
|
||||
{
|
||||
QtSupport::QtKitAspect::addHostBinariesToPath(kit(), env);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// GenericBuildConfigurationFactory
|
||||
@@ -68,10 +71,4 @@ GenericBuildConfigurationFactory::GenericBuildConfigurationFactory()
|
||||
});
|
||||
}
|
||||
|
||||
void GenericBuildConfiguration::addToEnvironment(Utils::Environment &env) const
|
||||
{
|
||||
QtSupport::QtKitAspect::addHostBinariesToPath(kit(), env);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace GenericProjectManager
|
||||
} // GenericProjectManager::Internal
|
||||
|
||||
@@ -5,18 +5,7 @@
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
|
||||
namespace GenericProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class GenericBuildConfiguration : public ProjectExplorer::BuildConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class ProjectExplorer::BuildConfigurationFactory;
|
||||
GenericBuildConfiguration(ProjectExplorer::Target *target, Utils::Id id);
|
||||
|
||||
void addToEnvironment(Utils::Environment &env) const final;
|
||||
};
|
||||
namespace GenericProjectManager::Internal {
|
||||
|
||||
class GenericBuildConfigurationFactory final : public ProjectExplorer::BuildConfigurationFactory
|
||||
{
|
||||
@@ -24,5 +13,4 @@ public:
|
||||
GenericBuildConfigurationFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace GenericProjectManager
|
||||
} // GenericProjectManager::Internal
|
||||
|
||||
Reference in New Issue
Block a user