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:
hjk
2023-06-12 16:33:31 +02:00
parent 05294ad701
commit ddc30f4b9f
2 changed files with 23 additions and 38 deletions

View File

@@ -3,34 +3,31 @@
#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
{
public:
GenericBuildConfiguration(Target *target, Id id)
: BuildConfiguration(target, id)
{
setConfigWidgetDisplayName(GenericProjectManager::Tr::tr("Generic Manager"));
setBuildDirectoryHistoryCompleter("Generic.BuildDir.History");
@@ -41,7 +38,13 @@ GenericBuildConfiguration::GenericBuildConfiguration(Target *parent, Utils::Id i
});
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

View File

@@ -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